FHIR © HL7.org  |  Server Home  |  Health Intersections FHIR Server v1.0.287  |  FHIR Version 4.0.0  | User: ANONYMOUS (Unknown)  

Resource "Resource-convert" Version "1" (OperationDefinition)

Tags:

XML or JSON representation . provenance for this resource

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


{
  "resourceType" : "OperationDefinition",
  "id" : "Resource-convert",
  "meta" : {
    "versionId" : "1",
    "lastUpdated" : "2018-12-14T02:02:44.364Z"
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <h2>Convert from one form to another</h2>\n <p>OPERATION: Convert from one form to another</p>\n <p>The official URL for this operation definition is: </p>\n <pre>http://hl7.org/fhir/OperationDefinition/Resource-convert</pre>\n <div>\n <p>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 -&gt; JSON or vice versa)</p>\n\n </div>\n <p>URL: [base]/$convert</p>\n <p>Parameters</p>\n <table class=\"grid\">\n <tr>\n <td>\n <b>Use</b>\n </td>\n <td>\n <b>Name</b>\n </td>\n <td>\n <b>Cardinality</b>\n </td>\n <td>\n <b>Type</b>\n </td>\n <td>\n <b>Binding</b>\n </td>\n <td>\n <b>Documentation</b>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>input</td>\n <td>1..1</td>\n <td>\n <a href=\"resource.html\">Resource</a>\n </td>\n <td/>\n <td>\n <div>\n <p>The resource that is to be converted</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>OUT</td>\n <td>output</td>\n <td>1..1</td>\n <td>\n <a href=\"resource.html\">Resource</a>\n </td>\n <td/>\n <td>\n <div>\n <p>The resource after conversion</p>\n\n </div>\n </td>\n </tr>\n </table>\n <div>\n <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>\n\n <ul>\n\n <li>converting resources from one version to another</li>\n\n <li>restructuring information in a resource (e.g. moving method into/out of Observation.code)</li>\n\n <li>extracting data from a questionnaire</li>\n\n <li>converting CDA documents or v2 messages (as a binary resource) to a bundle (or vice versa) (or even openEHR or openMHealth).</li>\n\n </ul>\n\n <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>\n\n <p>For this reason, implementers should be aware that:</p>\n\n <ul>\n\n <li>the output resource type may be different from the input resource (particularly, it might be a bundle)</li>\n\n <li>binary resources may be represented directly using some other content-type (i.e. just post the content directly)</li>\n\n </ul>\n\n <p>Implementers are encouraged to provide feedback to HL7 about their use of this operation</p>\n\n </div>\n </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.0.0",
  "name" : "Convert from one form to another",
  "status" : "draft",
  "kind" : "operation",
  "date" : "2018-12-14T01:14:32+00: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"
    }
  ]
}