FHIR Release 3 (STU)

This page is part of the FHIR Specification (v3.0.2: STU 3). 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 R3

Structuremap-supplyrequest-transform.ttl

FHIR Infrastructure Work GroupMaturity Level: N/ABallot Status: InformativeCompartments: Not linked to any defined compartments

Raw Turtle, JSON-LD

Transforms an ActivityDefinition to a SupplyRequest

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

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

<http://hl7.org/fhir/StructureMap/supplyrequest-transform> a fhir:StructureMap;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "supplyrequest-transform"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\nmap &quot;http://hl7.org/fhir/StructureMap/supplyrequest-transform&quot; = supplyRequestTransform\n\nuses &quot;http://hl7.org/fhir/StructureDefinition/ActivityDefinition&quot; as source\nuses &quot;http://hl7.org/fhir/StructureDefinition/SupplyRequest&quot; as target\n\ngroup main\n  input &quot;source&quot;: ActivityDefinition as source\n  input &quot;target&quot;: SupplyRequest as target\n\n  &quot;status&quot;: for source.id make target.status = 'draft'\n  &quot;category&quot;: for source.id make target.category = 'non-stock'\n  &quot;priority&quot;: for source.id make target.priority = 'routine'\n  &quot;quantity&quot;: for source.quantity make target.orderedItem.quantity\n  &quot;item&quot;: for source.code make target.orderedItem.itemCodeableConcept\n  &quot;when&quot;: for source.id make target.occurrenceDateTime = Now()\n  &quot;authoredOn&quot;: for source.id make target.authoredOn = Now()\n    </div>"
  ];
  fhir:StructureMap.url [ fhir:value "http://hl7.org/fhir/StructureMap/supplyrequest-transform"];
  fhir:StructureMap.name [ fhir:value "Transform from an ActivityDefinition to a SupplyRequest"];
  fhir:StructureMap.status [ fhir:value "draft"];
  fhir:StructureMap.structure [
     fhir:index 0;
     fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/activitydefinition" ];
     fhir:StructureMap.structure.mode [ fhir:value "source" ]
  ], [
     fhir:index 1;
     fhir:StructureMap.structure.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/supplyrequest" ];
     fhir:StructureMap.structure.mode [ fhir:value "target" ]
  ];
  fhir:StructureMap.group [
     fhir:index 0;
     fhir:StructureMap.group.name [ fhir:value "main" ];
     fhir:StructureMap.group.typeMode [ fhir:value "none" ];
     fhir:StructureMap.group.input [
       fhir:index 0;
       fhir:StructureMap.group.input.name [ fhir:value "source" ];
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1;
       fhir:StructureMap.group.input.name [ fhir:value "target" ];
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ];
     fhir:StructureMap.group.rule [
       fhir:index 0;
       fhir:StructureMap.group.rule.name [ fhir:value "status" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "source" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "a" ]
       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "target" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "status" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'draft'" ]
         ]
       ]
     ], [
       fhir:index 1;
       fhir:StructureMap.group.rule.name [ fhir:value "category" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "source" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "a" ]
       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "target" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "category" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'non-stock'" ]
         ]
       ]
     ], [
       fhir:index 2;
       fhir:StructureMap.group.rule.name [ fhir:value "priority" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "source" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "a" ]
       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "target" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "priority" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "'routine'" ]
         ]
       ]
     ], [
       fhir:index 3;
       fhir:StructureMap.group.rule.name [ fhir:value "quantity" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "source" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "quantity" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "a" ]
       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "target" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "category" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ]
       ]
     ], [
       fhir:index 4;
       fhir:StructureMap.group.rule.name [ fhir:value "item" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "source" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "code" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "a" ]
       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "target" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "orderedItem.itemCodeableConcept" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ]
       ]
     ], [
       fhir:index 5;
       fhir:StructureMap.group.rule.name [ fhir:value "when" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "source" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "a" ]
       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "target" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "occurrenceDateTime" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "now()" ]
         ]
       ]
     ], [
       fhir:index 6;
       fhir:StructureMap.group.rule.name [ fhir:value "authoredOn" ];
       fhir:StructureMap.group.rule.source [
         fhir:index 0;
         fhir:StructureMap.group.rule.source.context [ fhir:value "source" ];
         fhir:StructureMap.group.rule.source.element [ fhir:value "id" ];
         fhir:StructureMap.group.rule.source.variable [ fhir:value "a" ]
       ];
       fhir:StructureMap.group.rule.target [
         fhir:index 0;
         fhir:StructureMap.group.rule.target.context [ fhir:value "target" ];
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ];
         fhir:StructureMap.group.rule.target.element [ fhir:value "authoredOn" ];
         fhir:StructureMap.group.rule.target.transform [ fhir:value "evaluate" ];
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0;
           fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "now()" ]
         ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/StructureMap/supplyrequest-transform.ttl> a owl:Ontology;
  owl:imports fhir:fhir.ttl;
  owl:versionIRI <http://hl7.org/fhir/STU3/StructureMap/supplyrequest-transform.ttl> .

# -------------------------------------------------------------------------------------


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.