<?xml version=“1.0” encoding=“UTF-8”?> <OperationDefinition xmlns=“hl7.org/fhir”>
<id value="Resource-convert"/> <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> <valueInteger value="1"/> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> <valueCode value="draft"/> </extension> <url value="http://hl7.org/fhir/OperationDefinition/Resource-convert"/> <version value="4.0.1"/> <name value="Convert from one form to another"/> <status value="draft"/> <kind value="operation"/> <date value="2019-11-01T09:29:23+11:00"/> <publisher value="HL7 (FHIR Project)"/> <contact> <telecom> <system value="url"/> <value value="http://hl7.org/fhir"/> </telecom> <telecom> <system value="email"/> <value value="fhir@lists.hl7.org"/> </telecom> </contact> <description value="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)"/> <code value="convert"/> <comment value="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"/> <resource value="Resource"/> <system value="true"/> <type value="false"/> <instance value="false"/> <parameter> <name value="input"/> <use value="in"/> <min value="1"/> <max value="1"/> <documentation value="The resource that is to be converted"/> <type value="Resource"/> </parameter> <parameter> <name value="output"/> <use value="out"/> <min value="1"/> <max value="1"/> <documentation value="The resource after conversion"/> <type value="Resource"/> </parameter>
</OperationDefinition>