summaryrefslogtreecommitdiff
path: root/assignments/final
diff options
context:
space:
mode:
Diffstat (limited to 'assignments/final')
-rw-r--r--assignments/final/README.md2
-rw-r--r--assignments/final/erd.pngbin66955 -> 66955 bytes
-rw-r--r--assignments/final/module-1.pngbin28945 -> 30895 bytes
-rw-r--r--assignments/final/module-1.puml72
4 files changed, 38 insertions, 36 deletions
diff --git a/assignments/final/README.md b/assignments/final/README.md
index 2a489d1..d73221a 100644
--- a/assignments/final/README.md
+++ b/assignments/final/README.md
@@ -119,7 +119,7 @@ requiring an associated outpatient owner entity.
**Draw an EER diagram to accurately represent this set of requirements. State any assumption you had to make in developing the diagram.**
![EER](./module-1.png)
- ![ERD](./erd.png)
+ <!--![ERD](./erd.png)-->
I have chosen to model the different types of staff as subclasses of a `Staff` class.
Each of the different types of Staff can have different skills modelled as a text field
diff --git a/assignments/final/erd.png b/assignments/final/erd.png
index 4ed5189..a382e7f 100644
--- a/assignments/final/erd.png
+++ b/assignments/final/erd.png
Binary files differ
diff --git a/assignments/final/module-1.png b/assignments/final/module-1.png
index 55a88d8..44d11ec 100644
--- a/assignments/final/module-1.png
+++ b/assignments/final/module-1.png
Binary files differ
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