Skip to content

Commit

Permalink
Merge pull request #179 from yentheng0110/YenTheng-ModifyObjectDiagra…
Browse files Browse the repository at this point in the history
…msForBeforeAddVisitAndAfter

Create one object diagram for before addVisit command, one object diagram for after addVisit command
G13nd0n authored Oct 30, 2024
2 parents fbb366a + 5c297b9 commit 3d39271
Showing 5 changed files with 62 additions and 8 deletions.
Binary file added docs/ObjectDiagramAfterAddVisit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions docs/ObjectDiagramAfterAddVisit.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@startuml
'https://plantuml.com/object-diagram

object "<u> :Main</u>" as Main
object "<u> in:Scanner</u>" as Scanner
object "<u> records:Records</u>" as Records
object "<u> appointmentRecord:AppointmentRecord</u>" as AppointmentRecord
object "<u> :FileHandler</u>" as FileHandler
object "<u> commandHandler:CommandHandler</u>" as CommandHandler

object "<u> targetPatient:Patient</u>" as Patient {
name = Patricia Chan
nric = S9870789B
sex = Female
dateOfBirth = 01111998
phoneNumber = 98097890
homeAddress = Bukit Batok East Avenue 3
allergies = [Peanuts]
medicalHistories = [Hypertension, Breast Cancer]
}

object "<u> existingVisit:Visit</u>" as Visit1 {
visitDate = 22-10-2024 18:00
diagnoses = [Asthma, Cough]
medications = [Panadol, Antibiotics]
}

object "<u> newVisit:Visit</u>" as Visit2 {
visitDate = 29-10-2024 10:00
diagnoses = [Gastric]
medications = [Gaviscon, Paracetamol]
}

Main --> Scanner
Main --> Records
Main --> AppointmentRecord
Main --> FileHandler
Main --> CommandHandler
Patient --> Visit1
Patient --> Visit2
CommandHandler --> Records
Records --> Patient

@enduml
Binary file added docs/ObjectDiagramBeforeAddVisit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 18 additions & 7 deletions docs/AddVisit.puml → docs/ObjectDiagramBeforeAddVisit.puml
Original file line number Diff line number Diff line change
@@ -8,19 +8,30 @@ object "<u> appointmentRecord:AppointmentRecord</u>" as AppointmentRecord
object "<u> :FileHandler</u>" as FileHandler
object "<u> commandHandler:CommandHandler</u>" as CommandHandler

object "<u> newVisit:Visit</u>" as Visit {
visitDate = 29-10-2024 10:00
diagnoses = [Gastric]
medications = [Gaviscon, Paracetamol]
object "<u> targetPatient:Patient</u>" as Patient {
name = Patricia Chan
nric = S9870789B
sex = Female
dateOfBirth = 01111998
phoneNumber = 98097890
homeAddress = Bukit Batok East Avenue 3
allergies = [Peanuts]
medicalHistories = [Hypertension, Breast Cancer]
}

object "<u> :Visit</u>" as Visit {
visitDate = 22-10-2024 18:00
diagnoses = [Asthma, Cough]
medications = [Panadol, Antibiotics]
}

Main --> Scanner
Main --> Records
Main --> AppointmentRecord
Main --> FileHandler
Main --> CommandHandler
CommandHandler --> FileHandler
Patient --> Visit
CommandHandler --> Records
CommandHandler --> Visit
Records --> Patient

@enduml
@enduml
1 change: 0 additions & 1 deletion docs/Records.puml
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
'https://plantuml.com/class-diagram

class Records {
-patients: ArrayList<Patient>
+Records()
+addPatient(patient: Patient): void
+getPatients(): ArrayList<Patient>

0 comments on commit 3d39271

Please sign in to comment.