Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend Models: Diabetics Module #1001

Open
harimurugan1989 opened this issue Oct 6, 2024 · 0 comments
Open

Backend Models: Diabetics Module #1001

harimurugan1989 opened this issue Oct 6, 2024 · 0 comments

Comments

@harimurugan1989
Copy link
Contributor

Define all models in the models present in the server folder.

Create a new folder called diabeticsModule similar to other modules. Inside that folder create sub folders indicating routes, controller and helpers. All routes has to be mentioned in routes file and we will be calling only the functions here. Controller function will be written in controller file.

Use camelCase for all the fields. Add createdAt and UpdatedAt in all tables.

Hospitals:

Name:
Location:
Phone:
doctors: [array]
patients: [array]

Patients:

Name:
Age:
Weight:
Height:
history:
family:
hospital: link to objectId

DailyDosage:

date:
patientId:
Session: pre-breakfast, pre-lunch, pre-dinner, night
bloodsugar:
CarboLevel:
Insulin:
LonglastingInsulin:
Physicalactivity:
createdAt:
updatedAt:

Sickday:

PatientId:
date:
time:
bloodSugar:
Carbolevel:
Insulin:
LonglastingInsulin:

Gamification:

patientId:
date:
progress:
Entrytime:
badge count:
starCount:
TotalStars:
TotalBadges:

In dailydose and sickday tables, all fields except patientId are nested fields. Meaning when the new entry for a particular patient comes it gets updated as a inner object which will reduce time in searching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants