The Hospital Domain Structure
All the scenarios described in the following use the same domain structure that is shown in the Figure below. This structure represents a Hospital organization where carers and hospital personnel are contained in the the personnel subdomain and patients are organised in the patient subdomain. Personnel is further organised according to specialisation and to the location where on duty (such as a ward and /or an emergency room).
In the scenarios that will follow we make use of three managed objects, Patient, Nurse, and Researcher.
The Patient object is used to represent patient information. It has three fields, name, age and symptom, and it provides the following two methods to retrieve a patient's information:
getRecord(nurselevel)
that requires the nurse level and returns a string containing all the information regarding a patient. This string is constructed by a concatenation of all the patient fields (name+age+symptom).
getData()
instead only returns a string that contains the age and the symptom of the patient.
The patient managed object also provides a GUI shown below:
The Patient Details panel shows the details of a the patient. The Patient Output panel provides a text area that outputs information of each executed operation. For instance, in the case of the Figure above, the text area says that a getRecord operation is invoked. The content of the returned record is provided as well.
The Nurse managed objects has a field nurseLevel representing the nurse experience and a method
checkRecord(patientPath, nurseLevel)
that retrieves the record of a patient in the patientPath invoking the patient's method getRecord(). The patientPath specifies the path from the root domain to the patient managed object.
As for the patient, the nurse is also provided of a GUI that is shown below:
The Nurse GUI provides an Input Fields panel, where the patient path and the nurse level can be inserted by a user. The nurse level value can be omitted during an invocation. If this is the case, the default level is used (that is 4, as shown in the figure above). The Nurse Output panel shows information about the operation that is performed, such as the path of the patient managed object that is going to be invoked and the level of the nurse together with the result of operation. If the operation succeeds, the value of the record is shown. Otherwise, information is provided about the cause of the operation failure.
Finally, the Researcher managed object has the following method:
checkData(patientPath)
that invokes the patient's method getData() of a given patient specified by patientPath.
The researcher managed object provides a GUI and a screenshot is shown below:
The Input Fields panel allows a user to specify the patient from which retrieving the data. The Output panel outputs the operation being executed. In this instance, the researcher got the data of patient2 in ward1.
