summaryrefslogtreecommitdiff
path: root/assignments/final/module-1.puml
diff options
context:
space:
mode:
Diffstat (limited to 'assignments/final/module-1.puml')
-rw-r--r--assignments/final/module-1.puml72
1 files changed, 37 insertions, 35 deletions
diff --git a/assignments/final/module-1.puml b/assignments/final/module-1.puml
index c0d33fc..5b2819b 100644
--- a/assignments/final/module-1.puml
+++ b/assignments/final/module-1.puml
@@ -2,6 +2,16 @@
hide circle
skinparam linetype ortho
+entity "Account" as account {
+ id : number << generated >>
+ --
+ name : text
+ address : text
+ birth_date : datetime
+ phone_number : text
+ pager_number : text
+}
+
entity "Bed" as beds {
id : number << generated >>
--
@@ -17,11 +27,6 @@ entity "CareCentre" as care_centres {
nurse_in_charge : number <<FK>>
}
-entity "Shift" as shifts {
- started_at : datetime
- ended_at : datetime
-}
-
entity "Consumption" as consumptions {
id : number << generated >>
--
@@ -30,14 +35,6 @@ entity "Consumption" as consumptions {
total_cost : decimal
}
-entity "Staff" as staff {
- employee_id : number << generated >>
- --
- type : text
- type : number
- hired_at : datetime
-}
-
entity "Item" as items {
id : number << generated >>
--
@@ -53,29 +50,36 @@ entity "Laboratory" as laboratories {
}
entity "Nurse" as nurses {
- certificate : text
}
entity "Patient" as patients {
contacted_at : datetime
}
-entity "Account" as account {
+entity "Physician" as physicians {
+}
+
+entity "Qualification" as qualifications {
id : number << generated >>
--
- name : text
- address : text
- birth_date : datetime
- phone_number : text
+ staff_id : number <<FK>>
+ name : varchar(255)
}
-entity "Physician" as physicians {
- specialty : text
- pager_number : text
+entity "Shift" as shifts {
+ started_at : datetime
+ ended_at : datetime
+}
+
+entity "Staff" as staff {
+ id : number << generated >>
+ --
+ type : text
+ type : number
+ hired_at : datetime
}
entity "Technician" as technicians {
- skill : text
}
entity "Treatment" as treatments {
@@ -95,7 +99,6 @@ entity "Visit" as visits {
}
entity "Volunteer" as volunteers {
- skill : text
}
' relationships
@@ -106,23 +109,22 @@ entity "Volunteer" as volunteers {
beds ||--o| patients
beds }|--|| care_centres
-consumptions }|--|| items
-consumptions }|--|| patients
-patients }|--|| physicians
-treatments }|--|| patients
-treatments }|--|| physicians
-visits }|--|| patients
-care_centres ||--|| nurses
care_centres ||--|{ shifts
+care_centres ||--|| nurses
+consumptions }o--|| items
+consumptions }o--|| patients
+laboratories ||--|{ staff
+patients }o--|| physicians
+qualifications ||--|{ staff
staff ||--o{ shifts
-laboratories ||--|{ technicians
+treatments }o--|| patients
+treatments }o--|| physicians
+visits }|--|| patients
-account ||--|| staff
account ||--|| patients
-
+account ||--|| staff
staff <|-- nurses
staff <|-- physicians
staff <|-- technicians
staff <|-- volunteers
-
@enduml