FHIR Data Types
As you may already know, FHIR resources are typically found in either XML or JSON formats. If you are building a FHIR client or server and only need to support one of those formats, then using either the XML or JSON data types will work fine.
On the Inbound side, the Serialization Type is the format you want all inbound data to be converted to.
- XML: The inbound data will be converted to XML if needed, and your msg variable will be an E4X XML object.
- JSON: The inbound data will be converted to JSON if needed, and your msg variable will be a JavaScript Object.
- Raw: The inbound data will not be converted at all, and your msg variable will be a JavaScript String.
The FHIR Version determines which version of FHIR to use to serialize the inbound data.
On the Outbound side, under the Deserialization settings, the Serialization Type is the format you want all outbound transformed data to be converted to.
- XML: The transformed data will be converted to XML if needed and stored as the encoded data.
- JSON: The transformed data will be converted to JSON if needed and stored as the encoded data.
- Raw: The transformed data will not be converted at all. The encoded data will simply be equal to the transformed data.
Also, on the Outbound side, under the Template Serialization settings, the Serialization Type is the format you want your outbound template to be converted to, if you are using an outbound template.
- XML: The outbound template will be converted to XML if needed, and your tmp variable will be an E4X XML object.
- JSON: The outbound template will be converted to JSON if needed, and your tmp variable will be a JavaScript Object.
- Raw: The outbound template will not be converted at all, and your tmp variable will be a JavaScript String.
The FHIR Version determines which version of FHIR to use to serialize the outbound template.