Phase 3 — Constraints Summary¶
This section summarizes the logical integrity constraints carried into implementation.
1. Keys and Uniqueness¶
Primary keys:
USER.user_idCLINIC.clinic_idHEALTH_CONDITION.condition_idAWARENESS_CONTENT.content_idFAMILY_MEMBER.member_idMEDICAL_HISTORY.event_idHEALTH_EVENT.event_idRISK_ALERT.alert_idAPPOINTMENT.appointment_id
Unique constraints:
USER.emailHEALTH_CONDITION.condition_name
2. Referential Integrity¶
Foreign key references:
FAMILY_MEMBER.user_id->USER.user_idMEDICAL_HISTORY.member_id->FAMILY_MEMBER.member_idMEDICAL_HISTORY.condition_id->HEALTH_CONDITION.condition_idHEALTH_EVENT.member_id->FAMILY_MEMBER.member_idHEALTH_EVENT.condition_id->HEALTH_CONDITION.condition_idRISK_ALERT.member_id->FAMILY_MEMBER.member_idAPPOINTMENT.user_id->USER.user_idAPPOINTMENT.clinic_id->CLINIC.clinic_id
3. Domain Constraints (ENUM)¶
FAMILY_MEMBER.blood_type->A+,A-,B+,B-,AB+,AB-,O+,O-FAMILY_MEMBER.gender->Male,FemaleMEDICAL_HISTORY.severity->Low,Medium,HighHEALTH_EVENT.severity->Low,Medium,HighRISK_ALERT.risk_level->Low,Medium,HighRISK_ALERT.status->New,Viewed,ResolvedAPPOINTMENT.status->Scheduled,Completed,CancelledAWARENESS_CONTENT.content_type->Article,Video,Infographic
4. Validation Constraints¶
HEALTH_EVENT.onset_agemust beNULLor between0and120.RISK_ALERT.resolved_datemust beNULLor greater than/equal tocreated_date.
Constraint Outcome¶
These constraints enforce entity integrity, referential integrity, controlled domains, and value-level validation across the Phase 3 logical design.