Implementation
Support
This
page
is
part
of
the
FHIR
Specification
(v4.0.1:
R4
(v5.0.0:
R5
-
Mixed
Normative
and
STU
)
).
This
is
the
current
published
version
in
it's
permanent
home
(it
will
always
be
available
at
this
URL).
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
:
|
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 -------------------------------------------------------------------<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 "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: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:link <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:link <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.type [ fhir:value "ActivityDefinition" ]; fhir:StructureMap.group.input.mode [ fhir:value "source" ] ], [ fhir:index 1; fhir:StructureMap.group.input.name [ fhir:value "target" ]; fhir:StructureMap.group.input.type [ fhir:value "SupplyRequest" ]; 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://build.fhir.org/StructureMap/supplyrequest-transform.ttl> .[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\">\n <pre class=\"fml\">\n\n <span style=\"color: #cc00cc\">/// \n <b>url</b> = \n </span>\n <span style=\"color: blue\">'http://hl7.org/fhir/StructureMap/supplyrequest-transform'</span>\n\n <span style=\"color: #cc00cc\">/// \n <b>name</b> = \n </span>\n <span style=\"color: blue\">'TransformFromAnActivityDefinitionToASupplyRequest'</span>\n\n <span style=\"color: #cc00cc\">/// \n <b>title</b> = \n </span>\n <span style=\"color: blue\">'Transform from an ActivityDefinition to a SupplyRequest'</span>\n\n <span style=\"color: #cc00cc\">/// \n <b>status</b> = \n </span>\n <span style=\"color: blue\">'draft'</span>\n\n\n <b>uses</b>\n <span style=\"color: navy\"> "</span>\n <a href=\"activitydefinition.html\" title=\"ActivityDefinition\">http://hl7.org/fhir/StructureDefinition/ActivityDefinition</a>\n <span style=\"color: navy\">" </span>\n <b>as </b>\n <b>source</b>\n\n <b>uses</b>\n <span style=\"color: navy\"> "</span>\n <a href=\"supplyrequest.html\" title=\"SupplyRequest\">http://hl7.org/fhir/StructureDefinition/SupplyRequest</a>\n <span style=\"color: navy\">" </span>\n <b>as </b>\n <b>target</b>\n\n\n <b>group </b>main\n <span style=\"color: navy\">(</span>\n <b>source</b> \n <span style=\"color: maroon\">source</span>\n <span style=\"color: navy\"> : </span>ActivityDefinition, \n <b>target</b> \n <span style=\"color: maroon\">target</span>\n <span style=\"color: navy\"> : </span>SupplyRequest\n <span style=\"color: navy\">)</span>\n <span style=\"color: navy\"> {\n</span> source.id\n <b> as </b>\n <span style=\"color: maroon\">a</span>\n <span style=\"color: navy\">\n <b> -> </b>\n </span>target.status = \n <span style=\"color: navy\">(</span>'draft'\n <span style=\"color: navy\">)</span> \n <i>"status"</i>\n <span style=\"color: navy\">;</span>\n source.id\n <b> as </b>\n <span style=\"color: maroon\">a</span>\n <span style=\"color: navy\">\n <b> -> </b>\n </span>target.category = \n <span style=\"color: navy\">(</span>'non-stock'\n <span style=\"color: navy\">)</span> \n <i>"category"</i>\n <span style=\"color: navy\">;</span>\n source.id\n <b> as </b>\n <span style=\"color: maroon\">a</span>\n <span style=\"color: navy\">\n <b> -> </b>\n </span>target.priority = \n <span style=\"color: navy\">(</span>'routine'\n <span style=\"color: navy\">)</span> \n <i>"priority"</i>\n <span style=\"color: navy\">;</span>\n source.quantity\n <b> as </b>\n <span style=\"color: maroon\">a</span>\n <span style=\"color: navy\">\n <b> -> </b>\n </span>target.category = \n <b>copy</b>\n <span style=\"color: navy\">(</span>\n <span style=\"color: navy\">)</span>\n <span style=\"color: navy\">;</span>\n source.code\n <b> as </b>\n <span style=\"color: maroon\">a</span>\n <span style=\"color: navy\">\n <b> -> </b>\n </span> target.item = \n <b>create</b>\n <span style=\"color: navy\">(</span>\n <span style=\"color: navy\">)</span>\n <b> as </b>\n <span style=\"color: maroon\">b</span>\n <span style=\"color: navy\">, </span> b.concept = \n <b>copy</b>\n <span style=\"color: navy\">(</span>\n <span style=\"color: navy\">)</span> \n <i>"item"</i>\n <span style=\"color: navy\">;</span>\n source.id\n <b> as </b>\n <span style=\"color: maroon\">a</span>\n <span style=\"color: navy\">\n <b> -> </b>\n </span>target.occurrence = \n <span style=\"color: navy\">(</span>now()\n <span style=\"color: navy\">)</span> \n <i>"when"</i>\n <span style=\"color: navy\">;</span>\n source.id\n <b> as </b>\n <span style=\"color: maroon\">a</span>\n <span style=\"color: navy\">\n <b> -> </b>\n </span>target.authoredOn = \n <span style=\"color: navy\">(</span>now()\n <span style=\"color: navy\">)</span> \n <i>"authoredOn"</i>\n <span style=\"color: navy\">;</span>\n\n <span style=\"color: navy\">}\n\n</span>\n </pre>\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:version [ fhir:v "5.0.0"] ; # fhir:name [ fhir:v "TransformFromAnActivityDefinitionToASupplyRequest"] ; # fhir:title [ fhir:v "Transform from an ActivityDefinition to a SupplyRequest"] ; # fhir:status [ fhir:v "draft"] ; # fhir:experimental [ fhir:v "true"^^xsd:boolean] ; # 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
Release
4
(Technical
Correction
#1)
(v4.0.1)
R5
hl7.fhir.core#5.0.0
generated
on
Fri,
Nov
1,
2019
09:36+1100.
QA
Page
Sun,
Mar
26,
2023
15:26+1100.
Links:
Search
|
Version
History
|
Table
of
Contents
|
Credits
Glossary
|
QA
|
Compare
to
R3
R4
|
Compare
to
R4B
|
|
Propose
a
change