Software Engineering (2011 - 9th Edition)
Software Engineering (2011 - 9th Edition)
I introduce each of these systems in this chapter, with more information about
each of them available on the Web.
Insulin Reservoir
Needle
Pump Clock
Assembly
Display1 Display2
Insulin
Dose
Figure 1.4 shows the hardware components and organization of the insulin
Figure 1.5 Activity
model of the insulin pump. To understand the examples in this book, all you need to know is that the
pump blood sensor measures the electrical conductivity of the blood under different
conditions and that these values can be related to the blood sugar level. The
insulin pump delivers one unit of insulin in response to a single pulse from a con-
troller. Therefore, to deliver 10 units of insulin, the controller sends 10 pulses to
the pump. Figure 1.5 is a UML activity model that illustrates how the software
transforms an input blood sugar level to a sequence of commands that drive the
insulin pump.
Clearly, this is a safety-critical system. If the pump fails to operate or does not
operate correctly, then the user’s health may be damaged or they may fall into a
coma because their blood sugar levels are too high or too low. There are, therefore,
two essential high-level requirements that this system must meet:
MHC-PMS Server
The system must therefore be designed and implemented to ensure that the sys-
tem always meets these requirements. More detailed requirements and discussions
of how to ensure that the system is safe are discussed in later chapters.
The nature of mental health problems is such that patients are often disorganized
so may miss appointments, deliberately or accidentally lose prescriptions and med-
ication, forget instructions, and make unreasonable demands on medical staff. They
may drop in on clinics unexpectedly. In a minority of cases, they may be a danger to
themselves or to other people. They may regularly change address or may be home-
less on a long-term or short-term basis. Where patients are dangerous, they may need
to be ‘sectioned’—confined to a secure hospital for treatment and observation.
Users of the system include clinical staff such as doctors, nurses, and health visi-
tors (nurses who visit people at home to check on their treatment). Nonmedical users
include receptionists who make appointments, medical records staff who maintain
the records system, and administrative staff who generate reports.
The system is used to record information about patients (name, address, age, next
of kin, etc.), consultations (date, doctor seen, subjective impressions of the patient,
etc.), conditions, and treatments. Reports are generated at regular intervals for med-
ical staff and health authority managers. Typically, reports for medical staff focus on
information about individual patients whereas management reports are anonymized
and are concerned with conditions, costs of treatment, etc.
The key features of the system are:
1. Individual care management Clinicians can create records for patients, edit the
information in the system, view patient history, etc. The system supports data
summaries so that doctors who have not previously met a patient can quickly
learn about the key problems and treatments that have been prescribed.
2. Patient monitoring The system regularly monitors the records of patients that
are involved in treatment and issues warnings if possible problems are detected.
Therefore, if a patient has not seen a doctor for some time, a warning may be
issued. One of the most important elements of the monitoring system is to keep
track of patients who have been sectioned and to ensure that the legally required
checks are carried out at the right time.
3. Administrative reporting The system generates monthly management reports
showing the number of patients treated at each clinic, the number of patients
who have entered and left the care system, number of patients sectioned, the
drugs prescribed and their costs, etc.
Two different laws affect the system. These are laws on data protection that govern
the confidentiality of personal information and mental health laws that govern the com-
pulsory detention of patients deemed to be a danger to themselves or others. Mental
health is unique in this respect as it is the only medical speciality that can recommend
the detention of patients against their will. This is subject to very strict legislative safe-
guards. One of the aims of the MHC-PMS is to ensure that staff always act in accor-
dance with the law and that their decisions are recorded for judicial review if necessary.
As in all medical systems, privacy is a critical system requirement. It is essential that
patient information is confidential and is never disclosed to anyone apart from author-
ized medical staff and the patient themselves. The MHC-PMS is also a safety-critical
22 Chapter 1 ■ Introduction
«system» «system»
Weather Station Data Management
and Archiving
«system»
Figure 1.7 The weather Station Maintenance
station’s environment
system. Some mental illnesses cause patients to become suicidal or a danger to other
people. Wherever possible, the system should warn medical staff about potentially sui-
cidal or dangerous patients.
The overall design of the system has to take into account privacy and safety
requirements. The system must be available when needed otherwise safety may be
compromised and it may be impossible to prescribe the correct medication to patients.
There is a potential conflict here—privacy is easiest to maintain when there is only a
single copy of the system data. However, to ensure availability in the event of server
failure or when disconnected from a network, multiple copies of the data should be
maintained. I discuss the trade-offs between these requirements in later chapters.
1. The weather station system This is responsible for collecting weather data,
carrying out some initial data processing, and transmitting it to the data manage-
ment system.
2. The data management and archiving system This system collects the data from
all of the wilderness weather stations, carries out data processing and analysis,
and archives the data in a form that can be retrieved by other systems, such as
weather forecasting systems.
3. The station maintenance system This system can communicate by satellite
with all wilderness weather stations to monitor the health of these systems and
provide reports of problems. It can update the embedded software in these
systems. In the event of system problems, this system can also be used to
remotely control a wilderness weather system.
1.3 ■ Case studies 23
In Figure 1.7, I have used the UML package symbol to indicate that each system
is a collection of components and have identified the separate systems, using the
UML stereotype «system». The associations between the packages indicate there is
an exchange of information but, at this stage, there is no need to define them in any
more detail.
Each weather station includes a number of instruments that measure weather
parameters such as the wind speed and direction, the ground and air temperatures,
the barometric pressure, and the rainfall over a 24-hour period. Each of these instru-
ments is controlled by a software system that takes parameter readings periodically
and manages the data collected from the instruments.
The weather station system operates by collecting weather observations at fre-
quent intervals—for example, temperatures are measured every minute. However,
because the bandwidth to the satellite is relatively narrow, the weather station carries
out some local processing and aggregation of the data. It then transmits this aggre-
gated data when requested by the data collection system. If, for whatever reason, it is
impossible to make a connection, then the weather station maintains the data locally
until communication can be resumed.
Each weather station is battery-powered and must be entirely self-contained—there
are no external power or network cables available. All communications are through a rel-
atively slow-speed satellite link and the weather station must include some mechanism
(solar or wind power) to charge its batteries. As they are deployed in wilderness areas,
they are exposed to severe environmental conditions and may be damaged by animals.
The station software is therefore not just concerned with data collection. It must also:
1. Monitor the instruments, power, and communication hardware and report faults
to the management system.
2. Manage the system power, ensuring that batteries are charged whenever the
environmental conditions permit but also that generators are shut down in
potentially damaging weather conditions, such as high wind.
3. Allow for dynamic reconfiguration where parts of the software are replaced
with new versions and where backup instruments are switched into the system
in the event of system failure.