In: Computer Science
Create two data documents containing a patientRecord
– one in XML and another in JSON
format
Your patientRecord must contain the following data:
-A patient’s name & ID number
-The date of his/her last appointment & the date of the last update
-The patient’s allergies – you must include 2 – one for a food allergy and one for a drug
allergy
-The patient’s preference – you must include 2 – one for a doctor and one for his/her
method of contact (which would have a value of text, phone, or email)
The XML data for the patient record is:
{
"patientRecord": {
"patient_name": "john doe",
"patient_id": "12345",
"appointment_date": "2019-10-08T12:30:00",
"updated_date": "2019-10-05T12:30:00",
"allergies": {
"food": "garlic",
"drug": "amoxicillin"
},
"preferences": {
"doctor": "Dr Mary Jane",
"communication": "phone"
}
}
}
The XML format of the same data is:
<?xml version="1.0"
encoding="UTF-8"?>
<root>
<patientRecord>
<allergies>
<drug>amoxicillin</drug>
<food>garlic</food>
</allergies>
<appointment_date>2019-10-08T12:30:00</appointment_date>
<patient_id>12345</patient_id>
<patient_name>john
doe</patient_name>
<preferences>
<communication>phone</communication>
<doctor>Dr
Mary Jane</doctor>
</preferences>
<updated_date>2019-10-05T12:30:00</updated_date>
</patientRecord>
</root>