📖 JSON and XML
Structured data is organized according to defined fields and rules so software can store, search, and process it. In healthcare, examples include vital signs, diagnoses, medications, laboratory results, and allergies. A structure makes consistent exchange easier, but it does not guarantee that the entered data is complete or correct.
The main building blocks in HL7® FHIR®1 are called resources. A resource can be represented in formats such as JSON or XML.
JSON and XML are widely used beyond healthcare. FHIR uses familiar formats so systems can represent the same resource content in more than one machine-readable form.
JSON uses key-value pairs to represent data, which means it pairs a name (the key) with a piece of information (the value).
XML uses tags (special words enclosed in angle brackets, like <ingredient> or <step>) to label and describe different pieces of information.
A Patient resource in JSON and XML2
FHIR also defines an RDF representation using Turtle. This beginner course focuses on the more commonly encountered JSON and XML formats.