R6 Ballot (2nd Draft)

Publish-box (todo)

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.


Generated Narrative: StructureMap supplyrequest-transform

/// 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.