Coder Social home page Coder Social logo

team-project-backend's Introduction

BACKEND CLINIC WEBSITE

API LINK

Authentication Routes

  • POST /login

    • Returns: JWT access token and refresh token upon successful authentication.

    • Status Codes: 200 (Success), 400 (User does not exist), 401 (Wrong password), 500 (Internal server error).

    • Request body

    { 
     "email": "[email protected]",
     "password": "string" 
    }
    
    • Example value

    {
     "token": "string",
     "refreshToken": "string"
    }
    
  • POST /logout

    • Returns: Confirmation message upon successful logout.
    • Status Codes: 201 (Logout successful), 500 (Internal server error).
    • Request body

    {
     "refreshToken": "string"
    }
    
  • POST /register

    • Returns: Confirmation message upon successful registration.
    • Status Codes: 201 (User registered successfully), 500 (Error registering user), 501 (User already exists).
    • Request body

    { 
     "email": "[email protected]",
     "password": "string" 
    }
    
  • POST /refresh_token

    • Returns: A new JWT access token.
    • Status Codes: 200 (New token generated), 400 (Invalid token), 401 (No token provided).
    • Request body

    {
     "refreshToken": "string"
    }
    
    • Example value

    {
     "token": "string",
    }
    

User Data Route

  • GET /getUserData

    • Returns: User-specific data including username, randomInfo1, arrayOfInfo, and infoObject.
    • Status Codes: 200 (Data retrieved), 401 (Access denied), 500 (Internal server error).
    • Example value

    {
    "username": "string",
    "randomInfo1": "string",
    "arrayOfInfo": [
      "string"
    ],
    "infoObject": {
      "infoId": 0,
      "infoText": "string"
    }
    }
    

Medical Routes

  • GET /medicalData

    • Returns: Mock medical data including patientId, diagnosis, treatmentPlan, and nextAppointment.
    • Status Codes: 200 (Data retrieved), 500 (Internal server error).
    • Example value

    {
     "patientId": "string",
     "diagnosis": "string",
     "treatmentPlan": {
     "medication": "string",
     "dosage": "string",
     "frequency": "string"
    },
     "nextAppointment": "2023-11-18"
    }
    
  • POST /patientDiagnosis

    • Returns: Mock diagnosis based on the provided patient information.
    • Status Codes: 200 (Diagnosis provided), 400 (Bad request), 500 (Internal server error).
    • Request body

    {
    "age": 0,
    "symptoms": [
    "string"
    ]
    }
    
    • Example value

    {
    "diagnosis": "string"
    }
    
  • POST /predictHeartDisease

    • Returns: Object representing positive and negative chance for a heart disease
    • Status Codes: 200 (Chances provided), 400 (Incorrect data), 500 (Internal server error).
    • Request body

    {
    "age": "string",
    "cholesterol": "string",
    "pressure" : "string"
    }
    
    • Example value

    {
    "negativeChance" : "float",
    "positiveChance" : "float"
    }
    

team-project-backend's People

Contributors

hezx13 avatar teamproject2023 avatar militaryguineapig avatar

Watchers

 avatar

Forkers

hezx13

team-project-backend's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.