mern-lpu-hrd-project/backend/DOCS.md

9.9 KiB

docter-appointment v1.0.0

Appointment

Create appointment

POST /appointments

Parameters

Name Type Description
No

Appointment's No.

Patient-Name

Appointment's Patient-Name.

Docter-Name

Appointment's Docter-Name.

Date

Appointment's Date.

Time

Appointment's Time.

Departent

Appointment's Departent.

Delete appointment

DELETE /appointments/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve appointment

GET /appointments/:id

Retrieve appointments

GET /appointments

Parameters

Name Type Description
access_token String

admin access token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update appointment

PUT /appointments/:id

Parameters

Name Type Description
access_token String

admin access token.

No

Appointment's No.

Patient-Name

Appointment's Patient-Name.

Docter-Name

Appointment's Docter-Name.

Date

Appointment's Date.

Time

Appointment's Time.

Departent

Appointment's Departent.

Auth

Authenticate

POST /auth

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
access_token String

Master access_token.

Department

Create department

POST /departments

Parameters

Name Type Description
access_token String

admin access token.

Id

Department's Id.

Name

Department's Name.

Nos.

of Doctor Department's Nos. of Doctor.

Delete department

DELETE /departments/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve department

GET /departments/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve departments

GET /departments

Parameters

Name Type Description
access_token String

admin access token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update department

PUT /departments/:id

Parameters

Name Type Description
access_token String

admin access token.

Id

Department's Id.

Name

Department's Name.

Nos.

of Doctor Department's Nos. of Doctor.

Doctor

Create doctor

POST /doctors

Parameters

Name Type Description
access_token String

admin access token.

Id

Doctor's Id.

Name

Doctor's Name.

Department

Doctor's Department.

Delete doctor

DELETE /doctors/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve doctor

GET /doctors/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve doctors

GET /doctors

Parameters

Name Type Description
access_token String

admin access token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update doctor

PUT /doctors/:id

Parameters

Name Type Description
access_token String

admin access token.

Id

Doctor's Id.

Name

Doctor's Name.

Department

Doctor's Department.

User

Create user

POST /users

Parameters

Name Type Description
access_token String

Master access_token.

email String

User's email.

password String

User's password.

name String optional

User's name.

picture String optional

User's picture.

role String optional

User's role.

Delete user

DELETE /users/:id

Parameters

Name Type Description
access_token String

User access_token.

Retrieve current user

GET /users/me

Parameters

Name Type Description
access_token String

User access_token.

Retrieve user

GET /users/:id

Retrieve users

GET /users

Parameters

Name Type Description
access_token String

User access_token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update password

PUT /users/:id/password

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
password String

User's new password.

Update user

PUT /users/:id

Parameters

Name Type Description
access_token String

User access_token.

name String optional

User's name.

picture String optional

User's picture.