This page is part of the FHIR Specification (v5.0.0-draft-final: Final QA Preview for R5 - 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 R3
FHIR Infrastructure Work Group | Maturity Level: N/A | Standards Status: Informative | Compartments: Not linked to any defined compartments |
Raw Turtle (+ also see Turtle/RDF Format Specification)
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 ------------------------------------------------------------------- [a fhir:StructureMap ; fhir:nodeRole fhir:treeRoot ; fhir:id [ fhir:v "supplyrequest-transform"] ; # fhir:text [ fhir:status [ fhir:v "generated" ] ; fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\nmap "http://hl7.org/fhir/StructureMap/supplyrequest-transform" = supplyRequestTransform\n\nuses "http://hl7.org/fhir/StructureDefinition/ActivityDefinition" as source\nuses "http://hl7.org/fhir/StructureDefinition/SupplyRequest" as target\n\ngroup main\n input "source": ActivityDefinition as source\n input "target": SupplyRequest as target\n\n "status": for source.id make target.status = 'draft'\n "category": for source.id make target.category = 'non-stock'\n "priority": for source.id make target.priority = 'routine'\n "quantity": for source.quantity make target.orderedItem.quantity\n "item": for source.code make target.orderedItem.itemCodeableConcept\n "when": for source.id make target.occurrenceDateTime = Now()\n "authoredOn": for source.id make target.authoredOn = Now()\n </div>" ] ; # fhir:url [ fhir:v "http://hl7.org/fhir/StructureMap/supplyrequest-transform"^^xsd:anyURI] ; # fhir:identifier ( [ fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ; fhir:value [ fhir:v "urn:oid:2.16.840.1.113883.4.642.13.1" ] ] ) ; # fhir:name [ fhir:v "TransformFromAnActivityDefinitionToASupplyRequest"] ; # fhir:title [ fhir:v "Transform from an ActivityDefinition to a SupplyRequest"] ; # fhir:status [ fhir:v "draft"] ; # fhir:description [ fhir:v "Transform from an ActivityDefinition to a SupplyRequest"] ; # fhir:structure ( [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/ActivityDefinition"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/ActivityDefinition> ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/SupplyRequest"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/SupplyRequest> ] ; fhir:mode [ fhir:v "target" ] ] ) ; # fhir:group ( [ fhir:name [ fhir:v "main" ] ; fhir:input ( [ fhir:name [ fhir:v "source" ] ; fhir:type [ fhir:v "ActivityDefinition" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "target" ] ; fhir:type [ fhir:v "SupplyRequest" ] ; fhir:mode [ fhir:v "target" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "status" ] ; fhir:source ( [ fhir:context [ fhir:v "source" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "target" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "evaluate" ] ; fhir:parameter ( [ fhir:value [ fhir:v "'draft'" ] ] ) ] ) ] [ fhir:name [ fhir:v "category" ] ; fhir:source ( [ fhir:context [ fhir:v "source" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "target" ] ; fhir:element [ fhir:v "category" ] ; fhir:transform [ fhir:v "evaluate" ] ; fhir:parameter ( [ fhir:value [ fhir:v "'non-stock'" ] ] ) ] ) ] [ fhir:name [ fhir:v "priority" ] ; fhir:source ( [ fhir:context [ fhir:v "source" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "target" ] ; fhir:element [ fhir:v "priority" ] ; fhir:transform [ fhir:v "evaluate" ] ; fhir:parameter ( [ fhir:value [ fhir:v "'routine'" ] ] ) ] ) ] [ fhir:name [ fhir:v "quantity" ] ; fhir:source ( [ fhir:context [ fhir:v "source" ] ; fhir:element [ fhir:v "quantity" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "target" ] ; fhir:element [ fhir:v "category" ] ; fhir:transform [ fhir:v "copy" ] ] ) ] [ fhir:name [ fhir:v "item" ] ; fhir:source ( [ fhir:context [ fhir:v "source" ] ; fhir:element [ fhir:v "code" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "target" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "b" ] ; fhir:transform [ fhir:v "create" ] ] [ fhir:context [ fhir:v "b" ] ; fhir:element [ fhir:v "concept" ] ; fhir:transform [ fhir:v "copy" ] ] ) ] [ fhir:name [ fhir:v "when" ] ; fhir:source ( [ fhir:context [ fhir:v "source" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "target" ] ; fhir:element [ fhir:v "occurrence" ] ; fhir:transform [ fhir:v "evaluate" ] ; fhir:parameter ( [ fhir:value [ fhir:v "now()" ] ] ) ] ) ] [ fhir:name [ fhir:v "authoredOn" ] ; fhir:source ( [ fhir:context [ fhir:v "source" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "target" ] ; fhir:element [ fhir:v "authoredOn" ] ; fhir:transform [ fhir:v "evaluate" ] ; fhir:parameter ( [ fhir:value [ fhir:v "now()" ] ] ) ] ) ] ) ] )] . # # -------------------------------------------------------------------------------------
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.
FHIR ®© HL7.org 2011+. FHIR R5 hl7.fhir.core#5.0.0-draft-final generated on Wed, Mar 1, 2023 23:07+1100.
Links: Search |
Version History |
Contents |
Glossary |
QA |
Compare to R4B |
Compare to R5 Draft |
|
Propose a change