### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: lib/FHIR/DomainModel.rakumod
### ----------------------------------------------------
### -- Chunk 4 of 8
_Grouping is FHIR is export {
  has Str $.id;
  has Str $.name is required;
  has Extension @.extension;
  has Str $.description;
  has Extension @.modifierExtension;
}

class ImplementationGuide_Definition_Resource is FHIR is export {
  has Str $.id;
  has Str $.name;
  has Extension @.extension;
  has Reference $.reference is required;
  has ChoiceField $.example where Bool|Canonical;
  has Id $.groupingId;
  has FHIRCode @.fhirVersion;
  has Str $.description;
  has Extension @.modifierExtension;
}

class ImplementationGuide_Definition_Template is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Str $.scope;
  has Str $.source is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class ImplementationGuide_Definition_Parameter is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Str $.value is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class ImplementationGuide_Definition is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has ImplementationGuide_Definition_Page $.page;
  has ImplementationGuide_Definition_Grouping @.grouping;
  has ImplementationGuide_Definition_Resource @.resource is required;
  has ImplementationGuide_Definition_Template @.template;
  has ImplementationGuide_Definition_Parameter @.parameter;
}

class ImplementationGuide is DomainResource is export {
  method resourceType(--> 'ImplementationGuide') {}
  has UriStr $.url is required;
  has Str $.name is required;
  has DateTime $.date;
  has Str $.title;
  has FHIRCode $.status is required;
  has Str $.version;
  has ContactDetail @.contact;
  has FHIRCode $.license;
  has Str $.publisher;
  has Markdown $.copyright;
  has Id $.packageId is required;
  has UsageContext @.useContext;
  has Markdown $.description;
  has FHIRCode @.fhirVersion is required;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has ImplementationGuide_Global @.global;
  has ImplementationGuide_DependsOn @.dependsOn;
  has ImplementationGuide_Manifest $.manifest;
  has ImplementationGuide_Definition $.definition;
}

class ResearchDefinition is DomainResource is export {
  method resourceType(--> 'ResearchDefinition') {}
  has UriStr $.url;
  has Str $.name;
  has DateTime $.date;
  has Str $.title;
  has Str $.usage;
  has CodeableConcept @.topic;
  has FHIRCode $.status is required;
  has ContactDetail @.author;
  has ContactDetail @.editor;
  has Str $.version;
  has ContactDetail @.contact;
  has Str @.comment;
  has Markdown $.purpose;
  has Canonical @.library;
  has Reference $.outcome;
  has Str $.subtitle;
  has ContactDetail @.reviewer;
  has ContactDetail @.endorser;
  has Reference $.exposure;
  has Str $.publisher;
  has Markdown $.copyright;
  has Identifier @.identifier;
  has Str $.shortTitle;
  has ChoiceField $.subject where CodeableConcept|Reference;
  has UsageContext @.useContext;
  has Reference $.population is required;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has Date $.approvalDate;
  has Date $.lastReviewDate;
  has Period $.effectivePeriod;
  has RelatedArtifact @.relatedArtifact;
  has Reference $.exposureAlternative;
}
class CommunicationRequest_Payload is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has ChoiceField $.content is required where Attachment|Reference|Str;
  has Extension @.modifierExtension;
}

class CommunicationRequest is DomainResource is export {
  method resourceType(--> 'CommunicationRequest') {}
  has Annotation @.note;
  has Reference @.about;
  has FHIRCode $.status is required;
  has CodeableConcept @.medium;
  has Reference $.sender;
  has Reference @.basedOn;
  has Reference $.subject;
  has Reference @.replaces;
  has CodeableConcept @.category;
  has FHIRCode $.priority;
  has Reference $.encounter;
  has Reference $.requester;
  has Reference @.recipient;
  has Identifier @.identifier;
  has DateTime $.authoredOn;
  has CodeableConcept @.reasonCode;
  has CodeableConcept $.statusReason;
  has Bool $.doNotPerform;
  has ChoiceField $.occurrence where DateTime|Period;
  has Identifier $.groupIdentifier;
  has Reference @.reasonReference;
  has CommunicationRequest_Payload @.payload;
}
class Person_Link is FHIR is export {
  has Str $.id;
  has Reference $.target is required;
  has Extension @.extension;
  has FHIRCode $.assurance;
  has Extension @.modifierExtension;
}

class Person is DomainResource is export {
  method resourceType(--> 'Person') {}
  has HumanName @.name;
  has Attachment $.photo;
  has FHIRCode $.gender;
  has Bool $.active;
  has ContactPoint @.telecom;
  has Address @.address;
  has Date $.birthDate;
  has Identifier @.identifier;
  has Reference $.managingOrganization;
  has Person_Link @.link;
}
class RequestGroup_Action_Condition is FHIR is export {
  has Str $.id;
  has FHIRCode $.kind is required;
  has Extension @.extension;
  has Expression $.expression;
  has Extension @.modifierExtension;
}

class RequestGroup_Action_RelatedAction is FHIR is export {
  has Str $.id;
  has Id $.actionId is required;
  has Extension @.extension;
  has ChoiceField $.offset where Duration|Range;
  has FHIRCode $.relationship is required;
  has Extension @.modifierExtension;
}
class RequestGroup_Action is FHIR is export {
  has Str $.id;
  has CodeableConcept @.code;
  has CodeableConcept $.type;
  has Str $.title;
  has Str $.prefix;
  has RequestGroup_Action @.action;
  has FHIRCode $.priority;
  has Reference $.resource;
  has Extension @.extension;
  has ChoiceField $.timing where Age|Duration|DateTime|Period|Range|Timing;
  has Str $.description;
  has Reference @.participant;
  has RelatedArtifact @.documentation;
  has Str $.textEquivalent;
  has FHIRCode $.groupingBehavior;
  has FHIRCode $.requiredBehavior;
  has FHIRCode $.precheckBehavior;
  has Extension @.modifierExtension;
  has FHIRCode $.selectionBehavior;
  has FHIRCode $.cardinalityBehavior;
  has RequestGroup_Action_Condition @.condition;
  has RequestGroup_Action_RelatedAction @.relatedAction;
}

class RequestGroup is DomainResource is export {
  method resourceType(--> 'RequestGroup') {}
  has CodeableConcept $.code;
  has Annotation @.note;
  has FHIRCode $.status is required;
  has FHIRCode $.intent is required;
  has Reference $.author;
  has Reference @.basedOn;
  has Reference $.subject;
  has Reference @.replaces;
  has FHIRCode $.priority;
  has Reference $.encounter;
  has Identifier @.identifier;
  has DateTime $.authoredOn;
  has CodeableConcept @.reasonCode;
  has UriStr @.instantiatesUri;
  has Identifier $.groupIdentifier;
  has Reference @.reasonReference;
  has Canonical @.instantiatesCanonical;
  has RequestGroup_Action @.action;
}
class DeviceDefinition_Property is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Extension @.extension;
  has CodeableConcept @.valueCode;
  has Quantity @.valueQuantity;
  has Extension @.modifierExtension;
}

class DeviceDefinition_DeviceName is FHIR is export {
  has Str $.id;
  has Str $.name is required;
  has FHIRCode $.type is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class DeviceDefinition_Capability is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Extension @.extension;
  has CodeableConcept @.description;
  has Extension @.modifierExtension;
}

class DeviceDefinition_Material is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has CodeableConcept $.substance is required;
  has Bool $.alternate;
  has Extension @.modifierExtension;
  has Bool $.allergenicIndicator;
}

class DeviceDefinition_Specialization is FHIR is export {
  has Str $.id;
  has Str $.version;
  has Extension @.extension;
  has Str $.systemType is required;
  has Extension @.modifierExtension;
}

class DeviceDefinition_UdiDeviceIdentifier is FHIR is export {
  has Str $.id;
  has UriStr $.issuer is required;
  has Extension @.extension;
  has UriStr $.jurisdiction is required;
  has Str $.deviceIdentifier is required;
  has Extension @.modifierExtension;
}

class DeviceDefinition is DomainResource is export {
  method resourceType(--> 'DeviceDefinition') {}
  has UriStr $.url;
  has CodeableConcept $.type;
  has Annotation @.note;
  has Reference $.owner;
  has CodeableConcept @.safety;
  has Str @.version;
  has ContactPoint @.contact;
  has Quantity $.quantity;
  has Identifier @.identifier;
  has Str $.modelNumber;
  has CodeableConcept @.languageCode;
  has Reference $.parentDevice;
  has ChoiceField $.manufacturer where Reference|Str;
  has Any @.shelfLifeStorage;
  has UriStr $.onlineInformation;
  has Any $.physicalCharacteristics;
  has DeviceDefinition_Property @.property;
  has DeviceDefinition_DeviceName @.deviceName;
  has DeviceDefinition_Capability @.capability;
  has DeviceDefinition_Material @.material;
  has DeviceDefinition_Specialization @.specialization;
  has DeviceDefinition_UdiDeviceIdentifier @.udiDeviceIdentifier;
}
class CompartmentDefinition_Resource is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Str @.param;
  has Extension @.extension;
  has Str $.documentation;
  has Extension @.modifierExtension;
}

class CompartmentDefinition is DomainResource is export {
  method resourceType(--> 'CompartmentDefinition') {}
  has UriStr $.url is required;
  has Str $.name is required;
  has DateTime $.date;
  has FHIRCode $.code is required;
  has FHIRCode $.status is required;
  has Bool $.search is required;
  has Str $.version;
  has ContactDetail @.contact;
  has Markdown $.purpose;
  has Str $.publisher;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Bool $.experimental;
  has CompartmentDefinition_Resource @.resource;
}
class PaymentReconciliation_Detail is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Date $.date;
  has Reference $.payee;
  has Money $.amount;
  has Reference $.request;
  has Reference $.response;
  has Extension @.extension;
  has Reference $.submitter;
  has Identifier $.identifier;
  has Identifier $.predecessor;
  has Reference $.responsible;
  has Extension @.modifierExtension;
}

class PaymentReconciliation_ProcessNote is FHIR is export {
  has Str $.id;
  has FHIRCode $.type;
  has Str $.text;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class PaymentReconciliation is DomainResource is export {
  method resourceType(--> 'PaymentReconciliation') {}
  has FHIRCode $.status is required;
  has Period $.period;
  has DateTime $.created is required;
  has Reference $.request;
  has FHIRCode $.outcome;
  has CodeableConcept $.formCode;
  has Reference $.requestor;
  has Identifier @.identifier;
  has Str $.disposition;
  has Date $.paymentDate is required;
  has Reference $.paymentIssuer;
  has Money $.paymentAmount is required;
  has Identifier $.paymentIdentifier;
  has PaymentReconciliation_Detail @.detail;
  has PaymentReconciliation_ProcessNote @.processNote;
}
class MedicationKnowledge_Cost is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Money $.cost is required;
  has Str $.source;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_Kinetics is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Quantity @.lethalDose50;
  has Quantity @.areaUnderCurve;
  has Duration $.halfLifePeriod;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_Monograph is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Reference $.source;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_Packaging is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Quantity $.quantity;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_Ingredient is FHIR is export {
  has Str $.id;
  has ChoiceField $.item is required where CodeableConcept|Reference;
  has Bool $.isActive;
  has Ratio $.strength;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_MonitoringProgram is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Str $.name;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_DrugCharacteristic is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has ChoiceField $.value where Base64Binary|CodeableConcept|Quantity|Str;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_MedicineClassification is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Extension @.extension;
  has CodeableConcept @.classification;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_Regulatory_Schedule is FHIR is export {
  has Str $.id;
  has CodeableConcept $.schedule is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_Regulatory_MaxDispense is FHIR is export {
  has Str $.id;
  has Duration $.period;
  has Quantity $.quantity is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_Regulatory_Substitution is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Bool $.allowed is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class MedicationKnowledge_Regulatory is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has Reference $.regulatoryAuthority is required;
  has MedicationKnowledge_Regulatory_Schedule @.schedule;
  has MedicationKnowledge_Regulatory_MaxDispense $.maxDispense;
  has MedicationKnowledge_Regulatory_Substitution @.substitution;
}

class MedicationKnowledge_RelatedMedicationKnowledge is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Extension @.extension;
  has Reference @.reference is required;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_AdministrationGuidelines_Dosage is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Dosage @.dosage is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationKnowledge_AdministrationGuidelines_PatientCharacteristics is FHIR is export {
  has Str $.id;
  has Str @.value;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has ChoiceField $.characteristic is required where CodeableConcept|Quantity;
}
class MedicationKnowledge_AdministrationGuidelines is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has ChoiceField $.indication where CodeableConcept|Reference;
  has Extension @.modifierExtension;
  has MedicationKnowledge_AdministrationGuidelines_Dosage @.dosage;
  has MedicationKnowledge_AdministrationGuidelines_PatientCharacteristics @.patientCharacteristics;
}

class MedicationKnowledge is DomainResource is export {
  method resourceType(--> 'MedicationKnowledge') {}
  has CodeableConcept $.code;
  has FHIRCode $.status;
  has Quantity $.amount;
  has Str @.synonym;
  has CodeableConcept $.doseForm;
  has CodeableConcept @.productType;
  has Reference $.manufacturer;
  has CodeableConcept @.intendedRoute;
  has Reference @.contraindication;
  has Reference @.associatedMedication;
  has Markdown $.preparationInstruction;
  has MedicationKnowledge_Cost @.cost;
  has MedicationKnowledge_Kinetics @.kinetics;
  has MedicationKnowledge_Monograph @.monograph;
  has MedicationKnowledge_Packaging $.packaging;
  has MedicationKnowledge_Ingredient @.ingredient;
  has MedicationKnowledge_MonitoringProgram @.monitoringProgram;
  has MedicationKnowledge_DrugCharacteristic @.drugCharacteristic;
  has MedicationKnowledge_MedicineClassification @.medicineClassification;
  has MedicationKnowledge_Regulatory @.regulatory;
  has MedicationKnowledge_RelatedMedicationKnowledge @.relatedMedicationKnowledge;
  has MedicationKnowledge_AdministrationGuidelines @.administrationGuidelines;
}

class Slot is DomainResource is export {
  method resourceType(--> 'Slot') {}
  has DateTime $.end is required;
  has DateTime $.start is required;
  has FHIRCode $.status is required;
  has Str $.comment;
  has Reference $.schedule is required;
  has CodeableConcept @.specialty;
  has Identifier @.identifier;
  has Bool $.overbooked;
  has CodeableConcept @.serviceType;
  has CodeableConcept @.serviceCategory;
  has CodeableConcept $.appointmentType;
}

class MedicationStatement is DomainResource is export {
  method resourceType(--> 'MedicationStatement') {}
  has Annotation @.note;
  has Reference @.partOf;
  has FHIRCode $.status is required;
  has Dosage @.dosage;
  has Reference @.basedOn;
  has Reference $.subject is required;
  has Reference $.context;
  has CodeableConcept $.category;
  has Identifier @.identifier;
  has CodeableConcept @.reasonCode;
  has Reference @.derivedFrom;
  has CodeableConcept @.statusReason;
  has ChoiceField $.effective where DateTime|Period;
  has DateTime $.dateAsserted;
  has ChoiceField $.medication is required where CodeableConcept|Reference;
  has Reference @.reasonReference;
  has Reference $.informationSource;
}
class DiagnosticReport_Media is FHIR is export {
  has Str $.id;
  has Reference $.link is required;
  has Str $.comment;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class DiagnosticReport is DomainResource is export {
  method resourceType(--> 'DiagnosticReport') {}
  has CodeableConcept $.code is required;
  has FHIRCode $.status is required;
  has DateTime $.issued;
  has Reference @.result;
  has Reference @.basedOn;
  has Reference $.subject;
  has CodeableConcept @.category;
  has Reference @.specimen;
  has Reference $.encounter;
  has Reference @.performer;
  has Identifier @.identifier;
  has Str $.conclusion;
  has ChoiceField $.effective where DateTime|Period;
  has Reference @.imagingStudy;
  has Attachment @.presentedForm;
  has CodeableConcept @.conclusionCode;
  has Reference @.resultsInterpreter;
  has DiagnosticReport_Media @.media;
}
class SpecimenDefinition_TypeTested_Handling is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Duration $.maxDuration;
  has Str $.instruction;
  has Range $.temperatureRange;
  has Extension @.modifierExtension;
  has CodeableConcept $.temperatureQualifier;
}

class SpecimenDefinition_TypeTested_Container_Additive is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has ChoiceField $.additive is required where CodeableConcept|Reference;
  has Extension @.modifierExtension;
}
class SpecimenDefinition_TypeTested_Container is FHIR is export {
  has Str $.id;
  has CodeableConcept $.cap;
  has CodeableConcept $.type;
  has CodeableConcept $.material;
  has Quantity $.capacity;
  has Extension @.extension;
  has Str $.description;
  has Str $.preparation;
  has ChoiceField $.minimumVolume where Quantity|Str;
  has Extension @.modifierExtension;
  has SpecimenDefinition_TypeTested_Container_Additive @.additive;
}
class SpecimenDefinition_TypeTested is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Extension @.extension;
  has Bool $.isDerived;
  has FHIRCode $.preference is required;
  has Str $.requirement;
  has Duration $.retentionTime;
  has Extension @.modifierExtension;
  has CodeableConcept @.rejectionCriterion;
  has SpecimenDefinition_TypeTested_Handling @.handling;
  has SpecimenDefinition_TypeTested_Container $.container;
}

class SpecimenDefinition is DomainResource is export {
  method resourceType(--> 'SpecimenDefinition') {}
  has Identifier $.identifier;
  has Str $.timeAspect;
  has CodeableConcept @.collection;
  has CodeableConcept $.typeCollected;
  has CodeableConcept @.patientPreparation;
  has SpecimenDefinition_TypeTested @.typeTested;
}
class SubstanceReferenceInformation_Gene is FHIR is export {
  has Str $.id;
  has CodeableConcept $.gene;
  has Reference @.source;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has CodeableConcept $.geneSequenceOrigin;
}

class SubstanceReferenceInformation_Target is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Identifier $.target;
  has Reference @.source;
  has CodeableConcept $.organism;
  has Extension @.extension;
  has ChoiceField $.amount where Quantity|Range|Str;
  has CodeableConcept $.amountType;
  has CodeableConcept $.interaction;
  has CodeableConcept $.organismType;
  has Extension @.modifierExtension;
}

class SubstanceReferenceInformation_GeneElement is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Reference @.source;
  has Identifier $.element;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class SubstanceReferenceInformation_Classification is FHIR is export {
  has Str $.id;
  has CodeableConcept $.domain;
  has Reference @.source;
  has CodeableConcept @.subtype;
  has Extension @.extension;
  has CodeableConcept $.classification;
  has Extension @.modifierExtension;
}

class SubstanceReferenceInformation is DomainResource is export {
  method resourceType(--> 'SubstanceReferenceInformation') {}
  has Str $.comment;
  has SubstanceReferenceInformation_Gene @.gene;
  has SubstanceReferenceInformation_Target @.target;
  has SubstanceReferenceInformation_GeneElement @.geneElement;
  has SubstanceReferenceInformation_Classification @.classification;
}
class MedicinalProduct_SpecialDesignation is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has DateTime $.date;
  has CodeableConcept $.status;
  has CodeableConcept $.species;
  has Extension @.extension;
  has Identifier @.identifier;
  has CodeableConcept $.intendedUse;
  has ChoiceField $.indication where CodeableConcept|Reference;
  has Extension @.modifierExtension;
}

class MedicinalProduct_Name_NamePart is FHIR is export {
  has Str $.id;
  has Str $.part is required;
  has Coding $.type is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicinalProduct_Name_CountryLanguage is FHIR is export {
  has Str $.id;
  has CodeableConcept $.country is required;
  has CodeableConcept $.language is required;
  has Extension @.extension;
  has CodeableConcept $.jurisdiction;
  has Extension @.modifierExtension;
}
class MedicinalProduct_Name is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Str $.productName is required;
  has Extension @.modifierExtension;
  has MedicinalProduct_Name_NamePart @.namePart;
  has MedicinalProduct_Name_CountryLanguage @.countryLanguage;
}

class MedicinalProduct_ManufacturingBusinessOperation is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Reference $.regulator;
  has Reference @.manufacturer;
  has CodeableConcept $.operationType;
  has DateTime $.effectiveDate;
  has Extension @.modifierExtension;
  has CodeableConcept $.confidentialityIndicator;
  has Identifier $.authorisationReferenceNumber;
}

class MedicinalProduct is DomainResource is export {
  method resourceType(--> 'MedicinalProduct') {}
  has CodeableConcept $.type;
  has Coding $.domain;
  has Reference @.contact;
  has Identifier @.identifier;
  has Reference @.masterFile;
  has Reference @.clinicalTrial;
  has Identifier @.crossReference;
  has Str @.specialMeasures;
  has Any @.marketingStatus;
  has Reference @.attachedDocument;
  has CodeableConcept $.legalStatusOfSupply;
  has CodeableConcept @.productClassification;
  has Reference @.pharmaceuticalProduct;
  has CodeableConcept $.paediatricUseIndicator;
  has Reference @.packagedMedicinalProduct;
  has CodeableConcept $.additionalMonitoringIndicator;
  has CodeableConcept $.combinedPharmaceuticalDoseForm;
  has MedicinalProduct_SpecialDesignation @.specialDesignation;
  has MedicinalProduct_Name @.name is required;
  has MedicinalProduct_ManufacturingBusinessOperation @.manufacturingBusinessOperation;
}
class EpisodeOfCare_Diagnosis is FHIR is export {
  has Str $.id;
  has CodeableConcept $.role;
  has PositiveInt $.rank;
  has Extension @.extension;
  has Reference $.condition is required;
  has Extension @.modifierExtension;
}

class EpisodeOfCare_StatusHistory is FHIR is export {
  has Str $.id;
  has FHIRCode $.status is required;
  has Period $.period is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class EpisodeOfCare is DomainResource is export {
  method resourceType(--> 'EpisodeOfCare') {}
  has CodeableConcept @.type;
  has Reference @.team;
  has FHIRCode $.status is required;
  has Period $.period;
  has Reference $.patient is required;
  has Reference @.account;
  has Identifier @.identifier;
  has Reference $.careManager;
  has Reference @.referralRequest;
  has Reference $.managingOrganization;
  has EpisodeOfCare_Diagnosis @.diagnosis;
  has EpisodeOfCare_StatusHistory @.statusHistory;
}
class ResearchElementDefinition_Characteristic is FHIR is export {
  has Str $.id;
  has Bool $.exclude;
  has Extension @.extension;
  has UsageContext @.usageContext;
  has ChoiceField $.definition is required where Canonical|CodeableConcept|DataRequirement|Expression;
  has CodeableConcept $.unitOfMeasure;
  has Extension @.modifierExtension;
  has ChoiceField $.studyEffective where Duration|DateTime|Period|Timing;
  has ChoiceField $.participantEffective where Duration|DateTime|Period|Timing;
  has Str $.studyEffectiveDescription;
  has FHIRCode $.studyEffectiveGroupMeasure;
  has Duration $.studyEffectiveTimeFromStart;
  has Str $.participantEffectiveDescription;
  has FHIRCode $.participantEffectiveGroupMeasure;
  has Duration $.participantEffectiveTimeFromStart;
}

class ResearchElementDefinition is DomainResource is export {
  method resourceType(--> 'ResearchElementDefinition') {}
  has UriStr $.url;
  has Str $.name;
  has DateTime $.date;
  has FHIRCode $.type is required;
  has Str $.title;
  has Str $.usage;
  has CodeableConcept @.topic;
  has FHIRCode $.status is required;
  has ContactDetail @.author;
  has ContactDetail @.editor;
  has Str $.version;
  has ContactDetail @.contact;
  has Str @.comment;
  has Markdown $.purpose;
  has Canonical @.library;
  has Str $.subtitle;
  has ContactDetail @.reviewer;
  has ContactDetail @.endorser;
  has Str $.publisher;
  has Markdown $.copyright;
  has Identifier @.identifier;
  has Str $.shortTitle;
  has ChoiceField $.subject where CodeableConcept|Reference;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has Date $.approvalDate;
  has FHIRCode $.variableType;
  has Date $.lastReviewDate;
  has Period $.effectivePeriod;
  has RelatedArtifact @.relatedArtifact;
  has ResearchElementDefinition_Characteristic @.characteristic is required;
}
class Account_Coverage is FHIR is export {
  has Str $.id;
  has Reference $.coverage is required;
  has PositiveInt $.priority;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class Account_Guarantor is FHIR is export {
  has Str $.id;
  has Reference $.party is required;
  has Bool $.onHold;
  has Period $.period;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class Account is DomainResource is export {
  method resourceType(--> 'Account') {}
  has CodeableConcept $.type;
  has Str $.name;
  has Reference $.owner;
  has FHIRCode $.status is required;
  has Reference $.partOf;
  has Reference @.subject;
  has Identifier @.identifier;
  has Str $.description;
  has Period $.servicePeriod;
  has Account_Coverage @.coverage;
  has Account_Guarantor @.guarantor;
}
class ChargeItemDefinition_Applicability is FHIR is export {
  has Str $.id;
  has Str $.language;
  has Extension @.extension;
  has Str $.expression;
  has Str $.description;
  has Extension @.modifierExtension;
}

class ChargeItemDefinition_PropertyGroup_PriceComponent is FHIR is export {
  has Str $.id;
  has FHIRCode $.type is required;
  has CodeableConcept $.code;
  has Real $.factor;
  has Money $.amount;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class ChargeItemDefinition_PropertyGroup is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has ChargeItemDefinition_Applicability @.applicability;
  has Extension @.modifierExtension;
  has ChargeItemDefinition_PropertyGroup_PriceComponent @.priceComponent;
}

class ChargeItemDefinition is DomainResource is export {
  method resourceType(--> 'ChargeItemDefinition') {}
  has UriStr $.url is required;
  has DateTime $.date;
  has CodeableConcept $.code;
  has Str $.title;
  has Canonical @.partOf;
  has FHIRCode $.status is required;
  has Str $.version;
  has ContactDetail @.contact;
  has Canonical @.replaces;
  has Reference @.instance;
  has Str $.publisher;
  has Markdown $.copyright;
  has Identifier @.identifier;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has Date $.approvalDate;
  has UriStr @.derivedFromUri;
  has Date $.lastReviewDate;
  has Period $.effectivePeriod;
  has ChargeItemDefinition_Applicability @.applicability;
  has ChargeItemDefinition_PropertyGroup @.propertyGroup;
}
class CareTeam_Participant is FHIR is export {
  has Str $.id;
  has CodeableConcept @.role;
  has Reference $.member;
  has Period $.period;
  has Extension @.extension;
  has Reference $.onBehalfOf;
  has Extension @.modifierExtension;
}

class CareTeam is DomainResource is export {
  method resourceType(--> 'CareTeam') {}
  has Str $.name;
  has Annotation @.note;
  has FHIRCode $.status;
  has Period $.period;
  has Reference $.subject;
  has ContactPoint @.telecom;
  has CodeableConcept @.category;
  has Reference $.encounter;
  has Identifier @.identifier;
  has CodeableConcept @.reasonCode;
  has Reference @.reasonReference;
  has Reference @.managingOrganization;
  has CareTeam_Participant @.participant;
}
class NamingSystem_UniqueId is FHIR is export {
  has Str $.id;
  has FHIRCode $.type is required;
  has Str $.value is required;
  has Period $.period;
  has Str $.comment;
  has Extension @.extension;
  has Bool $.preferred;
  has Extension @.modifierExtension;
}

class NamingSystem is DomainResource is export {
  method resourceType(--> 'NamingSystem') {}
  has Str $.name is required;
  has FHIRCode $.kind is required;
  has DateTime $.date is required;
  has CodeableConcept $.type;
  has Str $.usage;
  has FHIRCode $.status is required;
  has ContactDetail @.contact;
  has Str $.publisher;
  has UsageContext @.useContext;
  has Str $.responsible;
  has Markdown $.description;
  has CodeableConcept @.jurisdiction;
  has NamingSystem_UniqueId @.uniqueId is required;
}
class DeviceRequest_Parameter is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code;
  has ChoiceField $.value where Bool|CodeableConcept|Quantity|Range;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class DeviceRequest is DomainResource is export {
  method resourceType(--> 'DeviceRequest') {}
  has Annotation @.note;
  has FHIRCode $.status;
  has FHIRCode $.intent is required;
  has Reference @.basedOn;
  has ChoiceField $.code is required where CodeableConcept|Reference;
  has Reference $.subject is required;
  has FHIRCode $.priority;
  has Reference $.encounter;
  has Reference $.requester;
  has Reference $.performer;
  has Reference @.insurance;
  has Identifier @.identifier;
  has DateTime $.authoredOn;
  has CodeableConcept @.reasonCode;
  has Reference @.priorRequest;
  has ChoiceField $.occurrence where DateTime|Period|Timing;
  has CodeableConcept $.performerType;
  has Reference @.supportingInfo;
  has UriStr @.instantiatesUri;
  has Identifier $.groupIdentifier;
  has Reference @.reasonReference;
  has Reference @.relevantHistory;
  has Canonical @.instantiatesCanonical;
  has DeviceRequest_Parameter @.parameter;
}
class QuestionnaireResponse_Item_Answer is FHIR is export {
  has Str $.id;
  has QuestionnaireResponse_Item @.item;
  has ChoiceField $.value where Attachment|Bool|Coding|Real|Date|DateTime|Int|Instant|Quantity|Reference|Str|UriStr;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class QuestionnaireResponse_Item is FHIR is export {
  has Str $.id;
  has Str $.text;
  has QuestionnaireResponse_Item @.item;
  has Str $.linkId is required;
  has Extension @.extension;
  has UriStr $.definition;
  has Extension @.modifierExtension;
  has QuestionnaireResponse_Item_Answer @.answer;
}

class QuestionnaireResponse is DomainResource is export {
  method resourceType(--> 'QuestionnaireResponse') {}
  has Reference @.partOf;
  has FHIRCode $.status is required;
  has Reference $.author;
  has Reference $.source;
  has Reference @.basedOn;
  has Reference $.subject;
  has DateTime $.authored;
  has Reference $.encounter;
  has Identifier $.identifier;
  has Canonical $.questionnaire;
  has QuestionnaireResponse_Item @.item;
}
class CodeSystem_Filter is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Str $.value is required;
  has FHIRCode @.operator is required;
  has Extension @.extension;
  has Str $.description;
  has Extension @.modifierExtension;
}

class CodeSystem_Property is FHIR is export {
  has Str $.id;
  has UriStr $.uri;
  has FHIRCode $.code is required;
  has FHIRCode $.type is required;
  has Extension @.extension;
  has Str $.description;
  has Extension @.modifierExtension;
}

class CodeSystem_Concept_Property