Release 5 Ballot

This page is part of the FHIR Specification (v5.0.0-ballot: R5 Ballot - see ballot notes). 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

Example OperationDefinition/Resource-convert (Turtle)

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: Informative

Raw Turtle (+ also see Turtle/RDF Format Specification)

Operation Definition

@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:OperationDefinition;
  fhir:Resource.id [ fhir:value "Resource-convert"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "extensions" ]
  ];
  fhir:DomainResource.extension [
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm" ];
     fhir:Extension.value [ fhir:value "1" ]
  ], [
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ];
     fhir:Extension.value [ fhir:value "draft" ]
  ];
  fhir:CanonicalResource.url [ fhir:value "http://hl7.org/fhir/OperationDefinition/Resource-convert"];
  fhir:CanonicalResource.version [ fhir:value "5.0.0-ballot"];
  fhir:CanonicalResource.name [ fhir:value "Convert"];
  fhir:CanonicalResource.title [ fhir:value "Convert from one form to another"];
  fhir:CanonicalResource.status [ fhir:value "draft"];
  fhir:CanonicalResource.experimental [ fhir:value "false"];
  fhir:CanonicalResource.date [ fhir:value "2022-09-10T04:52:37+10:00"];
  fhir:CanonicalResource.publisher [ fhir:value "HL7 (FHIR Project)"];
  fhir:CanonicalResource.contact [
     fhir:ContactDetail.telecom [
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "http://hl7.org/fhir" ]
     ], [
       fhir:ContactPoint.system [ fhir:value "email" ];
       fhir:ContactPoint.value [ fhir:value "fhir@lists.hl7.org" ]
     ]
  ];
  fhir:CanonicalResource.description [ fhir: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)"];
  fhir:OperationDefinition.url [ fhir:value "http://hl7.org/fhir/OperationDefinition/Resource-convert"];
  fhir:OperationDefinition.version [ fhir:value "5.0.0-ballot"];
  fhir:OperationDefinition.name [ fhir:value "Convert"];
  fhir:OperationDefinition.title [ fhir:value "Convert from one form to another"];
  fhir:OperationDefinition.status [ fhir:value "draft"];
  fhir:OperationDefinition.kind [ fhir:value "operation"];
  fhir:OperationDefinition.experimental [ fhir:value "false"];
  fhir:OperationDefinition.date [ fhir:value "2022-09-10T04:52:37+10:00"];
  fhir:OperationDefinition.publisher [ fhir:value "HL7 (FHIR Project)"];
  fhir:OperationDefinition.contact [
     fhir:ContactDetail.telecom [
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "http://hl7.org/fhir" ]
     ], [
       fhir:ContactPoint.system [ fhir:value "email" ];
       fhir:ContactPoint.value [ fhir:value "fhir@lists.hl7.org" ]
     ]
  ];
  fhir:OperationDefinition.description [ fhir: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)"];
  fhir:OperationDefinition.affectsState [ fhir:value "false"];
  fhir:OperationDefinition.code [ fhir:value "convert"];
  fhir:OperationDefinition.comment [ fhir:value "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 `return` resource type may be different from the `resource` parameter resource type (for example, it might be a bundle)\n* binary resources may be represented directly using some other content-type (in other words, just post the content directly)\n\nImplementers are encouraged to provide feedback to HL7 about their use of this operation"];
  fhir:OperationDefinition.resource [ fhir:value "Resource"];
  fhir:OperationDefinition.system [ fhir:value "true"];
  fhir:OperationDefinition.type [ fhir:value "false"];
  fhir:OperationDefinition.instance [ fhir:value "false"];
  fhir:OperationDefinition.parameter [
     fhir:OperationDefinitionParameterComponent.name [ fhir:value "resource" ];
     fhir:OperationDefinitionParameterComponent.use [ fhir:value "in" ];
     fhir:OperationDefinitionParameterComponent.min [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.max [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.documentation [ fhir:value "The resource that is to be converted" ];
     fhir:OperationDefinitionParameterComponent.type [ fhir:value "Resource" ]
  ], [
     fhir:OperationDefinitionParameterComponent.name [ fhir:value "return" ];
     fhir:OperationDefinitionParameterComponent.use [ fhir:value "out" ];
     fhir:OperationDefinitionParameterComponent.min [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.max [ fhir:value "1" ];
     fhir:OperationDefinitionParameterComponent.documentation [ fhir:value "The resource after conversion" ];
     fhir:OperationDefinitionParameterComponent.type [ fhir:value "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.