Implementation
Support
This
page
is
part
of
the
FHIR
Specification
(v4.3.0:
R4B
(v5.0.0-draft-final:
Final
QA
Preview
for
R5
-
STU
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 JSON ( canonical form + also see JSON Format Specification )
Transforms an ActivityDefinition to a SupplyRequest
{
"resourceType" : "StructureMap",
"id" : "supplyrequest-transform",
"text" : {
"status" : "generated",
"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>"
},
"url" : "http://hl7.org/fhir/StructureMap/supplyrequest-transform",
"name" : "Transform from an ActivityDefinition to a SupplyRequest",
"identifier" : [{
"system" : "urn:ietf:rfc:3986",
"value" : "urn:oid:2.16.840.1.113883.4.642.13.1"
}],
"name" : "TransformFromAnActivityDefinitionToASupplyRequest",
"title" : "Transform from an ActivityDefinition to a SupplyRequest",
"status" : "draft",
"experimental" : true,
"description" : "Transform from an ActivityDefinition to a SupplyRequest",
"structure" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/activitydefinition",
"url" : "http://hl7.org/fhir/StructureDefinition/ActivityDefinition",
"mode" : "source"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/supplyrequest",
"url" : "http://hl7.org/fhir/StructureDefinition/SupplyRequest",
"mode" : "target"
}],
"group" : [{
"name" : "main",
"typeMode" : "none",
"input" : [{
"name" : "source",
"type" : "ActivityDefinition",
"mode" : "source"
},
{
"name" : "target",
"type" : "SupplyRequest",
"mode" : "target"
}],
"rule" : [{
"name" : "status",
"source" : [{
"context" : "source",
"element" : "id",
"variable" : "a"
}],
"target" : [{
"context" : "target",
"contextType" : "variable",
"element" : "status",
"transform" : "evaluate",
"parameter" : [{
"valueString" : "'draft'"
}]
}]
},
{
"name" : "category",
"source" : [{
"context" : "source",
"element" : "id",
"variable" : "a"
}],
"target" : [{
"context" : "target",
"contextType" : "variable",
"element" : "category",
"transform" : "evaluate",
"parameter" : [{
"valueString" : "'non-stock'"
}]
}]
},
{
"name" : "priority",
"source" : [{
"context" : "source",
"element" : "id",
"variable" : "a"
}],
"target" : [{
"context" : "target",
"contextType" : "variable",
"element" : "priority",
"transform" : "evaluate",
"parameter" : [{
"valueString" : "'routine'"
}]
}]
},
{
"name" : "quantity",
"source" : [{
"context" : "source",
"element" : "quantity",
"variable" : "a"
}],
"target" : [{
"context" : "target",
"contextType" : "variable",
"element" : "category",
"transform" : "copy"
}]
},
{
"name" : "item",
"source" : [{
"context" : "source",
"element" : "code",
"variable" : "a"
}],
"target" : [{
"context" : "target",
"contextType" : "variable",
"element" : "orderedItem.itemCodeableConcept",
"element" : "item",
"variable" : "b",
"transform" : "create"
},
{
"context" : "b",
"element" : "concept",
"transform" : "copy"
}]
},
{
"name" : "when",
"source" : [{
"context" : "source",
"element" : "id",
"variable" : "a"
}],
"target" : [{
"context" : "target",
"contextType" : "variable",
"element" : "occurrenceDateTime",
"element" : "occurrence",
"transform" : "evaluate",
"parameter" : [{
"valueString" : "now()"
}]
}]
},
{
"name" : "authoredOn",
"source" : [{
"context" : "source",
"element" : "id",
"variable" : "a"
}],
"target" : [{
"context" : "target",
"contextType" : "variable",
"element" : "authoredOn",
"transform" : "evaluate",
"parameter" : [{
"valueString" : "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
4B
(v4.3.0)
hl7.fhir.r4b.core#4.3.0
R5
hl7.fhir.core#5.0.0-draft-final
generated
on
Sat,
May
28,
2022
12:57+1000.
Wed,
Mar
1,
2023
23:07+1100.
Links:
Search
|
Version
History
|
Table
of
Contents
|
Glossary
|
QA
Page
|
Compare
to
R4
R4B
|
Compare
to
R5
Draft
|
|
Propose
a
change