FHIR Extensions Pack
1.0.0 - Working Copy International flag

This page is part of the FHIR Core Extensions Registry (v1.0.0: Releases) based on FHIR v5.0.0. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

: FML Conversion for CompartmentDefinition: R4 to R5 - JSON Representation

Page standards status: Trial-use Maturity Level: 1

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "CompartmentDefinition4to5",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre class=\"fml\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'http://hl7.org/fhir/StructureMap/CompartmentDefinition4to5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'CompartmentDefinition4to5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'FML Conversion for CompartmentDefinition: R4 to R5'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>\r\n\r\n<b>conceptmap</b><span style=\"color: navy\"> &quot;</span>CompartmentType<span style=\"color: navy\">&quot; {\r\n</span><b>  prefix </b>s<span style=\"color: navy\"> = &quot;</span><a href=\"http://hl7.org/fhir/R4/codesystem-compartment-type.html\" title=\"CompartmentType\">http://hl7.org/fhir/4.0/compartment-type</a><span style=\"color: navy\">&quot;\r\n</span><b>  prefix </b>t<span style=\"color: navy\"> = &quot;</span><a href=\"http://hl7.org/fhir/R5/codesystem-compartment-type.html\" title=\"Compartment Type\">http://hl7.org/fhir/compartment-type</a><span style=\"color: navy\">&quot;\r\n</span>\r\n  s<span style=\"color: navy\">:</span>Patient <b>-</b> t<span style=\"color: navy\">:</span>Patient\r\n  s<span style=\"color: navy\">:</span>Encounter <b>-</b> t<span style=\"color: navy\">:</span>Encounter\r\n  s<span style=\"color: navy\">:</span>RelatedPerson <b>-</b> t<span style=\"color: navy\">:</span>RelatedPerson\r\n  s<span style=\"color: navy\">:</span>Practitioner <b>-</b> t<span style=\"color: navy\">:</span>Practitioner\r\n  s<span style=\"color: navy\">:</span>Device <b>-</b> t<span style=\"color: navy\">:</span>Device\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>conceptmap</b><span style=\"color: navy\"> &quot;</span>PublicationStatus<span style=\"color: navy\">&quot; {\r\n</span><b>  prefix </b>s<span style=\"color: navy\"> = &quot;</span><a href=\"http://hl7.org/fhir/R4/codesystem-publication-status.html\" title=\"PublicationStatus\">http://hl7.org/fhir/4.0/publication-status</a><span style=\"color: navy\">&quot;\r\n</span><b>  prefix </b>t<span style=\"color: navy\"> = &quot;</span><a href=\"http://hl7.org/fhir/R5/codesystem-publication-status.html\" title=\"PublicationStatus\">http://hl7.org/fhir/publication-status</a><span style=\"color: navy\">&quot;\r\n</span>\r\n  s<span style=\"color: navy\">:</span>draft <b>-</b> t<span style=\"color: navy\">:</span>draft\r\n  s<span style=\"color: navy\">:</span>active <b>-</b> t<span style=\"color: navy\">:</span>active\r\n  s<span style=\"color: navy\">:</span>retired <b>-</b> t<span style=\"color: navy\">:</span>retired\r\n  s<span style=\"color: navy\">:</span>unknown <b>-</b> t<span style=\"color: navy\">:</span>unknown\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/compartmentdefinition.html\" title=\"CompartmentDefinition\">http://hl7.org/fhir/4.0/StructureDefinition/CompartmentDefinition</a><span style=\"color: navy\">&quot; </span><b>alias </b>CompartmentDefinitionR4 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R5/compartmentdefinition.html\" title=\"CompartmentDefinition\">http://hl7.org/fhir/StructureDefinition/CompartmentDefinition</a><span style=\"color: navy\">&quot; </span><b>alias </b>CompartmentDefinitionR5 <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*4to5<span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>CompartmentDefinition<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>CompartmentDefinitionR4, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>CompartmentDefinitionR5<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  src.url<span style=\"color: navy\"><b> -&gt; </b></span>tgt.url<span style=\"color: navy\">;</span>\r\n  src.version<span style=\"color: navy\"><b> -&gt; </b></span>tgt.version<span style=\"color: navy\">;</span>\r\n  src.name<span style=\"color: navy\"><b> -&gt; </b></span>tgt.name<span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.versionAlgorithm : string -&gt; tgt.versionAlgorithm;</span>\r\n  src.status<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.status = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'#PublicationStatus'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.title -&gt; tgt.title;</span>\r\n  src.experimental<span style=\"color: navy\"><b> -&gt; </b></span>tgt.experimental<span style=\"color: navy\">;</span>\r\n  src.date<span style=\"color: navy\"><b> -&gt; </b></span>tgt.date<span style=\"color: navy\">;</span>\r\n  src.publisher<span style=\"color: navy\"><b> -&gt; </b></span>tgt.publisher<span style=\"color: navy\">;</span>\r\n  src.contact<span style=\"color: navy\"><b> -&gt; </b></span>tgt.contact<span style=\"color: navy\">;</span>\r\n  src.description<span style=\"color: navy\"><b> -&gt; </b></span>tgt.description<span style=\"color: navy\">;</span>\r\n  src.useContext<span style=\"color: navy\"><b> -&gt; </b></span>tgt.useContext<span style=\"color: navy\">;</span>\r\n  src.purpose<span style=\"color: navy\"><b> -&gt; </b></span>tgt.purpose<span style=\"color: navy\">;</span>\r\n  src.code<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.code = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'#CompartmentType'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n  src.search<span style=\"color: navy\"><b> -&gt; </b></span>tgt.search<span style=\"color: navy\">;</span>\r\n  src.resource<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.resource<b> as </b><span style=\"color: maroon\">t</span><b> then </b>CompartmentDefinitionResource<span style=\"color: navy\">(</span><span style=\"color: maroon\">s</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">t</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>CompartmentDefinitionResource<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span><b> extends </b>BackboneElement<span style=\"color: navy\"> {\r\n</span>  src.code<span style=\"color: navy\"><b> -&gt; </b></span>tgt.code<span style=\"color: navy\">;</span>\r\n  src.param<span style=\"color: navy\"><b> -&gt; </b></span>tgt.param<span style=\"color: navy\">;</span>\r\n  src.documentation<span style=\"color: navy\"><b> -&gt; </b></span>tgt.documentation<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "contained" : [
    {
      "resourceType" : "ConceptMap",
      "id" : "CompartmentType",
      "status" : "active",
      "group" : [
        {
          "source" : "http://hl7.org/fhir/4.0/compartment-type",
          "target" : "http://hl7.org/fhir/compartment-type",
          "element" : [
            {
              "code" : "Patient",
              "target" : [
                {
                  "code" : "Patient",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "Encounter",
              "target" : [
                {
                  "code" : "Encounter",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "RelatedPerson",
              "target" : [
                {
                  "code" : "RelatedPerson",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "Practitioner",
              "target" : [
                {
                  "code" : "Practitioner",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "Device",
              "target" : [
                {
                  "code" : "Device",
                  "relationship" : "related-to",
                  "comment" : "s:\"EpisodeOfCare\" - t:\"EpisodeOfCare\""
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "resourceType" : "ConceptMap",
      "id" : "PublicationStatus",
      "status" : "active",
      "group" : [
        {
          "source" : "http://hl7.org/fhir/4.0/publication-status",
          "target" : "http://hl7.org/fhir/publication-status",
          "element" : [
            {
              "code" : "draft",
              "target" : [
                {
                  "code" : "draft",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "active",
              "target" : [
                {
                  "code" : "active",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "retired",
              "target" : [
                {
                  "code" : "retired",
                  "relationship" : "related-to"
                }
              ]
            },
            {
              "code" : "unknown",
              "target" : [
                {
                  "code" : "unknown",
                  "relationship" : "related-to"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "extension" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger" : 1,
      "_valueInteger" : {
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.extensions"
          }
        ]
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode" : "trial-use",
      "_valueCode" : {
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.extensions"
          }
        ]
      }
    }
  ],
  "url" : "http://hl7.org/fhir/StructureMap/CompartmentDefinition4to5",
  "version" : "1.0.0",
  "name" : "CompartmentDefinition4to5",
  "title" : "FML Conversion for CompartmentDefinition: R4 to R5",
  "status" : "active",
  "date" : "2023-03-26T08:47:34+11:00",
  "publisher" : "HL7 International / FHIR Infrastructure",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://hl7.org/Special/committees/fhir-i"
        }
      ]
    }
  ],
  "description" : "FMLConversionforCompartmentDefinitionR4toR5",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/4.0/StructureDefinition/CompartmentDefinition",
      "mode" : "source",
      "alias" : "CompartmentDefinitionR4"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/CompartmentDefinition",
      "mode" : "target",
      "alias" : "CompartmentDefinitionR5"
    }
  ],
  "import" : [
    "http://hl7.org/fhir/StructureMap/*4to5"
  ],
  "group" : [
    {
      "name" : "CompartmentDefinition",
      "extends" : "DomainResource",
      "typeMode" : "type-and-types",
      "input" : [
        {
          "name" : "src",
          "type" : "CompartmentDefinitionR4",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "CompartmentDefinitionR5",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "url",
          "source" : [
            {
              "context" : "src",
              "element" : "url",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "url",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "version",
          "source" : [
            {
              "context" : "src",
              "element" : "version",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "version",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "name",
          "source" : [
            {
              "context" : "src",
              "element" : "name",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "name",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ],
          "documentation" : "src.versionAlgorithm : string -> tgt.versionAlgorithm;"
        },
        {
          "name" : "status",
          "source" : [
            {
              "context" : "src",
              "element" : "status",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "status",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "#PublicationStatus"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ],
          "documentation" : "src.title -> tgt.title;"
        },
        {
          "name" : "experimental",
          "source" : [
            {
              "context" : "src",
              "element" : "experimental",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "experimental",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "date",
          "source" : [
            {
              "context" : "src",
              "element" : "date",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "date",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "publisher",
          "source" : [
            {
              "context" : "src",
              "element" : "publisher",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "publisher",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "contact",
          "source" : [
            {
              "context" : "src",
              "element" : "contact",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "contact",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "description",
          "source" : [
            {
              "context" : "src",
              "element" : "description",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "description",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "useContext",
          "source" : [
            {
              "context" : "src",
              "element" : "useContext",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "useContext",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "purpose",
          "source" : [
            {
              "context" : "src",
              "element" : "purpose",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "purpose",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "code",
          "source" : [
            {
              "context" : "src",
              "element" : "code",
              "variable" : "v"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "code",
              "transform" : "translate",
              "parameter" : [
                {
                  "valueId" : "v"
                },
                {
                  "valueString" : "#CompartmentType"
                },
                {
                  "valueString" : "code"
                }
              ]
            }
          ]
        },
        {
          "name" : "search",
          "source" : [
            {
              "context" : "src",
              "element" : "search",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "search",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "resource",
          "source" : [
            {
              "context" : "src",
              "element" : "resource",
              "variable" : "s"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "resource",
              "variable" : "t"
            }
          ],
          "dependent" : [
            {
              "name" : "CompartmentDefinitionResource",
              "parameter" : [
                {
                  "valueId" : "s"
                },
                {
                  "valueId" : "t"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "CompartmentDefinitionResource",
      "extends" : "BackboneElement",
      "input" : [
        {
          "name" : "src",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "code",
          "source" : [
            {
              "context" : "src",
              "element" : "code",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "code",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "param",
          "source" : [
            {
              "context" : "src",
              "element" : "param",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "param",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "documentation",
          "source" : [
            {
              "context" : "src",
              "element" : "documentation",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "documentation",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}