System Modeling System Perspectives
System Modeling System Perspectives
in the textbook
1 2
7 8
Fig 5.1: The context of the MHC-PMS UML Activity Diagram
Dynamic view
«system»
Patient record
• Used to show how the system is used in
«system»
system business processes
«system»
Management
•
Admissions
reporting
system
system Shows activity and flow of control
«system»
MHC-PMS
«system»
«system»
Prescription
filled circle: start
HC statistics
system system filled concentric circle: finish
«system»
Appointments rounded rectangles: activities
system
rectangles: other objects (ie the different systems in fig 5.2)
arrows: flow of work
diamonds: branch (and merge)
Note: <<system>> is an example of a “stereotype” in UML
guards: condition under which flow is taken out of branch
A mechanism to categorize an element in some way
solid bar: activity coordination/concurrency control (fork, join)
9 10
• Uses:
Confirm police station
detention
decision Find secure
place
[dangerous]
[available]
Transfer to
secure hospital
Inform
social care
- between user and system: developing requirements
Inform
patient of Inform next
- between system components: help to understand flow of
rights of kin
control in an object oriented system, used in design
Record Update
Admit to
«system»
«system»
Admissions
MHC-PMS - represent user-system interactions
MHC-PMS system
• Main purpose: requirements elicitation + analysis Example of a UML Use case diagram
• Diagram is supplemented with further details Note: arrows are not part of UML, but shows direction of data flow
describing the use case: Note: primary actor on left, supporting actor on right
- simple textual description or
- structured description (form/template/table) or
- sequence diagram(s)
13 14
15 16
5.2.2 Sequence Diagram Fig 5.6: View patient information
Example of a UML Sequence diagram
• Models the interactions between actors and/or
objects or components within the system in detail Medical Receptionist
A window from the user interface
• Can be used to show the sequence of interactions P: PatientInfo D: MHCPMS-DB AS: Authorization
• Static model
Patient
1 1 Patient
record
• Shows classes and associations between them
• Uses: Two classes and one association
(a one-to-one relationship)
- developing requirements: model real-world objects
- during design phase: add implementation objects
1 1
• Simple class diagrams: Patient
Instructor
1..* Patient
Course
record
Section
- Box represents a class (with a name)
- Lines show associated between classes (name optional) Two classes and one association
- Number at each end to show how many objects can be (a one-to-many relationship)
involved in the association (multiplicity)
How many instructors does a Course Section have?
21 22
Consultant Consultation
1
referred-to Doctors
1..* Date
1..* 1..* 1..* 1 Time
General Clinic
Condition Patient
practitioner Attributes, Note: Don’t record
diagnosed- referred-by Reason
with 1..* types optional Medication prescribed associated classes here
attends Treatment prescribed
1..* Voice notes
prescribes Transcript
Consultation Medication ...
1..* 1..*
1..*
runs prescribes New ( )
Treatment Operations, param + Prescribe ( )
1..4 RecordNotes ( )
1..* return types optional
Hospital Transcribe ( )
Doctor ...
23 24
5.3.2 Generalization Fig 5.11: Generalization hierarchy
Hospital doctor General practitioner • When implemented, the composite usually has
Staff # Practice instance variables for each “part” object
Pager # Address
27 28
Fig 5.13: Aggregation association 5.4 Behavioral models
• Represent dynamic behavior of the system as it is
Class
Patient record executing
Section
29 30
- all the states an (object or component or system) can get into do: set power
= 600
•
do: display
Useful when object/component/system is changed by Full Set time Operation
time
power do: get number do: operate
exit: set time oven
events (real time and embedded systems, etc.) Half
Half
power
Door
power Cancel
Timer closed
•
Start
Components of a state diagram Door
open
Enabled
Door
Waiting
Half power open
- Rounded rectangles: system states do: set power
= 300
Door
closed
do: display
'Ready'
do: display
time
35