Release 4 5 Preview #2
This page is part of the FHIR Specification (v4.0.1: R4 - Mixed Normative and STU ). This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

Operation-resource-convert

FHIR Infrastructure Work Group Maturity Level : N/A Standards Status : Informative Compartments : Not linked to any defined compartments

This is the narrative for the resource. See also the XML , JSON or Turtle format.


Convert from one form to another

OPERATION: Convert from one form to another

The official URL for this operation definition is:

http://hl7.org/fhir/OperationDefinition/Resource-convert

This operation takes a resource in one form, and returns to in another form. Both input and output are a single resource. The primary use of this operation is to convert between formats (e.g. (XML -> JSON or vice versa)

URL: [base]/$convert

Parameters
Use Name Cardinality Type Binding Documentation
IN input 1..1 Resource

The resource that is to be converted

OUT output 1..1 Resource

The resource after conversion

While the primary use of this operation is simple - converting a resource from one format to another, there are many potential uses including:

  • converting resources from one version to another
  • restructuring information in a resource (e.g. moving method into/out of Observation.code)
  • extracting data from a questionnaire
  • converting CDA documents or v2 messages (as a binary resource) to a bundle (or vice versa) (or even openEHR or openMHealth).

These variants would all be associated with parameters that define and control these kind of conversions, though such parameters are not defined at this time. In the absence of any parameters, simple format conversion is all that will occur.

For this reason, implementers should be aware that:

  • the output resource type may be different from the input resource (particularly, it might be a bundle)
  • binary resources may be represented directly using some other content-type (i.e. just post the content directly)

Implementers are encouraged to provide feedback to HL7 about their use of this operation


 

 

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.