FHIR Extensions Pack v5.1.0-cibuild (2024-04-21)

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

Pharmacy Work GroupMaturity Level: N/AStandards Status: InformativeSecurity Category: N/A Compartments: N/A

Following are maps for converting between the equivalent R4B resource and this R5 resource.

Maps to MedicationKnowledge

FML Conversion for MedicationKnowledge: R5 to R4 (Ready for Use/Trial Use)

/// url = 'http://hl7.org/fhir/StructureMap/MedicationKnowledge5to4'
/// name = 'MedicationKnowledge5to4'
/// title = 'FML Conversion for MedicationKnowledge: R5 to R4'
/// status = 'active'

conceptmap "MedicationKnowledgeStatus" {
  prefix s = "http://hl7.org/fhir/CodeSystem/medicationknowledge-status"
  prefix t = "http://terminology.hl7.org/CodeSystem/medicationknowledge-status"

  s:active - t:active
  s:"entered-in-error" - t:"entered-in-error"
  s:inactive - t:inactive
}

uses "http://hl7.org/fhir/StructureDefinition/MedicationKnowledge" alias MedicationKnowledgeR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/MedicationKnowledge" alias MedicationKnowledgeR4 as target

imports "http://hl7.org/fhir/StructureMap/*5to4"

group MedicationKnowledge(source src : MedicationKnowledgeR5, target tgt : MedicationKnowledgeR4) extends DomainResource <<type+>> {
  src.code -> tgt.code; // src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#MedicationKnowledgeStatus', 'code');
  src.name -> tgt.synonym; // src.author -> tgt.author;
  src.relatedMedicationKnowledge as s -> tgt.relatedMedicationKnowledge as t then MedicationKnowledgeRelatedMedicationKnowledge(s, t);
  src.associatedMedication -> tgt.associatedMedication;
  src.productType -> tgt.productType;
  src.monograph as s -> tgt.monograph as t then MedicationKnowledgeMonograph(s, t);
  src.preparationInstruction -> tgt.preparationInstruction;
  src.cost as s -> tgt.cost as t then MedicationKnowledgeCost(s, t);
  src.monitoringProgram as s -> tgt.monitoringProgram as t then MedicationKnowledgeMonitoringProgram(s, t);
  src.indicationGuideline as s -> tgt.administrationGuidelines as t then MedicationKnowledgeIndicationGuideline(s, t);
  src.medicineClassification as s -> tgt.medicineClassification as t then MedicationKnowledgeMedicineClassification(s, t);
  src.regulatory as s -> tgt.regulatory as t then MedicationKnowledgeRegulatory(s, t); // src.packaging as s -> tgt.packaging as t then MedicationKnowledgePackaging(s,t);
  src.definitional as s -> tgt.drugCharacteristic as t then MedicationKnowledgeDefinitional(s, t);
}

group MedicationKnowledgeRelatedMedicationKnowledge(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.reference -> tgt.reference;
}

group MedicationKnowledgeMonograph(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.source -> tgt.source;
}

group MedicationKnowledgeCost(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type; // src.effectiveDate -> tgt.effectiveDate;
  src.source -> tgt.source;
  src.cost : Money -> tgt.cost;
}

group MedicationKnowledgeMonitoringProgram(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.name -> tgt.name;
}

group MedicationKnowledgeIndicationGuideline(source src, target tgt) extends BackboneElement {
  src.indication -> tgt.indication;
  src.dosingGuideline as s -> tgt then {
    s.dosage as v -> tgt.dosage as t then MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(v, t);
    s.patientCharacteristic as v -> tgt.patientCharacteristics as t then MedicationKnowledgeDosingGuidelinePatientCharacteristic(v, t);
  }; // src.dosingGuideline as s -> tgt.dosingGuideline as t then MedicationKnowledgeIndicationGuidelineDosingGuideline(s,t);
}

// group MedicationKnowledgeIndicationGuidelineDosingGuideline(source src, target tgt) extends BackboneElement {
// src.treatmentIntent -> tgt.treatmentIntent;
// src.dosage as s -> tgt.dosage as t then MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(s,t);
// src.administrationTreatment -> tgt.administrationTreatment;
// src.patientCharacteristic as s -> tgt.patientCharacteristic as t then MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic(s,t);
// }
group MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.dosage -> tgt.dosage;
}

group MedicationKnowledgeDosingGuidelinePatientCharacteristic(source src, target tgt) extends BackboneElement {
  src.type : CodeableConcept -> tgt.value;
  src.value : CodeableConcept -> tgt.characteristic;
  src.value : Quantity -> tgt.characteristic;
}

group MedicationKnowledgeMedicineClassification(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.classification -> tgt.classification; // src.source : string -> tgt.source;
}

// group MedicationKnowledgePackaging(source src, target tgt) extends BackboneElement {
// src.packagedProduct -> tgt.packagedProduct;
// }
// group MedicationKnowledgeStorageGuideline(source src, target tgt) extends BackboneElement {
// src.reference -> tgt.reference;
// src.note -> tgt.note;
// src.stabilityDuration -> tgt.stabilityDuration;
// src.environmentalSetting as s -> tgt.environmentalSetting as t then MedicationKnowledgeStorageGuidelineEnvironmentalSetting(s,t);
// }
// group MedicationKnowledgeStorageGuidelineEnvironmentalSetting(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.value : Quantity -> tgt.value;
// src.value : Range -> tgt.value;
// src.value : CodeableConcept -> tgt.value;
// }
group MedicationKnowledgeRegulatory(source src, target tgt) extends BackboneElement {
  src.regulatoryAuthority -> tgt.regulatoryAuthority;
  src.substitution as s -> tgt.substitution as t then MedicationKnowledgeRegulatorySubstitution(s, t);
  src.schedule as s ->  tgt.schedule as t,  t.schedule = s;
  src.maxDispense as s -> tgt.maxDispense as t then MedicationKnowledgeRegulatoryMaxDispense(s, t);
}

group MedicationKnowledgeRegulatorySubstitution(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.allowed -> tgt.allowed;
}

group MedicationKnowledgeRegulatoryMaxDispense(source src, target tgt) extends BackboneElement {
  src.quantity -> tgt.quantity;
  src.period -> tgt.period;
}

group MedicationKnowledgeDefinitional(source src, target tgt) extends BackboneElement {
  src.drugCharacteristic as s -> tgt then {
    s.type -> tgt.type;
    s.value : CodeableConcept -> tgt.value;
    s.value : string -> tgt.value;
    s.value : Quantity -> tgt.value;
    s.value : base64Binary -> tgt.value;
  }; // src.definition -> tgt.definition;
}

FML Conversion for MedicationKnowledge: R5 to R4B (Ready for Use/Trial Use)

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

conceptmap "MedicationKnowledgeStatus" {
  prefix s = "http://hl7.org/fhir/CodeSystem/medicationknowledge-status"
  prefix t = "http://terminology.hl7.org/CodeSystem/medicationknowledge-status"

  s:active - t:active
  s:"entered-in-error" - t:"entered-in-error"
  s:inactive - t:inactive
}

uses "http://hl7.org/fhir/StructureDefinition/MedicationKnowledge" alias MedicationKnowledgeR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/MedicationKnowledge" alias MedicationKnowledgeR4B as target

imports "http://hl7.org/fhir/StructureMap/*5to4B"

group MedicationKnowledge(source src : MedicationKnowledgeR5, target tgt : MedicationKnowledgeR4B) extends DomainResource <<type+>> {
  src.code -> tgt.code; // src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#MedicationKnowledgeStatus', 'code');
  src.name -> tgt.synonym; // src.author -> tgt.author;
  src.relatedMedicationKnowledge as s -> tgt.relatedMedicationKnowledge as t then MedicationKnowledgeRelatedMedicationKnowledge(s, t);
  src.associatedMedication -> tgt.associatedMedication;
  src.productType -> tgt.productType;
  src.monograph as s -> tgt.monograph as t then MedicationKnowledgeMonograph(s, t);
  src.preparationInstruction -> tgt.preparationInstruction;
  src.cost as s -> tgt.cost as t then MedicationKnowledgeCost(s, t);
  src.monitoringProgram as s -> tgt.monitoringProgram as t then MedicationKnowledgeMonitoringProgram(s, t);
  src.indicationGuideline as s -> tgt.administrationGuidelines as t then MedicationKnowledgeIndicationGuideline(s, t);
  src.medicineClassification as s -> tgt.medicineClassification as t then MedicationKnowledgeMedicineClassification(s, t);
  src.regulatory as s -> tgt.regulatory as t then MedicationKnowledgeRegulatory(s, t); // src.packaging as s -> tgt.packaging as t then MedicationKnowledgePackaging(s,t);
  src.definitional as s -> tgt.drugCharacteristic as t then MedicationKnowledgeDefinitional(s, t);
}

group MedicationKnowledgeRelatedMedicationKnowledge(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.reference -> tgt.reference;
}

group MedicationKnowledgeMonograph(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.source -> tgt.source;
}

group MedicationKnowledgeCost(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type; // src.effectiveDate -> tgt.effectiveDate;
  src.source -> tgt.source;
  src.cost : Money -> tgt.cost;
}

group MedicationKnowledgeMonitoringProgram(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.name -> tgt.name;
}

group MedicationKnowledgeIndicationGuideline(source src, target tgt) extends BackboneElement {
  src.indication -> tgt.indication;
  src.dosingGuideline as s -> tgt then {
    s.dosage as v -> tgt.dosage as t then MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(v, t);
    s.patientCharacteristic as v -> tgt.patientCharacteristics as t then MedicationKnowledgeDosingGuidelinePatientCharacteristic(v, t);
  }; // src.dosingGuideline as s -> tgt.dosingGuideline as t then MedicationKnowledgeIndicationGuidelineDosingGuideline(s,t);
}

// group MedicationKnowledgeIndicationGuidelineDosingGuideline(source src, target tgt) extends BackboneElement {
// src.treatmentIntent -> tgt.treatmentIntent;
// src.dosage as s -> tgt.dosage as t then MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(s,t);
// src.administrationTreatment -> tgt.administrationTreatment;
// src.patientCharacteristic as s -> tgt.patientCharacteristic as t then MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic(s,t);
// }
group MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.dosage -> tgt.dosage;
}

group MedicationKnowledgeDosingGuidelinePatientCharacteristic(source src, target tgt) extends BackboneElement {
  src.type : CodeableConcept -> tgt.value;
  src.value : CodeableConcept -> tgt.characteristic;
  src.value : Quantity -> tgt.characteristic;
}

group MedicationKnowledgeMedicineClassification(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.classification -> tgt.classification; // src.source : string -> tgt.source;
}

// group MedicationKnowledgePackaging(source src, target tgt) extends BackboneElement {
// src.packagedProduct -> tgt.packagedProduct;
// }
// group MedicationKnowledgeStorageGuideline(source src, target tgt) extends BackboneElement {
// src.reference -> tgt.reference;
// src.note -> tgt.note;
// src.stabilityDuration -> tgt.stabilityDuration;
// src.environmentalSetting as s -> tgt.environmentalSetting as t then MedicationKnowledgeStorageGuidelineEnvironmentalSetting(s,t);
// }
// group MedicationKnowledgeStorageGuidelineEnvironmentalSetting(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.value : Quantity -> tgt.value;
// src.value : Range -> tgt.value;
// src.value : CodeableConcept -> tgt.value;
// }
group MedicationKnowledgeRegulatory(source src, target tgt) extends BackboneElement {
  src.regulatoryAuthority -> tgt.regulatoryAuthority;
  src.substitution as s -> tgt.substitution as t then MedicationKnowledgeRegulatorySubstitution(s, t);
  src.schedule as s ->  tgt.schedule as t,  t.schedule = s;
  src.maxDispense as s -> tgt.maxDispense as t then MedicationKnowledgeRegulatoryMaxDispense(s, t);
}

group MedicationKnowledgeRegulatorySubstitution(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.allowed -> tgt.allowed;
}

group MedicationKnowledgeRegulatoryMaxDispense(source src, target tgt) extends BackboneElement {
  src.quantity -> tgt.quantity;
  src.period -> tgt.period;
}

group MedicationKnowledgeDefinitional(source src, target tgt) extends BackboneElement {
  src.drugCharacteristic as s -> tgt then {
    s.type -> tgt.type;
    s.value : CodeableConcept -> tgt.value;
    s.value : string -> tgt.value;
    s.value : Quantity -> tgt.value;
    s.value : base64Binary -> tgt.value;
  }; // src.definition -> tgt.definition;
}

Maps from MedicationKnowledge

FML Conversion for MedicationKnowledge: R4B to R5 (Ready for Use/Trial Use)

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

conceptmap "MedicationKnowledgeStatus" {
  prefix s = "http://terminology.hl7.org/CodeSystem/medicationknowledge-status"
  prefix t = "http://hl7.org/fhir/CodeSystem/medicationknowledge-status"

  s:active - t:active
  s:"entered-in-error" - t:"entered-in-error"
  s:inactive - t:inactive
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/MedicationKnowledge" alias MedicationKnowledgeR4B as source
uses "http://hl7.org/fhir/StructureDefinition/MedicationKnowledge" alias MedicationKnowledgeR5 as target

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

group MedicationKnowledge(source src : MedicationKnowledgeR4B, target tgt : MedicationKnowledgeR5) extends DomainResource <<type+>> {
  src.code -> tgt.code; // src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#MedicationKnowledgeStatus', 'code');
  src.synonym -> tgt.name; // src.author -> tgt.author;
  src.relatedMedicationKnowledge as s -> tgt.relatedMedicationKnowledge as t then MedicationKnowledgeRelatedMedicationKnowledge(s, t);
  src.associatedMedication -> tgt.associatedMedication;
  src.productType -> tgt.productType;
  src.monograph as s -> tgt.monograph as t then MedicationKnowledgeMonograph(s, t);
  src.preparationInstruction -> tgt.preparationInstruction;
  src.cost as s -> tgt.cost as t then MedicationKnowledgeCost(s, t);
  src.monitoringProgram as s -> tgt.monitoringProgram as t then MedicationKnowledgeMonitoringProgram(s, t);
  src.administrationGuidelines as s -> tgt.indicationGuideline as t then MedicationKnowledgeIndicationGuideline(s, t);
  src.medicineClassification as s -> tgt.medicineClassification as t then MedicationKnowledgeMedicineClassification(s, t);
  src.regulatory as s -> tgt.regulatory as t then MedicationKnowledgeRegulatory(s, t); // src.packaging as s -> tgt.packaging as t then MedicationKnowledgePackaging(s,t);
  src.drugCharacteristic as s -> tgt.definitional as t then MedicationKnowledgeDefinitional(s, t);
}

group MedicationKnowledgeRelatedMedicationKnowledge(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.reference -> tgt.reference;
}

group MedicationKnowledgeMonograph(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.source -> tgt.source;
}

group MedicationKnowledgeCost(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type; // src.effectiveDate -> tgt.effectiveDate;
  src.source -> tgt.source;
  src.cost : Money -> tgt.cost;
}

group MedicationKnowledgeMonitoringProgram(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.name -> tgt.name;
}

group MedicationKnowledgeIndicationGuideline(source src, target tgt) extends BackboneElement {
  src.indication : CodeableConcept -> tgt.indication;
  src.indication : Reference -> tgt.indication;
  src.dosage as s ->  tgt.dosingGuideline as t,  t.dosage = create('BackboneElement') as td then MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(s, td); // src.dosage as s -> tgt.dosingGuideline as t then MedicationKnowledgeIndicationGuidelineDosingGuideline(s,t);
  src.patientCharacteristics as s -> tgt.dosingGuideline as t then {
    s.value as v ->  t.patientCharacteristic as tp,  tp.type = create('CodeableConcept') as tc,  tc.text = v;
    s.characteristic : CodeableConcept as v ->  t.patientCharacteristic as tp,  tp.value = v;
    s.characteristic : Quantity as v ->  t.patientCharacteristic as tp,  tp.value = v;
  };
}

// group MedicationKnowledgeIndicationGuidelineDosingGuideline(source src, target tgt) extends BackboneElement {
// src.treatmentIntent -> tgt.treatmentIntent;
// src as s -> tgt.dosage as t then MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(s,t);
// src.administrationTreatment -> tgt.administrationTreatment;
// src.patientCharacteristic as s -> tgt.patientCharacteristic as t then MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic(s,t);
// }
group MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.dosage -> tgt.dosage;
}

// group MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.value : CodeableConcept -> tgt.value;
// src.value : Quantity -> tgt.value;
// src.value : Range -> tgt.value;
// }
group MedicationKnowledgeMedicineClassification(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.classification -> tgt.classification; // src.source : string -> tgt.source;
}

// group MedicationKnowledgePackaging(source src, target tgt) extends BackboneElement {
// src.packagedProduct -> tgt.packagedProduct;
// }
// group MedicationKnowledgeStorageGuideline(source src, target tgt) extends BackboneElement {
// src.reference -> tgt.reference;
// src.note -> tgt.note;
// src.stabilityDuration -> tgt.stabilityDuration;
// src.environmentalSetting as s -> tgt.environmentalSetting as t then MedicationKnowledgeStorageGuidelineEnvironmentalSetting(s,t);
// }
// group MedicationKnowledgeStorageGuidelineEnvironmentalSetting(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.value : Quantity -> tgt.value;
// src.value : Range -> tgt.value;
// src.value : CodeableConcept -> tgt.value;
// }
group MedicationKnowledgeRegulatory(source src, target tgt) extends BackboneElement {
  src.regulatoryAuthority -> tgt.regulatoryAuthority;
  src.substitution as s -> tgt.substitution as t then MedicationKnowledgeRegulatorySubstitution(s, t);
  src.schedule as s -> tgt.schedule = s.schedule;
  src.maxDispense as s -> tgt.maxDispense as t then MedicationKnowledgeRegulatoryMaxDispense(s, t);
}

group MedicationKnowledgeRegulatorySubstitution(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.allowed -> tgt.allowed;
}

group MedicationKnowledgeRegulatoryMaxDispense(source src, target tgt) extends BackboneElement {
  src.quantity -> tgt.quantity;
  src.period -> tgt.period;
}

group MedicationKnowledgeDefinitional(source src, target tgt) extends BackboneElement {
  src.type as s ->  tgt.drugCharacteristic as t,  t.type = s; // src.definition -> tgt.definition;
  src.value : CodeableConcept as s ->  tgt.drugCharacteristic as t,  t.value = s;
  src.value : string as s ->  tgt.drugCharacteristic as t,  t.value = s;
  src.value : Quantity as s ->  tgt.drugCharacteristic as t,  t.value = s;
  src.value : base64Binary as s ->  tgt.drugCharacteristic as t,  t.value = s;
}

FML Conversion for MedicationKnowledge: R4 to R5 (Ready for Use/Trial Use)

/// url = 'http://hl7.org/fhir/StructureMap/MedicationKnowledge4to5'
/// name = 'MedicationKnowledge4to5'
/// title = 'FML Conversion for MedicationKnowledge: R4 to R5'
/// status = 'active'

conceptmap "MedicationKnowledgeStatus" {
  prefix s = "http://terminology.hl7.org/CodeSystem/medicationknowledge-status"
  prefix t = "http://hl7.org/fhir/CodeSystem/medicationknowledge-status"

  s:active - t:active
  s:"entered-in-error" - t:"entered-in-error"
  s:inactive - t:inactive
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/MedicationKnowledge" alias MedicationKnowledgeR4 as source
uses "http://hl7.org/fhir/StructureDefinition/MedicationKnowledge" alias MedicationKnowledgeR5 as target

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

group MedicationKnowledge(source src : MedicationKnowledgeR4, target tgt : MedicationKnowledgeR5) extends DomainResource <<type+>> {
  src.code -> tgt.code; // src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#MedicationKnowledgeStatus', 'code');
  src.synonym -> tgt.name; // src.author -> tgt.author;
  src.relatedMedicationKnowledge as s -> tgt.relatedMedicationKnowledge as t then MedicationKnowledgeRelatedMedicationKnowledge(s, t);
  src.associatedMedication -> tgt.associatedMedication;
  src.productType -> tgt.productType;
  src.monograph as s -> tgt.monograph as t then MedicationKnowledgeMonograph(s, t);
  src.preparationInstruction -> tgt.preparationInstruction;
  src.cost as s -> tgt.cost as t then MedicationKnowledgeCost(s, t);
  src.monitoringProgram as s -> tgt.monitoringProgram as t then MedicationKnowledgeMonitoringProgram(s, t);
  src.administrationGuidelines as s -> tgt.indicationGuideline as t then MedicationKnowledgeIndicationGuideline(s, t);
  src.medicineClassification as s -> tgt.medicineClassification as t then MedicationKnowledgeMedicineClassification(s, t);
  src.regulatory as s -> tgt.regulatory as t then MedicationKnowledgeRegulatory(s, t); // src.packaging as s -> tgt.packaging as t then MedicationKnowledgePackaging(s,t);
  src.drugCharacteristic as s -> tgt.definitional as t then MedicationKnowledgeDefinitional(s, t);
}

group MedicationKnowledgeRelatedMedicationKnowledge(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.reference -> tgt.reference;
}

group MedicationKnowledgeMonograph(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.source -> tgt.source;
}

group MedicationKnowledgeCost(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type; // src.effectiveDate -> tgt.effectiveDate;
  src.source -> tgt.source;
  src.cost : Money -> tgt.cost;
}

group MedicationKnowledgeMonitoringProgram(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.name -> tgt.name;
}

group MedicationKnowledgeIndicationGuideline(source src, target tgt) extends BackboneElement {
  src.indication : CodeableConcept -> tgt.indication;
  src.indication : Reference -> tgt.indication;
  src.dosage as s ->  tgt.dosingGuideline as t,  t.dosage = create('BackboneElement') as td then MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(s, td); // src.dosingGuideline as s -> tgt.dosingGuideline as t then MedicationKnowledgeIndicationGuidelineDosingGuideline(s,t);
  src.patientCharacteristics as s -> tgt.dosingGuideline as t then {
    s.value as v ->  t.patientCharacteristic as tp,  tp.type = create('CodeableConcept') as tc,  tc.text = v;
    s.characteristic : CodeableConcept as v ->  t.patientCharacteristic as tp,  tp.value = v;
    s.characteristic : Quantity as v ->  t.patientCharacteristic as tp,  tp.value = v;
  };
}

// group MedicationKnowledgeIndicationGuidelineDosingGuideline(source src, target tgt) extends BackboneElement {
// src.treatmentIntent -> tgt.treatmentIntent;
// src as s -> tgt.dosage as t then MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(s,t);
// src.administrationTreatment -> tgt.administrationTreatment;
// src.patientCharacteristic as s -> tgt.patientCharacteristic as t then MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic(s,t);
// }
group MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.dosage -> tgt.dosage;
}

// group MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.value : CodeableConcept -> tgt.value;
// src.value : Quantity -> tgt.value;
// src.value : Range -> tgt.value;
// }
group MedicationKnowledgeMedicineClassification(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.classification -> tgt.classification; // src.source : string -> tgt.source;
}

// group MedicationKnowledgePackaging(source src, target tgt) extends BackboneElement {
// src.packagedProduct -> tgt.packagedProduct;
// }
// group MedicationKnowledgeStorageGuideline(source src, target tgt) extends BackboneElement {
// src.reference -> tgt.reference;
// src.note -> tgt.note;
// src.stabilityDuration -> tgt.stabilityDuration;
// src.environmentalSetting as s -> tgt.environmentalSetting as t then MedicationKnowledgeStorageGuidelineEnvironmentalSetting(s,t);
// }
// group MedicationKnowledgeStorageGuidelineEnvironmentalSetting(source src, target tgt) extends BackboneElement {
// src.type -> tgt.type;
// src.value : Quantity -> tgt.value;
// src.value : Range -> tgt.value;
// src.value : CodeableConcept -> tgt.value;
// }
group MedicationKnowledgeRegulatory(source src, target tgt) extends BackboneElement {
  src.regulatoryAuthority -> tgt.regulatoryAuthority;
  src.substitution as s -> tgt.substitution as t then MedicationKnowledgeRegulatorySubstitution(s, t);
  src.schedule as s -> tgt.schedule = s.schedule;
  src.maxDispense as s -> tgt.maxDispense as t then MedicationKnowledgeRegulatoryMaxDispense(s, t);
}

group MedicationKnowledgeRegulatorySubstitution(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.allowed -> tgt.allowed;
}

group MedicationKnowledgeRegulatoryMaxDispense(source src, target tgt) extends BackboneElement {
  src.quantity -> tgt.quantity;
  src.period -> tgt.period;
}

group MedicationKnowledgeDefinitional(source src, target tgt) extends BackboneElement {
  src.type as s ->  tgt.drugCharacteristic as t,  t.type = s; // src.definition -> tgt.definition;
  src.value : CodeableConcept as s ->  tgt.drugCharacteristic as t,  t.value = s;
  src.value : string as s ->  tgt.drugCharacteristic as t,  t.value = s;
  src.value : Quantity as s ->  tgt.drugCharacteristic as t,  t.value = s;
  src.value : base64Binary as s ->  tgt.drugCharacteristic as t,  t.value = s;
}