Changes between Version 3 and Version 4 of ConceptualModel


Ignore:
Timestamp:
05/13/26 14:21:59 (2 weeks ago)
Author:
236021
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ConceptualModel

    v3 v4  
    32325. **Admin** – entity that stores administrator data 
    3333- admin_id (PK, bigint)
     34- username (text)
     35- name (text)
     36- lastname (text)
     37- email (text)
    3438
    35396. **Lab_Technician** – entity that stores lab technician data 
    3640- technician_id (PK, bigint)
     41- username (text)
     42- name (text)
     43- lastname (text)
     44- email (text)
    3745
    38467. **Patients** – entity that stores patients 
     
    7280- doctor_id (FK, bigint)
    7381
    74 12. **Diagnosis_Results** – entity that stores diagnosis results 
    75 - result_id (PK, bigint) 
    76 - result_description (text) 
    77 - diagnosis_id (FK, bigint)
    78 
    79 13. **Procedures** – entity that stores medical procedures 
     8212. **Procedures** – entity that stores medical procedures 
    8083- procedure_id (PK, bigint) 
    8184- procedure_type (text) 
     
    8689- diagnosis_id (FK, bigint)
    8790
    88 14. **Procedure_Results** – entity that stores procedure results 
     9113. **Procedure_Results** – entity that stores procedure results 
    8992- result_id (PK, bigint) 
    9093- result_description (text) 
     
    9295- procedure_id (FK, bigint)
    9396
    94 15. **Prescriptions** – entity that stores prescriptions 
     9714. **Prescriptions** – entity that stores prescriptions 
    9598- prescription_id (PK, bigint) 
    9699- medication_name (text) 
     
    102105- patient_id (FK, bigint)
    103106
    104 16. **Prescription_Restriction** – entity that stores prescription restrictions 
     10715. **Prescription_Restriction** – entity that stores prescription restrictions 
    105108- restriction_id (PK, bigint) 
    106109- allowed (boolean) 
    107110- prescription_id (FK, bigint)
    108111
    109 17. **Lab_Tests** – entity that stores lab tests 
     11216. **Lab_Tests** – entity that stores lab tests 
    110113- test_id (PK, bigint) 
    111114- test_name (text) 
     
    115118- technician_id (FK, bigint)
    116119
    117 18. **Lab_Results** – entity that stores lab results 
     12017. **Lab_Results** – entity that stores lab results 
    118121- result_id (PK, bigint) 
    119122- results (text) 
     
    121124- test_id (FK, bigint)
    122125
    123 19. **Medical_Records** – entity that stores medical records 
     12618. **Medical_Records** – entity that stores medical records 
    124127- record_id (PK, bigint) 
    125128- doctor_notes (text) 
     
    127130- doctor_id (FK, bigint)
    128131
    129 20. **Referrals** – entity that stores referrals 
     13219. **Referrals** – entity that stores referrals 
    130133- referral_id (PK, bigint) 
    131134- reason (text) 
     
    134137- patient_id (FK, bigint)
    135138
    136 21. **Medical_Report** – entity that stores medical reports 
     13920. **Medical_Report** – entity that stores medical reports 
    137140- report_id (PK, bigint) 
    138141- description (text) 
     
    141144- doctor_id (FK, bigint)
    142145
    143 22. **Billing** – entity that stores billing information 
     14621. **Billing** – entity that stores billing information 
    144147- bill_id (PK, bigint) 
    145148- payment_status (text) 
    146149- payment_date (date) 
    147150- patient_id (FK, bigint)
     151
     152=== Relations
     153
     1541. **is** (Doctor_Levels ↔ Doctors, 1:N)
     155Each doctor is assigned one level, while a level can belong to many doctors.
     156
     1572. **has_specialization** (Doctors ↔ Doctor_Specialization, 1:N)
     158Each doctor has one specialization, while a specialization can apply to many doctors.
     159
     1603. **works_in** (Departments ↔ Doctors, 1:N)
     161Each doctor works in one department, while a department employs many doctors.
     162
     1634. **has_allergies** (Patients ↔ Allergies, M:N)
     164Patients can have multiple allergies, and the same allergy can affect many patients.
     165
     1665. **contains_allergies** (Allergies ↔ Medical_Record, M:N)
     167A medical record can contain multiple allergies, while the same allergy can appear in multiple medical records.
     168
     1696. **affects_prescription** (Allergy ↔ Prescription_Restriction, M:N)
     170An allergy can be associated with multiple prescription restrictions, while the same restriction can apply to multiple allergies.
     171
     1727. **has_symptoms** (Patients ↔ Symptoms, M:N)
     173Patients can report multiple symptoms, and each symptom can be reported by many patients.
     174
     1758. **indicates** (Symptoms ↔ Diagnosis, M:N)
     176A diagnosis can be associated with multiple symptoms, while the same symptom can appear in multiple diagnoses.
     177
     1789. **contains_symptoms** (Medical_Record ↔ Symptoms, 1:N)
     179Each medical record can contain multiple symptoms, while each symptom entry belongs to one medical record.
     180
     18110. **books** (Patients ↔ Appointments, 1:N)
     182A patient can book multiple appointments, while each appointment belongs to one patient.
     183
     18411. **attends** (Doctors ↔ Appointments, 1:N)
     185A doctor can attend multiple appointments, while each appointment is handled by one doctor.
     186
     18712. **updates** (Appointment ↔ Medical_Record, 1:N)
     188An appointment can generate multiple updates in the medical record, while each update is associated with one appointment.
     189
     19013. **diagnoses** (Doctors ↔ Diagnosis, 1:N)
     191A doctor can make multiple diagnoses, while each diagnosis is made by one doctor.
     192
     19314. **performs_allowed** (Doctor_Specialization ↔ Procedure, M:N)
     194A doctor specialization can be associated with multiple procedures it allows, while the same procedure can be associated with multiple doctor specializations.
     195
     19615. **requires** (Diagnosis ↔ Procedure, M:N)
     197A diagnosis can require multiple procedures, while the same procedure can be required by multiple diagnoses.
     198
     19916. **produces** (Procedure ↔ Procedure_Result, 1:N)
     200A procedure can produce multiple results, while each result belongs to one procedure.
     201
     20217. **performs** (Department ↔ Procedure, M:N)
     203A department can perform multiple procedures, while the same procedure can be performed in multiple departments.
     204
     20518. **billed_for** (Procedure ↔ Billing, M:N)
     206A billing record can include multiple procedures, while the same procedure can appear in multiple billing records.
     207
     20819. **prescribes** (Doctors ↔ Prescriptions, 1:N)
     209A doctor can write multiple prescriptions, while each prescription is written by one doctor.
     210
     21120. **restricts** (Prescriptions ↔ Prescription_Restriction, 1:N)
     212A prescription can have multiple restrictions, while each restriction belongs to one prescription.
     213
     21421. **does_test** (Patients ↔ Lab_Tests, 1:N)
     215A patient can take multiple lab tests, while each test belongs to one patient.
     216
     21722. **orders_test** (Doctors ↔ Lab_Tests, 1:N)
     218A doctor can order multiple lab tests, while each lab test is ordered by one doctor.
     219
     22023. **conducts** (Lab_Technician ↔ Lab_Tests, 1:N)
     221A lab technician can conduct multiple tests, while each test is conducted by one technician.
     222
     22324. **produces_test** (Lab_Tests ↔ Lab_Results, 1:N)
     224A lab test can produce multiple results, while each result belongs to one test.
     225
     22625. **billed_for_test** (LabTest ↔ Billing, M:N)
     227A billing record can include multiple lab tests, while the same lab test can appear in multiple billing records.
     228
     22926. **has** (Patient ↔ Medical_Record, 1:1)
     230Each patient has one medical record, and each medical record belongs to one patient.
     231
     23227. **updates** (Doctors ↔ Medical_Record, M:N)
     233Doctors can update multiple medical records, and records can be updated by multiple doctors.
     234
     23528. **issues** (Doctors ↔ Referral, 1:N)
     236A doctor can issue multiple referrals, while each referral is issued by one doctor.
     237
     23829. **creates** (Doctors ↔ Medical_Report, 1:N)
     239A doctor can create multiple medical reports, while each report is created by one doctor.
     240
     24130. **has** (Patient ↔ Medical_Report, 1:N)
     242A patient can have multiple medical reports, while each report belongs to one patient.
     243
     24431. **updates** (Medical_Record ↔ Medical_Report, 1:N)
     245A medical record can generate multiple reports, while each report is based on one record.
     246
     24732. **isn’t_allowed** (Medical_Record ↔ Prescription_Restriction, 1:M)
     248Each medical record can contain multiple prescription restrictions, while each restriction belongs to one medical record.
     249
     25033. **processes** (Admin ↔ Billing, 1:N)
     251An admin can process multiple billing records, while each bill is processed by one admin.
     252
     25334. **relates_to** (Diagnosis ↔ Medical_Record, M:N)
     254Diagnoses can relate to multiple medical records, and records can include multiple diagnoses.
     255
     25635. **linked_to** (Prescription ↔ Medical_Record, M:N)
     257Prescriptions can be linked to multiple medical records, and records can include multiple prescriptions.
     258
     25936. **includes_prescription** (Medical_Report ↔ Prescription, M:N)
     260Medical reports can include multiple prescriptions, and prescriptions can appear in multiple reports.
     261
     26237. **includes_lab_results** (Medical_Report ↔ Lab_Results, M:N)
     263Medical reports can include multiple lab results, and results can appear in multiple reports.
     264
     26538. **based_on** (Referral ↔ Appointment, 1:N)
     266A referral can serve as the basis for multiple appointments, while each appointment is associated with one referral.
     267
     26839. **re_visits** (Appointment ↔ Appointment, 1:N)
     269An appointment can result in multiple follow-up appointments, while each follow-up appointment is associated with one previous appointment.
     270
     27140. **documents** (Medical_Report ↔ Billing, 1:N)
     272A medical report can generate multiple billing records, while each billing record is associated with one medical report.