Conformance
This
page
is
part
of
the
Snapshot
#3
for
FHIR
Specification
(v4.3.0:
R4B
-
STU
).
The
current
version
which
supercedes
this
version
is
5.0.0
R5
,
released
to
support
Connectathon
32
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
| FHIR Infrastructure Work Group | Maturity Level : N/A | Standards Status : Informative |
Raw XML ( canonical form + also see XML Format Specification )
Operation Definition
<?xml version="1.0" encoding="UTF-8"?> <OperationDefinition xmlns="http://hl7.org/fhir"> <id value="Resource-convert"/> <text> <status value="extensions"/> <div xmlns="http://www.w3.org/1999/xhtml">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)<p> URL: [base]/$convert</p> <p> Parameters</p> <table class="grid"> <tr> <td> <b> Use</b> </td> <td> <b> Name</b> </td> <td> <b> Cardinality</b> </td> <td> <b> Type</b> </td> <td> <b> Binding</b> </td> <td> <b> Documentation</b> </td> </tr> <tr> <td> IN</td><td> resource</td> <td> 1..1</td> <td> <a href="resource.html">Resource</a> </td> <td/> <td> <div> <p> The resource that is to be converted</p> </div> </td> </tr> <tr> <td> OUT</td><td> return</td> <td> 1..1</td> <td> <a href="resource.html">Resource</a> </td> <td/> <td> <div> <p> The resource after conversion</p> </div> </td> </tr> </table> <div>While the primary use of this operation is simple - converting a resource from one format to another, there are many potential uses including:<p> While the primary use of this operation is simple - converting a resource from one format to another, there are many potential uses including:</p> <ul> <li> converting resources from one version to another</li> <li> restructuring information in a resource (e.g. moving method into/out of Observation.code)</li> <li> extracting data from a questionnaire</li>converting CDA documents or v2 messages (as a binary resource) to a bundle (or vice versa) (or even openEHR or openMHealth).<li> converting CDA documents or v2 messages (as a binary resource) to a bundle (or vice versa) (or even openEHR or openMHealth).</li> </ul>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.<p> 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.</p> <p> For this reason, implementers should be aware that:</p> <ul>the output resource type may be different from the input resource (particularly, it might be a bundle)<li> the <code> return</code> resource type may be different from the <code> resource</code> parameter resource type (for example, it might be a bundle) </li>binary resources may be represented directly using some other content-type (i.e. just post the content directly)<li> binary resources may be represented directly using some other content-type (in other words, just post the content directly)</li> </ul><p> Implementers are encouraged to provide feedback to HL7 about their use of this operation</p> </div> </div> </text> <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="5.0.0-snapshot3"/> <name value="Convert"/> <title value="Convert from one form to another"/> <status value="draft"/> <kind value="operation"/> <experimental value="false"/><date value="2022-12-14T07:12:54+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>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)<description value="This operation takes a resource in one form, and returns to in another form. Both the `resource` and `return` parameters are a single resource. The primary use of this operation is to convert between formats (e.g. (XML -> JSON or vice versa)"/> <jurisdiction> <coding> <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/> <code value="001"/> <display value="World"/> </coding> </jurisdiction> <affectsState value="false"/> <code value="convert"/>While the primary use of this operation is simple - converting a resource from one format to another, there are many potential uses including:<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).* 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.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)* the `return` resource type may be different from the `resource` parameter resource type (for example, it might be a bundle) * binary resources may be represented directly using some other content-type (in other words, just post the content directly)Implementers are encouraged to provide feedback to HL7 about their use of this operationImplementers 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="resource"/> <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="return"/> <use value="out"/> <min value="1"/> <max value="1"/> <documentation value="The resource after conversion"/> <type value="Resource"/> </parameter> </ OperationDefinition >
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.
FHIR
®©
HL7.org
2011+.
FHIR
Release
4B
(v4.3.0)
hl7.fhir.r4b.core#4.3.0
R5
Ballot
hl7.fhir.core#5.0.0-snapshot3
generated
on
Sat,
May
28,
Wed,
Dec
14,
2022
12:53+1000.
07:15+1100.
Links:
Search
|
Version
History
|
Table
of
Contents
|
Glossary
|
QA
Page
|
Compare
to
R4
R4B
|
Compare
to
R5
Draft
|
|
Propose
a
change