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 XML ( canonical form + also see XML Format Specification )
Transforms an ActivityDefinition to a SupplyRequest (id = "supplyrequest-transform")
<?xml version="1.0" encoding="UTF-8"?>map "http://hl7.org/fhir/StructureMap/supplyrequest-transform" = supplyRequestTransform uses "http://hl7.org/fhir/StructureDefinition/ActivityDefinition" as source uses "http://hl7.org/fhir/StructureDefinition/SupplyRequest" as target group main input "source": ActivityDefinition as source input "target": SupplyRequest as target "status": for source.id make target.status = 'draft' "category": for source.id make target.category = 'non-stock' "priority": for source.id make target.priority = 'routine' "quantity": for source.quantity make target.orderedItem.quantity "item": for source.code make target.orderedItem.itemCodeableConcept "when": for source.id make target.occurrenceDateTime = Now() "authoredOn": for source.id make target.authoredOn = Now()<StructureMap xmlns="http://hl7.org/fhir"> <id value="supplyrequest-transform"/> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml"> <pre class="fml"> <span style="color: #cc00cc">/// <b> url</b> = </span> <span style="color: blue">'http://hl7.org/fhir/StructureMap/supplyrequest-transform'</span> <span style="color: #cc00cc">/// <b> name</b> = </span> <span style="color: blue">'TransformFromAnActivityDefinitionToASupplyRequest'</span> <span style="color: #cc00cc">/// <b> title</b> = </span> <span style="color: blue">'Transform from an ActivityDefinition to a SupplyRequest'</span> <span style="color: #cc00cc">/// <b> status</b> = </span> <span style="color: blue">'draft'</span> <b> uses</b> <span style="color: navy"> "</span> <a href="activitydefinition.html" title="ActivityDefinition">http://hl7.org/fhir/StructureDefinition/ActivityDefinition</a> <span style="color: navy">" </span> <b> as </b> <b> source</b> <b> uses</b> <span style="color: navy"> "</span> <a href="supplyrequest.html" title="SupplyRequest">http://hl7.org/fhir/StructureDefinition/SupplyRequest</a> <span style="color: navy">" </span> <b> as </b> <b> target</b> <b> group </b> main <span style="color: navy">(</span> <b> source</b> <span style="color: maroon">source</span> <span style="color: navy"> : </span> ActivityDefinition, <b> target</b> <span style="color: maroon">target</span> <span style="color: navy"> : </span> SupplyRequest <span style="color: navy">)</span> <span style="color: navy"> { </span> source.id <b> as </b> <span style="color: maroon">a</span> <span style="color: navy"> <b> -> </b> </span> target.status = <span style="color: navy">(</span> 'draft' <span style="color: navy">)</span> <i> "status"</i> <span style="color: navy">;</span> source.id <b> as </b> <span style="color: maroon">a</span> <span style="color: navy"> <b> -> </b> </span> target.category = <span style="color: navy">(</span> 'non-stock' <span style="color: navy">)</span> <i> "category"</i> <span style="color: navy">;</span> source.id <b> as </b> <span style="color: maroon">a</span> <span style="color: navy"> <b> -> </b> </span> target.priority = <span style="color: navy">(</span> 'routine' <span style="color: navy">)</span> <i> "priority"</i> <span style="color: navy">;</span> source.quantity <b> as </b> <span style="color: maroon">a</span> <span style="color: navy"> <b> -> </b> </span> target.category = <b> copy</b> <span style="color: navy">(</span> <span style="color: navy">)</span> <span style="color: navy">;</span> source.code <b> as </b> <span style="color: maroon">a</span> <span style="color: navy"> <b> -> </b> </span> target.item = <b> create</b> <span style="color: navy">(</span> <span style="color: navy">)</span> <b> as </b> <span style="color: maroon">b</span> <span style="color: navy">, </span> b.concept = <b> copy</b> <span style="color: navy">(</span> <span style="color: navy">)</span> <i> "item"</i> <span style="color: navy">;</span> source.id <b> as </b> <span style="color: maroon">a</span> <span style="color: navy"> <b> -> </b> </span> target.occurrence = <span style="color: navy">(</span> now() <span style="color: navy">)</span> <i> "when"</i> <span style="color: navy">;</span> source.id <b> as </b> <span style="color: maroon">a</span> <span style="color: navy"> <b> -> </b> </span> target.authoredOn = <span style="color: navy">(</span> now() <span style="color: navy">)</span> <i> "authoredOn"</i> <span style="color: navy">;</span> <span style="color: navy">}</span> </pre> </div> </text> <url value="http://hl7.org/fhir/StructureMap/supplyrequest-transform"/> <identifier> <system value="urn:ietf:rfc:3986"/> <value value="urn:oid:2.16.840.1.113883.4.642.13.1"/> </identifier> <version value="5.0.0"/> <name value="TransformFromAnActivityDefinitionToASupplyRequest"/> <title value="Transform from an ActivityDefinition to a SupplyRequest"/> <status value="draft"/> <experimental value="true"/> <description value="Transform from an ActivityDefinition to a SupplyRequest"/> <structure> <url value="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/> <mode value="source"/> </structure> <structure> <url value="http://hl7.org/fhir/StructureDefinition/SupplyRequest"/> <mode value="target"/> </structure> <group> <name value="main"/> <input> <name value="source"/> <type value="ActivityDefinition"/> <mode value="source"/> </input> <input> <name value="target"/> <type value="SupplyRequest"/> <mode value="target"/> </input> <rule> <name value="status"/> <source> <context value="source"/> <element value="id"/> <variable value="a"/> </source> <target> <context value="target"/> <element value="status"/> <transform value="evaluate"/> <parameter> <valueString value="'draft'"/> </parameter> </target> </rule> <rule> <name value="category"/> <source> <context value="source"/> <element value="id"/> <variable value="a"/> </source> <target> <context value="target"/> <element value="category"/> <transform value="evaluate"/> <parameter> <valueString value="'non-stock'"/> </parameter> </target> </rule> <rule> <name value="priority"/> <source> <context value="source"/> <element value="id"/> <variable value="a"/> </source> <target> <context value="target"/> <element value="priority"/> <transform value="evaluate"/> <parameter> <valueString value="'routine'"/> </parameter> </target> </rule> <rule> <name value="quantity"/> <source> <context value="source"/> <element value="quantity"/> <variable value="a"/> </source> <target> <context value="target"/> <element value="category"/> <transform value="copy"/> </target> </rule> <rule> <name value="item"/> <source> <context value="source"/> <element value="code"/> <variable value="a"/> </source> <target> <context value="target"/> <element value="item"/> <variable value="b"/> <transform value="create"/> </target> <target> <context value="b"/> <element value="concept"/> <transform value="copy"/> </target> </rule> <rule> <name value="when"/> <source> <context value="source"/> <element value="id"/> <variable value="a"/> </source> <target> <context value="target"/> <element value="occurrence"/> <transform value="evaluate"/> <parameter> <valueString value="now()"/> </parameter> </target> </rule> <rule> <name value="authoredOn"/> <source> <context value="source"/> <element value="id"/> <variable value="a"/> </source> <target> <context value="target"/> <element value="authoredOn"/> <transform value="evaluate"/> <parameter> <valueString value="now()"/> </parameter> </target> </rule> </group> </ StructureMap >
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