Swiftpack.co - Package - patiw/medical-clinic-api

Swift 4.2

Project purpose

Basicaly this project is a task for a Team Project classes during first semester of my Master's at University of Gdansk. This is a backend for a Medical Clinic - mobile (Android) app can be found here

Simple documentation

Available endpoints:

+------+---------------------------------+
| POST | /api/patients/register          |
+------+---------------------------------+
| GET  | /api/patients/login             |
+------+---------------------------------+
| GET  | /api/patients/appointments/list |
+------+---------------------------------+
| GET  | /api/patients/appointments/new  |
+------+---------------------------------+
| POST | /api/doctors/register           |
+------+---------------------------------+
| GET  | /api/doctors/specializations    |
+------+---------------------------------+
| GET  | /api/doctors/login              |
+------+---------------------------------+
| POST | /api/doctors/appointments/new   |
+------+---------------------------------+
| GET  | /api/doctors/appointments/list  |
+------+---------------------------------+

Register for Patients

Required payload should contain a JSON with specified firstName, lastName, pesel, sex properties. If all of them are correct and pesel is unique the response returns pesel, lastName and token for future reuse. If pesel is not unique then error is served with adequate description.

Login for Patients

A request for proper endpoint is required. Additionaly there is a requirement to attach given token as a Bearer authentication. If token is valid then backend is serving same data as from register call so the mobile client is able to verify data provided by user. Otherwise an error is served with default for not logged user description.

Register for Doctor

Required payload should contain a JSON with specified firstName, lastName, specializationId properties. If all of them are correct and firstName and lastName are unique the response returns lastName, firstName and token for future reuse. If firstName and lastName are not unique then error is served with adequate description.

Login for Doctor

Same as for Patients

List of specializations

Nothing is needed - just send a get request

Create new Appointment (Doctor's perspective)

Attach Bearer token as an authorization, make sure to include clinicId, doctorId and date <- IMPORTANT NOTE: Must be timestamp FROM January 1, 2001

List all appointments (Doctor's perspective)

Attach Bearer token as an authorization. That's it.

Create new Appointment (Patient's perspective)

Attach Bearer token as an authorization, make sure to include visitId={visitId} in url.

List all appointments (Patient's perspective)

Attach Bearer token as an authorization. That's it.

Github

link
Stars: 1
Help us keep the lights on

Used By

Total: