This page is part of the FHIR Specification (v0.0.82: DSTU 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

1.12.5.0 Resource Formats

This page documents how the content of the resources are described. In actual exchange, resources can be represented in the following formats: XML and JSON.

1.12.5.0.1 Resource Definition

The resources are described in two different ways: a UML diagram that summarizes the content, and a pseudo-XML syntax that provides a visual sense of what the end resource instances will look like in XML. Note that although the description of the resources is based on their XML representation, other representations such as JSON are equally valid.

1.12.5.0.1.1 XML

The XML syntax uses the following notation:

 <Name xmlns="http://hl7.org/fhir" (attrA="value")> 
   <nameA><!-- 1..1 type description of content  --><nameA>
   <nameB[x]><!-- 0..1 type1|type2 description  --></nameB>
   <nameC> <!--  1..* -->
     <nameD><!-- 1..1 type>Relevant records  --></nameD>
   </nameC>
 <name>

Notes:

1.12.5.0.1.2 UML

The UML diagrams represent the same content as a series of classes that represent the elements of a resource.

Name attrA : string 0..1 nameA : type 1..1 nameB[x] : type1 | type2 0..1 NameC nameD : type 1..* nameC 0..1

Where an element can have a choice of data types, these are represented in the choice using the same syntax as the xml syntax described above. Due to way UML works, the actual order of the elements cannot be determined from the diagram, nor is it visible whether a property is an element or an attribute. The elements and types are links to the formal definitions of the parts. The UML diagrams also show the bindings, and these are hyperlinks to the details of the binding.

These UML diagrams are intended to communicate the contents of the resource to a human, and are not suitable for code generation using standard UML code generation tools.


comments powered by Disqus