{ "resourceType": "StructureMap", "id": "supplyrequest-transform", "url": "http://hl7.org/fhir/StructureMap/supplyrequest-transform", "name": "Transform from an ActivityDefinition to a SupplyRequest", "status": "draft", "structure": [ { "url": "http://hl7.org/fhir/StructureDefinition/activitydefinition", "mode": "source" }, { "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", "transform": "copy" } ] }, { "name": "when", "source": [ { "context": "source", "element": "id", "variable": "a" } ], "target": [ { "context": "target", "contextType": "variable", "element": "occurrenceDateTime", "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()" } ] } ] } ] } ] }