I have few questions on the data model I am working on.
Its for an Appointment management system with few more details. For each appointment, we need to capture bunch of details.
Approach 1:-
All fields in 1 table.
Fields :-
1. appointment_id
2. doctor_id
3. client_id
4. appointment_type
5. start_time
6. end_time
7. notes
8. weight
9. weight_unit
10. temperature
11.temperature_unit
12.heart_rate
13.respiratory_rate
14.pulse_rate
15.hydration
16.systolic_bp
17.diastolic_bp
18.body_condition_code
19.pain_score
20.general_appearance
21.general_appearance_status
22.oral_health
23.oral_health_status
24.eyes_health
25.eyes_health_status
26.ears_health
27.ears_health_status
28.lungs_health
29.lungs_health_status
....
....
...
status
created_by
created_time
updated_by
updated_time
Approach 2:-
Appointment booking and other details in a separate table
2 Separate Tables
Table 1:- Appointment
1. appointment_id
2. doctor_id
3. client_id
4. appointment_type
5. start_time
6. end_time
7. notes
8. status
9. created_by
10. created_time
11.updated_by
12.updated_time
Table 2:- Appointment_details
1. appointment_id
2. doctor_id
3. client_id
4. weight
5. weight_unit
6. temperature
7.temperature_unit
8.heart_rate
9.respiratory_rate
10.pulse_rate
11.hydration
12.systolic_bp
13.diastolic_bp
14.body_condition_code
15.pain_score
16.general_appearance
17.general_appearance_status
18.oral_health
19.oral_health_status
20.eyes_health
21.eyes_health_status
22.ears_health
23.ears_health_status
24.lungs_health
25.lungs_health_status
....
....
...
status
created_by
created_time
updated_by
updated_time
Approach 3:-
Appointment booking, Appointment essentials and other details in a separate table
3 Separate Tables
Table 1:- Appointment
1. appointment_id
2. doctor_id
3. client_id
4. appointment_type
5. start_time
6. end_time
7. notes
8. status
9. created_by
10. created_time
11.updated_by
12.updated_time
Table 2:- Appointment_essentials
1. appointment_id
2. doctor_id
3. client_id
4. weight
5. weight_unit
6. temperature
7.temperature_unit
8.heart_rate
9.respiratory_rate
10.pulse_rate
11.hydration
12.systolic_bp
13.diastolic_bp
14.body_condition_code
15.pain_score
Table 3:- Appointment_details
1. appointment_id
2. doctor_id
3. doctor_id
4.general_appearance
5.general_appearance_status
6.oral_health
7.oral_health_status
8.eyes_health
9.eyes_health_status
10.ears_health
11.ears_health_status
12.lungs_health
13.lungs_health_status
....
....
...
status
created_by
created_time
updated_by
updated_time
Approach 4:-
Appointment booking, Appointment essentials, Health_Parts_Prop and Health_Prop_Mapping
4 Separate Tables
Table 1:- Appointment
1. appointment_id
2. doctor_id
3. client_id
4. appointment_type
5. start_time
6. end_time
7. notes
8. status
9. created_by
10. created_time
11.updated_by
12.updated_time
Table 2:- Appointment_essentials
1. appointment_id
2. doctor_id
3. client_id
4. weight
5. weight_unit
6. temperature
7.temperature_unit
8.heart_rate
9.respiratory_rate
10.pulse_rate
11.hydration
12.systolic_bp
13.diastolic_bp
14.body_condition_code
15.pain_score
Table 3:- health_part
1. health_part_id
2. health_part_name
3. health_part_status_id
4. created_by
5. created_time
6. updated_by
7. updated_time
Table 3:- appt_health_part_mapping
1. appt_id
2. client_id
4. health_part_id
5. health_part_status_id
6. value
7. created_time
Use cases:-
- Screen to store appointment with details like doctor, client, appointment_time, notes
- Screen to show appointments in a weekly calendar for the logged in doctor
- Screen for upcoming appointments for the day
- Screen to store all the details after the appointment like all observations
So, during the appointment, there are few essentials which needs to be captured for all the appointments. And there are few details based on appointment like for some appointment, eyes and ears and for some appointment lungs and ears details. Currently, the system is capturing few parts and that might change in the future.
So, Considering all the above facts, I have decided to go with the final approach.
Any thoughts on this?
Also, I may need to show the weight trends and height trends since birth.
Will the current design suffice?