Patient Records Exercise

The Five XML Commandments

  1. All elements must be self closing or have a closing tag
  2. A tag pair must not overlap another tag pair
  3. The document must have a single root element
  4. Tag names are case sensitive
  5. Attribute values must appear in quotes in the opening tag

Patient Records Exercise

A clinic uses XML to transmit data about patients it has treated to its local hospital.

Mrs Alison Avocado (patient id 120372) had a consultation with Dr Claudio on the 20/11/2001 and then had her in-growing toenails treated on the 23/11/2001.

Miss Beatrice Beetroot (patient id 234562) had consultations with Dr Duke on the 21/11/2001 and the 23/11/2001 and with Dr Claudio on the 28/11/2001.

Data security and integrity is very important and so the clinic goes through a process of double checking the data to confirm it. At the current time the data for Mrs Avocado has been confirmed whereas the data for Miss Beetroot hasn't yet. It is important that the hospital knows which data has been confirmed and which hasn't.

  1. Write a single well-formed XML document to represent the information given below. You will need to spend some time deciding what tags to use and what information, if any, to represent using attributes.

  2. Draw a hierarchical tree to represent your XML document.


© k.mcmanus 2014
Valid XHTML 1.1! . Valid CSS . WCAG priority 3 approved