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

9.2 KiB

doctor-apointment v1.0.0

Apointment

Create apointment

POST /apointments

Parameters

Name Type Description
No

Apointment's No.

PatientName

Apointment's PatientName.

DocterName

Apointment's DocterName.

Email

Apointment's Email.

PhoneNo

Apointment's PhoneNo.

Date

Apointment's Date.

Time

Apointment's Time.

Department

Apointment's Department.

Delete apointment

DELETE /apointments/:id

Retrieve apointment

GET /apointments/:id

Retrieve apointments

GET /apointments

Parameters

Name Type Description
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 apointment

PUT /apointments/:id

Parameters

Name Type Description
No

Apointment's No.

PatientName

Apointment's PatientName.

DocterName

Apointment's DocterName.

Email

Apointment's Email.

PhoneNo

Apointment's PhoneNo.

Date

Apointment's Date.

Time

Apointment's Time.

Department

Apointment's Department.

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

Department's Nos.

Delete department

DELETE /Departments/:id

Retrieve department

GET /Departments/:id

Retrieve departments

GET /Departments

Parameters

Name Type Description
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
ID

Department's ID.

Name

Department's Name.

Nos

Department's Nos.

Doctor

Create doctor

POST /Doctors

Parameters

Name Type Description
access_token String

admin access token.

ID

Doctor's ID.

Name

Doctor's Name.

Dapartment

Doctor's Dapartment.

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.

Dapartment

Doctor's Dapartment.

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.