/// url = 'http://hl7.org/fhir/StructureMap/PlanDefinition4to5' /// name = 'PlanDefinition4to5' /// title = 'PlanDefinition Transforms: R4 to R5' /// status = 'active' uses "http://hl7.org/fhir/4.0/PlanDefinition" alias PlanDefinitionR4 as source uses "http://hl7.org/fhir/5.0/PlanDefinition" alias PlanDefinitionR5 as target imports "http://hl7.org/fhir/StructureMap/*4to5" group PlanDefinition(source src : PlanDefinitionR4, target tgt : PlanDefinitionR5) extends DomainResource <<type+>> { src.url -> tgt.url; src.identifier -> tgt.identifier; src.version -> tgt.version; src.name -> tgt.name; src.title -> tgt.title; src.subtitle -> tgt.subtitle; src.type -> tgt.type; src.status as v -> tgt.status = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.status-R4toR5', 'code'); src.experimental -> tgt.experimental; src.subject as s where code = 'Patient' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Patient'; src.subject as s where code = 'Practitioner' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Practitioner'; src.subject as s where code = 'Organization' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Organization'; src.subject as s where code = 'Location' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Location'; src.subject as s where code = 'Device' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Device'; src.subject : Reference -> tgt.subject; src.date -> tgt.date; src.publisher -> tgt.publisher; src.contact -> tgt.contact; src.description -> tgt.description; src.useContext -> tgt.useContext; src.jurisdiction -> tgt.jurisdiction; src.purpose -> tgt.purpose; src.usage -> tgt.usage; src.copyright -> tgt.copyright; src.approvalDate -> tgt.approvalDate; src.lastReviewDate -> tgt.lastReviewDate; src.effectivePeriod -> tgt.effectivePeriod; src.topic -> tgt.topic; src.author -> tgt.author; src.editor -> tgt.editor; src.reviewer -> tgt.reviewer; src.endorser -> tgt.endorser; src.relatedArtifact -> tgt.relatedArtifact; src.library -> tgt.library; src.goal as s -> tgt.goal as t then PlanDefinitionGoal(s, t); src.action as s -> tgt.action as t then PlanDefinitionAction(s, t); } group PlanDefinitionGoal(source src, target tgt) extends BackboneElement { src.category -> tgt.category; src.description -> tgt.description; src.priority -> tgt.priority; src.start -> tgt.start; src.addresses -> tgt.addresses; src.documentation -> tgt.documentation; src.target as s -> tgt.target as t then PlanDefinitionGoalTarget(s, t); } group PlanDefinitionGoalTarget(source src, target tgt) extends BackboneElement { src.measure -> tgt.measure; src.detail : Quantity -> tgt.detail; src.detail : Range -> tgt.detail; src.detail : CodeableConcept -> tgt.detail; src.due -> tgt.due; } // group PlanDefinitionActor(source src, target tgt) extends BackboneElement { // src.title -> tgt.title; // src.description -> tgt.description; // src.option as s -> tgt.option as t then PlanDefinitionActorOption(s,t); // } // group PlanDefinitionActorOption(source src, target tgt) extends BackboneElement { // src.type as v -> tgt.type = translate(v, '#ActivityParticipantType', 'code'); // src.typeCanonical -> tgt.typeCanonical; // src.typeReference -> tgt.typeReference; // src.role -> tgt.role; // } group PlanDefinitionAction(source src, target tgt) extends BackboneElement { src.id -> tgt.linkId; src.prefix -> tgt.prefix; src.title -> tgt.title; src.description -> tgt.description; src.textEquivalent -> tgt.textEquivalent; src.priority as v -> tgt.priority = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.priority-R4toR5', 'code'); src.code -> tgt.code; src.reason -> tgt.reason; src.documentation -> tgt.documentation; src.goalId -> tgt.goalId; src.subject as s where code = 'Patient' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Patient'; src.subject as s where code = 'Practitioner' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Practitioner'; src.subject as s where code = 'Organization' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Organization'; src.subject as s where code = 'Location' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Location'; src.subject as s where code = 'Device' -> tgt.subject = create('CodeableConcept') as tc, tc.coding = create('Coding') as tcc, tcc.system = 'http://hl7.org/fhir/fhir-types', tcc.code = 'Patient', tcc.display = 'Device'; src.subject : Reference -> tgt.subject; src.trigger -> tgt.trigger; src.condition as s -> tgt.condition as t then PlanDefinitionActionCondition(s, t); src.input as s -> tgt.input as t, t.requirement = s; src.output as s -> tgt.output as t, t.requirement = s; src.relatedAction as s -> tgt.relatedAction as t then PlanDefinitionActionRelatedAction(s, t); src.timing : Age -> tgt.timing; src.timing : Duration -> tgt.timing; src.timing : Range -> tgt.timing; src.timing : Timing -> tgt.timing; src.participant as s -> tgt.participant as t then PlanDefinitionActionParticipant(s, t); src.type -> tgt.type; src.groupingBehavior as v -> tgt.groupingBehavior = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.groupingBehavior-R4toR5', 'code'); src.selectionBehavior as v -> tgt.selectionBehavior = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.selectionBehavior-R4toR5', 'code'); src.requiredBehavior as v -> tgt.requiredBehavior = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.requiredBehavior-R4toR5', 'code'); src.precheckBehavior as v -> tgt.precheckBehavior = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.precheckBehavior-R4toR5', 'code'); src.cardinalityBehavior as v -> tgt.cardinalityBehavior = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.cardinalityBehavior-R4toR5', 'code'); src.definition : canonical -> tgt.definition; src.definition : uri -> tgt.definition; src.transform -> tgt.transform; src.dynamicValue as s -> tgt.dynamicValue as t then PlanDefinitionActionDynamicValue(s, t); } group PlanDefinitionActionCondition(source src, target tgt) extends BackboneElement { src.kind as v -> tgt.kind = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.condition.kind-R4toR5', 'code'); src.expression -> tgt.expression; } group PlanDefinitionActionRelatedAction(source src, target tgt) extends BackboneElement { src.actionId -> tgt.targetId; src.relationship as v -> tgt.relationship = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.relatedAction.relationship-R4toR5', 'code'); src.relationship as v -> tgt.endRelationship = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.relatedAction.relationship-R4toR5', 'code'); src.offset : Duration -> tgt.offset; src.offset : Range -> tgt.offset; } group PlanDefinitionActionParticipant(source src, target tgt) extends BackboneElement { src.type as v -> tgt.type = translate(v, 'http://hl7.org/fhir/ConceptMap/PlanDefinition.action.participant.type-R4toR5', 'code'); src.role -> tgt.role; } group PlanDefinitionActionDynamicValue(source src, target tgt) extends BackboneElement { src.path -> tgt.path; src.expression -> tgt.expression; }
group PlanDefinitionActor(source src, target tgt) extends BackboneElement { src.title -> tgt.title; src.description -> tgt.description; src.option as s -> tgt.option as t then PlanDefinitionActorOption(s,t); } group PlanDefinitionActorOption(source src, target tgt) extends BackboneElement { src.type as v -> tgt.type = translate(v, '#ActivityParticipantType', 'code'); src.typeCanonical -> tgt.typeCanonical; src.typeReference -> tgt.typeReference; src.role -> tgt.role; }