FHIR Extensions Pack
5.1.0-cibuild - Working Copy International flag

FHIR Extensions Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 5.1.0-cibuild built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-extensions/ and changes regularly. See the Directory of published versions

StructureMap: FML Conversion for Provenance: R4B to R5

Official URL: http://hl7.org/fhir/StructureMap/Provenance4Bto5 Version: 5.1.0-cibuild
Standards status: Trial-use Maturity Level: 1 Computable Name: Provenance4Bto5

FMLConversionforProvenanceR4BtoR5

/// url = 'http://hl7.org/fhir/StructureMap/Provenance4Bto5'
/// name = 'Provenance4Bto5'
/// title = 'FML Conversion for Provenance: R4B to R5'
/// status = 'active'

conceptmap "ProvenanceEntityRole" {
  prefix s = "http://hl7.org/fhir/4.3/provenance-entity-role"
  prefix t = "http://hl7.org/fhir/provenance-entity-role"

  s:revision - t:revision
  s:quotation - t:quotation
  s:source - t:source
  s:removal - t:removal
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/Provenance" alias ProvenanceR4B as source
uses "http://hl7.org/fhir/StructureDefinition/Provenance" alias ProvenanceR5 as target

imports "http://hl7.org/fhir/StructureMap/*4Bto5"

group Provenance(source src : ProvenanceR4B, target tgt : ProvenanceR5) extends DomainResource <<type+>> {
  src.target -> tgt.target;
  src.occurred : Period -> tgt.occurred;
  src.occurred : dateTime -> tgt.occurred;
  src.recorded -> tgt.recorded;
  src.policy -> tgt.policy;
  src.location -> tgt.location;
  src.activity -> tgt.activity; // src.authorization -> tgt.authorization;
  src.agent as s -> tgt.agent as t then ProvenanceAgent(s, t); // src.basedOn -> tgt.basedOn;
  src.entity as s -> tgt.entity as t then ProvenanceEntity(s, t);
  src.signature -> tgt.signature;
}

group ProvenanceAgent(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.role -> tgt.role;
  src.who -> tgt.who;
  src.onBehalfOf -> tgt.onBehalfOf;
}

group ProvenanceEntity(source src, target tgt) extends BackboneElement {
  src.role as v -> tgt.role = translate(v, '#ProvenanceEntityRole', 'code');
  src.what -> tgt.what;
}