Skip to content

Latest commit

 

History

History
1140 lines (764 loc) · 24.6 KB

API_REFERENCE.md

File metadata and controls

1140 lines (764 loc) · 24.6 KB

API Routes

Guest Routes

Login

POST /login
Parameter Type Description
Username string Required. Username to login with
Password string Required. Password to login with

Send OTP

POST /sendOTP
Parameter Type Description
Email string Required. The Email of the user to send OTP to

Validate OTP

POST /validateOTP
Parameter Type Description
Email string Required. The Email of the user the OTP was sent to
otp string Required. The otp to validate

Add Patient

POST /addPatient
Parameter Type Description
Username string Required. The username of the patient
Name string Required. The name of the patient
Password string Required. The password of the patient
Email string Required. The email of the patient
MobileNum string Required. The mobile number of the patient
DateOfBirth string Required. The date of birth of the patient
Gender string Required. The gender of the patient ["M", "F"]
EmergencyContactNumber string Required. The emergency contact number of the patient
EmergencyContactName string Required. The emergency contact name of the patient
EmergencyContactRelation string Required. The relationship between the patient and the emergency contact

Add Doctor Signup Request

POST /addRequest
Parameter Type Description
Username string Required. The username of the doctor
Password string Required. The password of the doctor
Email string Required. The email of the doctor
Name string Required. The name of the doctor
DateOfBirth string Required. The date of birth of the doctor
HourlyRate number Required. The hourly rate of the doctor
Affiliation string Required. The affiliation of the doctor
EducationalBackground string Required. The educational background of the doctor
Speciality string Required. The speciality of the doctor

Reset Password

PATCH /resetPass/
Parameter Type Description
Email string Required. The Email of the user to reset the password of
Password string Required. The new Password

Get Notifications

GET /getNotifs

No parameters required.

Update Request

PUT /updateRequest/:id
Parameter Type Description
id string Required. ID of the request
request object Required The new request

Update Email

PATCH /updateEmail
Parameter Type Description
Email string Required. The new Email

Update Password

PATCH /updatePass/
Parameter Type Description
OldPassword string Required. The old password
NewPassword string Required. The new password

Admin Routes

Get Admins

GET /admins

No parameters required.

Get Requests

GET /admins/requests

No parameters required.

Add Admin

POST /admins/addAdmin
Parameter Type Description
Username string Required. Username of the admin
Password string Required. Password of the admin
Email string Required. Email of the admin

Get Request

GET /admins/getRequest
Parameter Type Description
Username string Required. Username of the requesting doctor

Get Request File

GET /admins/getRequestFile/:filename
Parameter Type Description
filename string Required. Filename of the requesting doctor's file

Accept Request

POST /admins/acceptRequest
Parameter Type Description
Username string Required. Username of the requesting doctor

Reject Request

PUT /admins/rejectRequest
Parameter Type Description
Username string Required. Username of the requesting doctor

Delete User

DELETE /admins/deleteUser
Parameter Type Description
Username string Required. Username of the user to be deleted

Doctor Routes

Create Doctor

POST /doctors/createDoctor
Parameter Type Description
Username string Required. The username of the doctor
Name string Required. The name of the doctor
DateOfBirth date Required. The date of birth of the doctor
HourlyRate number Required. The hourly rate of the doctor
Affiliation string Required. The affiliation of the doctor
EducationalBackground string Required. The educational background of the doctor

Update Doctor

PATCH /doctors/updateDoctor
Parameter Type Description
HourlyRate number Required. The new hourly rate of the doctor
Affiliation string Required. The new affiliation of the doctor

Get Doctor by ID

GET /doctors/getDoctorByid/:id
Parameter Type Description
id string Required. The ID of the doctor

Get Doctor by Username

GET /doctors/getDoctorByUsername/:username
Parameter Type Description
username string Required. The username of the doctor

Filter Doctor

GET /doctors/filter2
Parameter Type Description
Speciality string Required. The speciality of the doctor
date date Required. The date you're looking for an appointment on
hour number Required. The hour you're looking for an appointment on

Add Doctor

POST /doctors/addDoctor
Parameter Type Description
Username string Required. The username of the doctor
Name string Required. The name of the doctor
DateOfBirth date Required. The date of birth of the doctor
HourlyRate number Required. The hourly rate of the doctor
Affiliation string Required. The affiliation of the doctor
EducationalBackground string Required. The educational background of the doctor

Get All Doctors

GET /doctors/getAllDoctors

No parameters required.

Delete Doctor

DELETE /doctors/deleteDoctor/:id
Parameter Type Description
id string Required. The ID of the doctor

Get Doctor

GET /doctors/getDoctor/:id
Parameter Type Description
id string Required. The ID of the doctor

View Patient Info And Health Records

GET /doctors/viewPatientInfoAndHealthRecords
Parameter Type Description
PatientUsername string Required. The username of the patient

Followup Appointment

POST /doctors/followupAppointment

No parameters required.

Pay Doctor

POST /doctors/payDoctor

No parameters required.

Filter Doctor Slot Edition

GET /doctors/filterDoctorSlotEdition

No parameters required.

Add My Slots Doc

POST /doctors/addMySlotsDoc

No parameters required.

Update My Slots Doc

PATCH /doctors/updateMySlotsDoc/:id
Parameter Type Description
id string Required. The ID of the slot

Delete My Slots Doc

DELETE /doctors/deleteMySlotsDoc/:id
Parameter Type Description
id string Required. The ID of the slot

View Upcoming Appointments Doc

GET /doctors/viewUpcomingAppointmentsDoc

No parameters required.

View Past Appointments Doc

GET /doctors/viewPastAppoitmentsDoc

No parameters required.

View All Available Slots

GET /doctors/viewAllAvailableSlots/:username
Parameter Type Description
username string Required. The username of the doctor

View My Slots Doc

GET /doctors/viewMySlotsDoc

No parameters required.

Validate Booking Date

GET /doctors/validateBookingDate

No parameters required.

Get Payment Amount

GET /doctors/getPaymentAmount

No parameters required.

Get Doctor Info

GET /doctors/getDoctorInfo

No parameters required.

Patient Routes

Create Patient

POST /patients/createPatient
Parameter Type Description
Username string Required. The username of the patient
Name string Required. The name of the patient
DateOfBirth date Required. The date of birth of the patient
MedicalHistory string Required. The medical history of the patient

Update Patient

PATCH /patients/updatePatient
Parameter Type Description
MedicalHistory string Required. The updated medical history of the patient

Get Patient by ID

GET /patients/getPatientByid/:id
Parameter Type Description
id string Required. The ID of the patient

Get Patient by Username

GET /patients/getPatientByUsername/:username
Parameter Type Description
username string Required. The username of the patient

Add Patient

POST /patients/addPatient
Parameter Type Description
Username string Required. The username of the patient
Name string Required. The name of the patient
DateOfBirth date Required. The date of birth of the patient
MedicalHistory string Required. The medical history of the patient

Get All Patients

GET /patients/getAllPatients

No parameters required.

Delete Patient

DELETE /patients/deletePatient/:id
Parameter Type Description
id string Required. The ID of the patient

Get Patient

GET /patients/getPatient/:id
Parameter Type Description
id string Required. The ID of the patient

View Doctor Info And Health Records

GET /patients/viewDoctorInfoAndHealthRecords
Parameter Type Description
DoctorUsername string Required. The username of the doctor

Book Appointment

POST /patients/bookAppointment
Parameter Type Description
DoctorUsername string Required. The username of the doctor
Date date Required. The date of the appointment
Time time Required. The time of the appointment

Pay Doctor

POST /patients/payDoctor
Parameter Type Description
DoctorUsername string Required. The username of the doctor
Amount number Required. The amount to be paid

View Upcoming Appointments

GET /patients/viewUpcomingAppointments

No parameters required.

View Past Appointments

GET /patients/viewPastAppointments

No parameters required.

View All Available Slots

GET /patients/viewAllAvailableSlots/:username
Parameter Type Description
username string Required. The username of the doctor

Validate Booking Date

GET /patients/validateBookingDate

No parameters required.

Get Payment Amount

GET /patients/getPaymentAmount

No parameters required.

Get Patient Info

GET /patients/getPatientInfo

No parameters required.

Appointment Routes

Get Appointments

GET /appointments

No parameters required.

Find Patients

GET /appointments/findPatients

No parameters required.

Get All Appointments for Patient

GET /appointments/getAllAppointmentsPat

No parameters required.

Get Upcoming Appointments for Doctor

GET /appointments/upcoming

No parameters required.

Search Patient

GET /appointments/searchpatient
Parameter Type Description
PatientUsername string Required. The username of the patient

Get Appointments for Doctor

GET /appointments/getAppointmentsDoc

No parameters required.

Reschedule Appointment for Patient

POST /appointments/rescheduleAppointmentPatient

No parameters required.

Reschedule Appointment for Family Member

POST /appointments/rescheduleAppointmentfamilymember

No parameters required.

Get Appointments for Patient

GET /appointments/getAppointmentsPat

No parameters required.

Get Appointments for Family Members

GET /appointments/getAppointmentsfamilymembers

No parameters required.

Filter Appointments by Status for Doctor

GET /appointments/filterAppointmentsByStatusDoc

No parameters required.

Filter Appointments by Status for Patient

GET /appointments/filterAppointmentsByStatusPat

No parameters required.

Filter Appointments by Date for Doctor

GET /appointments/filterAppointmentsByDateDoc

No parameters required.

Filter Appointments by Date for Patient

GET /appointments/filterAppointmentsByDatePat

No parameters required.

Test Appointment Reference

GET /appointments/testAppRef

No parameters required.

Create Appointment

POST /appointments/createAppointment

No parameters required.

Reschedule for Patient

POST /appointments/rescheduleForPatient

No parameters required.

Cancel Appointment for Family Member

PATCH /appointments/cancelAppFam

No parameters required.

Cancel Appointment

PATCH /appointments/cancelAppointment

No parameters required.

Package Routes

Get All Packages

GET /packages

No parameters required.

Get Package by Name

GET /packages/:Name
Parameter Type Description
Name string Required. The name of the package

Create Package

POST /addPackage
Parameter Type Description
Name string Required. The name of the package
Price number Required. The price of the package
Session_Discount number Required. The session discount of the package
Medicine_Discount number Required. The medicine discount of the package
Family_Discount number Required. The family discount of the package

Delete Package

DELETE /deletePackage/:id
Parameter Type Description
id string Required. The ID of the package

Update Package

PATCH /updatePackage/:id
Parameter Type Description
id string Required. The ID of the package

Payment Routes

Pay with Card

POST /cardPayment

No parameters required.

Wallet Payment

POST /walletPayment

No parameters required.

Subscription Payment

POST /subscr

No parameters required.

Prescription Routes

Add Prescription

POST /addPrescription

No parameters required.

Add Medicine to Prescription

POST /addMedToPrescription

No parameters required.

Delete Medicine from Prescription

POST /deleteMedFromPrescription

No parameters required.

Update Description

POST /updateDescription

No parameters required.

Order Prescription

POST /orderPrescription

No parameters required.

Get Prescription APP

GET /getPrescriptionAPP

No parameters required.

Update Dosage

POST /updateDosage

No parameters required.

Check for Prescription

GET /checkForPrescription

No parameters required.

Get Prescription Medicines

GET /getPrescriptionMeds

No parameters required.

Test Routes

Test Route

GET /tests

No parameters required.

Accept Doctor

POST /tests/acceptDoc

No parameters required.

Get All System Users

GET /tests/Users

No parameters required.

Get All Admins

GET /tests/Admins

No parameters required.

Get All Doctors

GET /tests/Doctors

No parameters required.

Get All Patients

GET /tests/Patients

No parameters required.

Get All Appointments

GET /tests/Appointments

No parameters required.

Create Notification

POST /tests/createNotif

No parameters required.

Get All Requests

GET /tests/Requests

No parameters required.

Create System User

POST /tests/createUser

No parameters required.

Create Patient

POST /tests/createPatient

No parameters required.

Create Doctor

POST /tests/createDoctor

No parameters required.

Create Appointment

POST /tests/createAppointment

No parameters required.

Create Random Appointment

POST /tests/createRandomAppointment

No parameters required.

Create Prescription

POST /tests/createPrescription

No parameters required.

Get Doctor Slot

GET /tests/getDocSlot

No parameters required.

Test Doctor Slot Reference

GET /tests/testDocSlotRef

No parameters required.

Test Appointment Reference

GET /tests/testAppointRef

No parameters required.

Create Doctor Slot

POST /tests/createDocSlot

No parameters required.

Filter Doctor Slot Edition

GET /tests/filterDoctorSlotEdition

No parameters required.

Add My Slots Doctor

POST /tests/addMySlotsDoc

No parameters required.

Update My Slots Doctor

PUT /tests/updateMySlotsDoc

No parameters required.

Delete My Slots Doctor

DELETE /tests/deleteMySlotsDoc

No parameters required.

View Upcoming Appointments Doctor

GET /tests/viewUpcomingAppointmentsDoc

No parameters required.

View Past Appointments Doctor

GET /tests/viewPastAppoitmentsDoc

No parameters required.

View All Available Slots

GET /tests/viewAllAvailableSlots

No parameters required.

View Upcoming Appointments Patient

GET /tests/viewUpcomingAppointmentsPat

No parameters required.

View Past Appointments Patient

GET /tests/viewPastAppoitmentsPat

No parameters required.