At an early stage in the specification of a system, you should decide on the system boundaries.Therefore, in Figure 5.2, the activities to inform social care and the patient's next of kin, and to update the detention regis- ter may be concurrent.For example, a system boundary may be delib- erately positioned so that the analysis process can all be carried out on one site; it may be chosen so that a particularly difficult manager need not be consulted; it may be positioned so that the system cost is increased and the system development divi- sion must therefore expand to design and implement the system.This involves working with system stakeholders to decide what func- tionality should be included in the system and what is provided by the system's envi- ronment.You may decide that automated support for some business processes should be implemented but others should be manual processes or supported by dif- ferent systems.In developing the specification for this system, you have to decide whether the sys- tem should focus exclusively on collecting information about consultations (using other systems to collect personal information about patients) or whether it should also collect personal patient information.Such detention is subject to strict legal safeguards--for example, the decision to detain a patient must be regularly reviewed so that people are not held indefinitely without good reason.One of the functions of the MHC-PMS is to ensure that such safeguards are implemented.Rectangles with round corners represent activities, that is, the spe- cific sub-processes that must be carried out.For example, where an automated system is replacing an existing manual or computerized system, the environment of the new system is usually the same as the existing system's environment.In other cases, there is more flexibility, and you decide what constitutes the boundary between the system and its environment during the requirements engineering process.Once some decisions on the boundaries of the system have been made, part of the analysis activity is the definition of that context and the dependencies that a system has on its environment.The system is also connected to systems for management reporting and hospital bed allocation and a statistics system that col- lects information for research.Context models normally show that the environment includes several other auto- mated systems.You should look at possible overlaps in functionality with existing systems and decide where new functionality should be implemented.This system is intended to manage information about patients attending mental health clinics and the treatments that have been prescribed.Social and organizational concerns may mean that the position of a system boundary may be determined by non-technical factors.From Figure 5.1, you can see that the MHC-PMS is connected to an appointments system and a more general patient record system with which it shares data.Finally, it makes use of a prescription system to gen- erate prescriptions for patients' medication.I have indicated that these are separate systems using the UML stereotype feature.These deci- sions should be made early in the process to limit the system costs and the time needed for understanding the system requirements and design.For example, say you are developing the specification for the patient information system for mental healthcare.If these systems are unavailable, then the MHC-PMS cannot be used.All of these relations may affect the requirements and design of the system being defined and must be taken into account.These describe human and automated processes in which particular software systems are used.Figure 5.2 is a model of an important system process that shows the processes in which the MHC-PMS is used.They may therefore have to be detained against their will in a hospital so that treatment can be adminis- tered.In a UML activity diagram, arrows represent the flow of work from one activity to another.Arrows may be annotated with guards that indicate the condition when that flow is taken.In some cases, the boundary between a system and its environment is relatively clear.The advantage of relying on other systems for patient information is that you avoid duplicating data.The major disadvantage, however, is that using other systems may make it slower to access information.The definition of a system boundary is not a value-free judgment.Normally, producing a simple architectural model is the first step in this activity.External systems might produce data for or consume data from the system.They might be physically co-located or located in separate buildings.Therefore, simple context models are used along with other models, such as business process models.Figure 5.2 is a UML activity diagram.Activity diagrams are intended to show the activities that make up a system process and the flow of control from one activity to another.You may include objects in activity charts.A solid bar is used to indicate activity coordination.When the flow from more than one activity leads to a solid bar then all of these activities must be com- plete before progress is possible.When the flow from a solid bar leads to a number of activities, these may be executed in parallel.Figure 5.1 is a simple context model that shows the patient information system and the other systems in its environment.