# Patient Management System - Level2 (LP-2000)
## General Requirements
<p>
In this assignment, you are to create a Patient Management application. You can make use of Bootstrap if you want quick ready-made templates. You are free to make any UI/UX decision.
</p>
#### Part 1: Authentication and Sign-up
- The application should have a login/signup page.
- Show list of patients once logged in.
- The main patient page should only be accessible once authenticated.
#### Part 2: ETL
- The application should be able to upload csv file which will be a huge chunk of observation data.
- Upload file should have a history of uploaded files.
- Application should be able to upload these data in your system database.
#### Part 3: Profile
- Application should be able to diplay patient profile with all the data recieved from the uploaded data.
#### Part 4: Reporting
- Application should have dashboard
- 
- Application should be able to display list of Patient, Practicioners, Nurses, Medications, Hospital.
- Application should be able to filter all the data.
#### CSV file:
- <a href='https://drive.google.com/file/d/17TtT-Q9nodlLJFxaQwBUGcLidMUFSLpz/view?usp=share_link' target='blank'>ETL FORMAT CSV FILE 1</a>
- <a href='https://drive.google.com/file/d/1NLVikmHcDJH_hJQR2XuLJB_X-VjuwMHe/view?usp=share_link' target='blank'>Cental Windborough Data CSV FILE 1</a>
## Application Requirements
<ol>
<li>Create a suitable schema with the database of your choice.</li>
<li>Be RESTful.</li>
<li>Have proper access control.</li>
<li>Write Unit tests.</li>
<li>Do your best to implement and follow best practices, conventions, and standards under all aspects.</li>
</ol>
## API Requirements
<ol>
<li>Create POST /signup endpoint for user signup. The endpoint should take email and password as payload.</li>
<li>Create POST /signin endpoint for user signin. The endpoint should take the same payload as /signup.
</li>
<li>Create a token-based authentication mechanism.</li>
</li>
<li>All endpoints need to be accessible only to authenticated users.
</li>
<li>You will have to create necessary table for storing details.
</li>
</ol>
## Your submission must include
<ol>
<li>Application should be properly documented. Make sure to add all the information necesary to run the project.
<ul>
<li>Short Description of project.</li>
<li>Frontend application screenshots.</li>
<li>Techstack used in application</li>
<li>Setup process.</li>
</ul>
</li>
<li>Unit testing for all the business requirements.</li>
<li>Test coverage report</li>
<li>API Documentation (add to readMe.md)</li>
<li>Postman Collection (add the public link to readMe.md)</li>
<li>Time-bound token authentication. </li>
<ul>
<li>The access token must expire after a few minutes, regenerated using a refresh token.</li>
</ul>
<li>Database connection abstraction to support more than one database connections.</li>
</ol>
<hr />
## Business Requirements
- While uploading the data, if the data does not follow the standard, it should be flagged and alerted while uploading.
- Details should be update with respect to observation date. Eg,
```
-----------------------------------------------------------------------------------------
|observation_id|observation_date|..|patient_ssn|..|patient_address1|..|
|4f4389fe-251..|12/31/2044 |..|430-50-7456|..|Indonesia |..|
......
|4f4389fe-251..|12/20/2044 |..|430-50-7456|..|China |..|
......
So expectation is:430-50-7456's 'address1 should be Indonesia
```
- Details should be able to display the timeline of data changed
```
-----------------------------------------------------------------------------------------
|observation_id|observation_date|..|patient_ssn|..|patient_address1|..|
|4f4389fe-251..|12/31/2044 |..|430-50-7456|..|Indonesia |..|
......
|4f4389fe-251..|12/20/2044 |..|430-50-7456|..|China |..|
......
So the expectation is:
430-50-7456's 'address1 should be Indonesia on 12/31/2044
430-50-7456's 'address1 should be China on 12/20/2044
```
- The application should be able to display high-risk patients who visited more than 3 hospitals or consulted with more than 5 doctors or had more than 10 observations in the span of 10 months. Separate table view of these observations.
- Application should flag any observation covered by practitioner or nurse after their checkout time. Seperate table view of these observation.
- Application should be able to display high risk practitioner and nurse who are working even after checkout time. Seperate table view of these observation.
### Business Challenge - Paitient Medication
- Paitient detail should display list of medications recommended throughout the observation.
- Paitient detail should display Medication-Intake-Level timeline
Medication level deduction :
Medication level 9.6 means,
Level - 9
Duration - 6 months
Medication level 5 or 5.0 means,
Level - 5
Duration - 10 months
Representation of 6.6 Medication.

The medication level drops as per time given to 0. So a person intaking 6.6 medication will have Medication_Intake_Level from 6 on first month to 0 at 7th month
Representation of 6.6 + 6.8 (5th month) + 3.3(10th month) Medication.

- Paitient list should display Medication-Intake-Level in last 1 year.
### References
For reference you can use following these images. But use your own judgement for the UI/UX and showcase your creativity. Our expectation is a proper UI/UX for Login, Registration, List and Form.
#### Login / Registeration Page

#### Patient List

#### Patient Detail
