This page is part of the FHIR Specification (v4.2.0: R5 Preview #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
FHIR Infrastructure Work Group | Maturity Level: N/A | Standards Status: Informative | Compartments: Not linked to any defined compartments |
Raw JSON (canonical form + also see JSON Format Specification)
Operation Definition
{ "resourceType" : "OperationDefinition", "id" : "Resource-convert", "text" : { "status" : "generated", "div" : "<div>!-- Snipped for Brevity --></div>" }, "extension" : [{ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", "valueInteger" : 1 }, { "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", "valueCode" : "draft" }], "url" : "http://hl7.org/fhir/OperationDefinition/Resource-convert", "version" : "4.2.0", "name" : "Convert from one form to another", "status" : "draft", "kind" : "operation", "date" : "2019-12-31T21:03:40+11:00", "publisher" : "HL7 (FHIR Project)", "contact" : [{ "telecom" : [{ "system" : "url", "value" : "http://hl7.org/fhir" }, { "system" : "email", "value" : "fhir@lists.hl7.org" }] }], "description" : "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" : "convert", "comment" : "While the primary use of this operation is simple - converting a resource from one format to another, there are many potential uses including:\n\n* converting resources from one version to another\n* restructuring information in a resource (e.g. moving method into/out of Observation.code)\n* extracting data from a questionnaire\n* converting CDA documents or v2 messages (as a binary resource) to a bundle (or vice versa) (or even openEHR or openMHealth). \n\nThese 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.\n\nFor this reason, implementers should be aware that:\n\n* the output resource type may be different from the input resource (particularly, it might be a bundle)\n* binary resources may be represented directly using some other content-type (i.e. just post the content directly)\n\nImplementers are encouraged to provide feedback to HL7 about their use of this operation", "resource" : ["Resource"], "system" : true, "type" : false, "instance" : false, "parameter" : [{ "name" : "input", "use" : "in", "min" : 1, "max" : "1", "documentation" : "The resource that is to be converted", "type" : "Resource" }, { "name" : "output", "use" : "out", "min" : 1, "max" : "1", "documentation" : "The resource after conversion", "type" : "Resource" }] }
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.