Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

Example StructureMap/supplyrequest-transform (Narrative)

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

This is the narrative for the resource. See also the XML, JSON or Turtle format. This example conforms to the profile StructureMap.


/// url = 'http://hl7.org/fhir/StructureMap/supplyrequest-transform'
/// name = 'TransformFromAnActivityDefinitionToASupplyRequest'
/// title = 'Transform from an ActivityDefinition to a SupplyRequest'
/// status = 'draft'

uses "http://hl7.org/fhir/StructureDefinition/ActivityDefinition" as source
uses "http://hl7.org/fhir/StructureDefinition/SupplyRequest" as target

group main(source source : ActivityDefinition, target target : SupplyRequest) {
  source.id as a -> target.status = ('draft') "status";
  source.id as a -> target.category = ('non-stock') "category";
  source.id as a -> target.priority = ('routine') "priority";
  source.quantity as a -> target.category = copy();
  source.code as a ->  target.item = create() as b,  b.concept = copy() "item";
  source.id as a -> target.occurrence = (now()) "when";
  source.id as a -> target.authoredOn = (now()) "authoredOn";
}


 

 

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.