### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: lib/FHIR/DomainModel.rakumod
### ----------------------------------------------------
### -- Chunk 2 of 8
 export {
  has Str $.id;
  has FHIRCode $.result is required;
  has Str $.detail;
  has Markdown $.message;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class TestReport_Setup_Action_Operation is FHIR is export {
  has Str $.id;
  has FHIRCode $.result is required;
  has UriStr $.detail;
  has Markdown $.message;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class TestReport_Setup_Action is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has TestReport_Setup_Action_Assert $.assert;
  has TestReport_Setup_Action_Operation $.operation;
}
class TestReport_Setup is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has TestReport_Setup_Action @.action is required;
}

class TestReport is DomainResource is export {
  method resourceType(--> 'TestReport') {}
  has Str $.name;
  has Real $.score;
  has FHIRCode $.status is required;
  has FHIRCode $.result is required;
  has Str $.tester;
  has DateTime $.issued;
  has Identifier $.identifier;
  has Reference $.testScript is required;
  has TestReport_Participant @.participant;
  has TestReport_Test @.test;
  has TestReport_Teardown $.teardown;
  has TestReport_Setup $.setup;
}

class EnrollmentResponse is DomainResource is export {
  method resourceType(--> 'EnrollmentResponse') {}
  has FHIRCode $.status;
  has Reference $.request;
  has FHIRCode $.outcome;
  has DateTime $.created;
  has Identifier @.identifier;
  has Str $.disposition;
  has Reference $.organization;
  has Reference $.requestProvider;
}
class MessageDefinition_Focus is FHIR is export {
  has Str $.id;
  has UnsignedInt $.min is required;
  has Str $.max;
  has FHIRCode $.code is required;
  has Canonical $.profile;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MessageDefinition_AllowedResponse is FHIR is export {
  has Str $.id;
  has Canonical $.message is required;
  has Extension @.extension;
  has Markdown $.situation;
  has Extension @.modifierExtension;
}

class MessageDefinition is DomainResource is export {
  method resourceType(--> 'MessageDefinition') {}
  has UriStr $.url;
  has Str $.name;
  has DateTime $.date is required;
  has Canonical $.base;
  has Str $.title;
  has Canonical @.graph;
  has FHIRCode $.status is required;
  has Canonical @.parent;
  has Str $.version;
  has ContactDetail @.contact;
  has Markdown $.purpose;
  has Canonical @.replaces;
  has ChoiceField $.event is required where Coding|UriStr;
  has FHIRCode $.category;
  has Str $.publisher;
  has Markdown $.copyright;
  has Identifier @.identifier;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has FHIRCode $.responseRequired;
  has MessageDefinition_Focus @.focus;
  has MessageDefinition_AllowedResponse @.allowedResponse;
}
class MedicinalProductPharmaceutical_Characteristics is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code is required;
  has CodeableConcept $.status;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicinalProductPharmaceutical_RouteOfAdministration_TargetSpecies_WithdrawalPeriod is FHIR is export {
  has Str $.id;
  has Quantity $.value is required;
  has CodeableConcept $.tissue is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has Str $.supportingInformation;
}
class MedicinalProductPharmaceutical_RouteOfAdministration_TargetSpecies is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has MedicinalProductPharmaceutical_RouteOfAdministration_TargetSpecies_WithdrawalPeriod @.withdrawalPeriod;
}
class MedicinalProductPharmaceutical_RouteOfAdministration is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code is required;
  has Extension @.extension;
  has Quantity $.firstDose;
  has Quantity $.maxSingleDose;
  has Quantity $.maxDosePerDay;
  has Extension @.modifierExtension;
  has Duration $.maxTreatmentPeriod;
  has Ratio $.maxDosePerTreatmentPeriod;
  has MedicinalProductPharmaceutical_RouteOfAdministration_TargetSpecies @.targetSpecies;
}

class MedicinalProductPharmaceutical is DomainResource is export {
  method resourceType(--> 'MedicinalProductPharmaceutical') {}
  has Reference @.device;
  has Identifier @.identifier;
  has Reference @.ingredient;
  has CodeableConcept $.unitOfPresentation;
  has CodeableConcept $.administrableDoseForm is required;
  has MedicinalProductPharmaceutical_Characteristics @.characteristics;
  has MedicinalProductPharmaceutical_RouteOfAdministration @.routeOfAdministration is required;
}
class TestScript_Origin is FHIR is export {
  has Str $.id;
  has Int $.index is required;
  has Coding $.profile is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class TestScript_Fixture is FHIR is export {
  has Str $.id;
  has Reference $.resource;
  has Extension @.extension;
  has Bool $.autocreate is required;
  has Bool $.autodelete is required;
  has Extension @.modifierExtension;
}

class TestScript_Variable is FHIR is export {
  has Str $.id;
  has Str $.name is required;
  has Str $.hint;
  has Str $.path;
  has Id $.sourceId;
  has Extension @.extension;
  has Str $.expression;
  has Str $.description;
  has Str $.headerField;
  has Str $.defaultValue;
  has Extension @.modifierExtension;
}

class TestScript_Destination is FHIR is export {
  has Str $.id;
  has Int $.index is required;
  has Coding $.profile is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class TestScript_Test_Action is FHIR is export {
  has Str $.id;
  has TestScript_Setup_Action_Assert $.assert;
  has Extension @.extension;
  has TestScript_Setup_Action_Operation $.operation;
  has Extension @.modifierExtension;
}
class TestScript_Test is FHIR is export {
  has Str $.id;
  has Str $.name;
  has Extension @.extension;
  has Str $.description;
  has Extension @.modifierExtension;
  has TestScript_Test_Action @.action is required;
}

class TestScript_Teardown_Action is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has TestScript_Setup_Action_Operation $.operation is required;
  has Extension @.modifierExtension;
}
class TestScript_Teardown is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has TestScript_Teardown_Action @.action is required;
}

class TestScript_Metadata_Link is FHIR is export {
  has Str $.id;
  has UriStr $.url is required;
  has Extension @.extension;
  has Str $.description;
  has Extension @.modifierExtension;
}

class TestScript_Metadata_Capability is FHIR is export {
  has Str $.id;
  has UriStr @.link;
  has Int @.origin;
  has Bool $.required is required;
  has Extension @.extension;
  has Bool $.validated is required;
  has Str $.description;
  has Int $.destination;
  has Canonical $.capabilities is required;
  has Extension @.modifierExtension;
}
class TestScript_Metadata is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has TestScript_Metadata_Link @.link;
  has TestScript_Metadata_Capability @.capability is required;
}

class TestScript_Setup_Action_Assert is FHIR is export {
  has Str $.id;
  has Str $.path;
  has Str $.label;
  has Str $.value;
  has FHIRCode $.operator;
  has FHIRCode $.resource;
  has FHIRCode $.response;
  has Id $.sourceId;
  has Extension @.extension;
  has FHIRCode $.direction;
  has Str $.minimumId;
  has Str $.expression;
  has Str $.requestURL;
  has Str $.description;
  has FHIRCode $.contentType;
  has Str $.headerField;
  has Bool $.warningOnly is required;
  has Str $.responseCode;
  has FHIRCode $.requestMethod;
  has Bool $.navigationLinks;
  has Extension @.modifierExtension;
  has Str $.compareToSourceId;
  has Id $.validateProfileId;
  has Str $.compareToSourcePath;
  has Str $.compareToSourceExpression;
}

class TestScript_Setup_Action_Operation_RequestHeader is FHIR is export {
  has Str $.id;
  has Str $.field is required;
  has Str $.value is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class TestScript_Setup_Action_Operation is FHIR is export {
  has Str $.id;
  has Str $.url;
  has Coding $.type;
  has Str $.label;
  has FHIRCode $.accept;
  has FHIRCode $.method;
  has Int $.origin;
  has Str $.params;
  has FHIRCode $.resource;
  has Id $.sourceId;
  has Id $.targetId;
  has Extension @.extension;
  has Id $.requestId;
  has Id $.responseId;
  has Str $.description;
  has FHIRCode $.contentType;
  has Int $.destination;
  has Bool $.encodeRequestUrl is required;
  has Extension @.modifierExtension;
  has TestScript_Setup_Action_Operation_RequestHeader @.requestHeader;
}
class TestScript_Setup_Action is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has TestScript_Setup_Action_Assert $.assert;
  has TestScript_Setup_Action_Operation $.operation;
}
class TestScript_Setup is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has TestScript_Setup_Action @.action is required;
}

class TestScript is DomainResource is export {
  method resourceType(--> 'TestScript') {}
  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 Markdown $.purpose;
  has Reference @.profile;
  has Str $.publisher;
  has Markdown $.copyright;
  has Identifier $.identifier;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has TestScript_Origin @.origin;
  has TestScript_Fixture @.fixture;
  has TestScript_Variable @.variable;
  has TestScript_Destination @.destination;
  has TestScript_Test @.test;
  has TestScript_Teardown $.teardown;
  has TestScript_Metadata $.metadata;
  has TestScript_Setup $.setup;
}
class FamilyMemberHistory_Condition is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code is required;
  has Annotation @.note;
  has CodeableConcept $.outcome;
  has ChoiceField $.onset where Age|Period|Range|Str;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has Bool $.contributedToDeath;
}

class FamilyMemberHistory is DomainResource is export {
  method resourceType(--> 'FamilyMemberHistory') {}
  has CodeableConcept $.sex;
  has DateTime $.date;
  has Str $.name;
  has Annotation @.note;
  has FHIRCode $.status is required;
  has ChoiceField $.age where Age|Range|Str;
  has Reference $.patient is required;
  has ChoiceField $.born where Date|Period|Str;
  has Identifier @.identifier;
  has CodeableConcept @.reasonCode;
  has ChoiceField $.deceased where Age|Bool|Date|Range|Str;
  has CodeableConcept $.relationship is required;
  has Bool $.estimatedAge;
  has UriStr @.instantiatesUri;
  has Reference @.reasonReference;
  has CodeableConcept $.dataAbsentReason;
  has Canonical @.instantiatesCanonical;
  has FamilyMemberHistory_Condition @.condition;
}
class TerminologyCapabilities_Closure is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Bool $.translation;
  has Extension @.modifierExtension;
}

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

class TerminologyCapabilities_Translation is FHIR is export {
  has Str $.id;
  has Bool $.needsMap is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class TerminologyCapabilities_ValidateCode is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Bool $.translations is required;
  has Extension @.modifierExtension;
}

class TerminologyCapabilities_Implementation is FHIR is export {
  has Str $.id;
  has UrlStr $.url;
  has Extension @.extension;
  has Str $.description is required;
  has Extension @.modifierExtension;
}

class TerminologyCapabilities_Expansion_Parameter is FHIR is export {
  has Str $.id;
  has FHIRCode $.name is required;
  has Extension @.extension;
  has Str $.documentation;
  has Extension @.modifierExtension;
}
class TerminologyCapabilities_Expansion is FHIR is export {
  has Str $.id;
  has Bool $.paging;
  has Extension @.extension;
  has Bool $.incomplete;
  has Markdown $.textFilter;
  has Bool $.hierarchical;
  has Extension @.modifierExtension;
  has TerminologyCapabilities_Expansion_Parameter @.parameter;
}

class TerminologyCapabilities_CodeSystem_Version_Filter is FHIR is export {
  has Str $.id;
  has FHIRCode @.op is required;
  has FHIRCode $.code is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class TerminologyCapabilities_CodeSystem_Version is FHIR is export {
  has Str $.id;
  has Str $.code;
  has FHIRCode @.language;
  has FHIRCode @.property;
  has Extension @.extension;
  has Bool $.isDefault;
  has Bool $.compositional;
  has Extension @.modifierExtension;
  has TerminologyCapabilities_CodeSystem_Version_Filter @.filter;
}
class TerminologyCapabilities_CodeSystem is FHIR is export {
  has Str $.id;
  has Canonical $.uri;
  has Extension @.extension;
  has Bool $.subsumption;
  has Extension @.modifierExtension;
  has TerminologyCapabilities_CodeSystem_Version @.version;
}

class TerminologyCapabilities is DomainResource is export {
  method resourceType(--> 'TerminologyCapabilities') {}
  has UriStr $.url;
  has Str $.name;
  has DateTime $.date is required;
  has FHIRCode $.kind is required;
  has Str $.title;
  has FHIRCode $.status is required;
  has Str $.version;
  has ContactDetail @.contact;
  has Markdown $.purpose;
  has Str $.publisher;
  has Markdown $.copyright;
  has UsageContext @.useContext;
  has Bool $.lockedDate;
  has FHIRCode $.codeSearch;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has TerminologyCapabilities_Closure $.closure;
  has TerminologyCapabilities_Software $.software;
  has TerminologyCapabilities_Translation $.translation;
  has TerminologyCapabilities_ValidateCode $.validateCode;
  has TerminologyCapabilities_Implementation $.implementation;
  has TerminologyCapabilities_Expansion $.expansion;
  has TerminologyCapabilities_CodeSystem @.codeSystem;
}
class ExampleScenario_Actor is FHIR is export {
  has Str $.id;
  has FHIRCode $.type is required;
  has Str $.name;
  has Str $.actorId is required;
  has Extension @.extension;
  has Markdown $.description;
  has Extension @.modifierExtension;
}

class ExampleScenario_Process_Step_Operation is FHIR is export {
  has Str $.id;
  has Str $.type;
  has Str $.name;
  has Str $.number is required;
  has ExampleScenario_Instance_ContainedInstance $.request;
  has Str $.receiver;
  has ExampleScenario_Instance_ContainedInstance $.response;
  has Extension @.extension;
  has Str $.initiator;
  has Markdown $.description;
  has Bool $.receiverActive;
  has Bool $.initiatorActive;
  has Extension @.modifierExtension;
}

class ExampleScenario_Process_Step_Alternative is FHIR is export {
  has Str $.id;
  has ExampleScenario_Process_Step @.step;
  has Str $.title is required;
  has Extension @.extension;
  has Markdown $.description;
  has Extension @.modifierExtension;
}
class ExampleScenario_Process_Step is FHIR is export {
  has Str $.id;
  has Bool $.pause;
  has ExampleScenario_Process @.process;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has ExampleScenario_Process_Step_Operation $.operation;
  has ExampleScenario_Process_Step_Alternative @.alternative;
}
class ExampleScenario_Process is FHIR is export {
  has Str $.id;
  has Str $.title is required;
  has Extension @.extension;
  has Markdown $.description;
  has Markdown $.preConditions;
  has Markdown $.postConditions;
  has Extension @.modifierExtension;
  has ExampleScenario_Process_Step @.step;
}

class ExampleScenario_Instance_Version is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Str $.versionId is required;
  has Markdown $.description is required;
  has Extension @.modifierExtension;
}

class ExampleScenario_Instance_ContainedInstance is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has Str $.versionId;
  has Str $.resourceId is required;
  has Extension @.modifierExtension;
}
class ExampleScenario_Instance is FHIR is export {
  has Str $.id;
  has Str $.name;
  has Extension @.extension;
  has Str $.resourceId is required;
  has Markdown $.description;
  has FHIRCode $.resourceType is required;
  has Extension @.modifierExtension;
  has ExampleScenario_Instance_Version @.version;
  has ExampleScenario_Instance_ContainedInstance @.containedInstance;
}

class ExampleScenario is DomainResource is export {
  method resourceType(--> 'ExampleScenario') {}
  has UriStr $.url;
  has Str $.name;
  has DateTime $.date;
  has FHIRCode $.status is required;
  has Str $.version;
  has ContactDetail @.contact;
  has Markdown $.purpose;
  has Canonical @.workflow;
  has Str $.publisher;
  has Markdown $.copyright;
  has Identifier @.identifier;
  has UsageContext @.useContext;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has ExampleScenario_Actor @.actor;
  has ExampleScenario_Process @.process;
  has ExampleScenario_Instance @.instance;
}
class Timing_Repeat is FHIR is export {
  has Str $.id;
  has FHIRCode @.when;
  has PositiveInt $.count;
  has Real $.period;
  has UnsignedInt $.offset;
  has PositiveInt $.countMax;
  has Real $.duration;
  has Extension @.extension;
  has ChoiceField $.bounds where Duration|Period|Range;
  has PositiveInt $.frequency;
  has Real $.periodMax;
  has FHIRCode @.dayOfWeek;
  has Instant @.timeOfDay;
  has FHIRCode $.periodUnit;
  has Real $.durationMax;
  has FHIRCode $.durationUnit;
  has PositiveInt $.frequencyMax;
}

class Timing is BackboneElement is export {
  has CodeableConcept $.code;
  has DateTime @.event;
  has Timing_Repeat $.repeat;
}
class MessageHeader_Source is FHIR is export {
  has Str $.id;
  has Str $.name;
  has Str $.version;
  has ContactPoint $.contact;
  has Str $.software;
  has UrlStr $.endpoint is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MessageHeader_Response is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Reference $.details;
  has Extension @.extension;
  has Id $.identifier is required;
  has Extension @.modifierExtension;
}

class MessageHeader_Destination is FHIR is export {
  has Str $.id;
  has Str $.name;
  has Reference $.target;
  has UrlStr $.endpoint is required;
  has Reference $.receiver;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MessageHeader is DomainResource is export {
  method resourceType(--> 'MessageHeader') {}
  has Reference @.focus;
  has Reference $.sender;
  has Reference $.author;
  has CodeableConcept $.reason;
  has Reference $.enterer;
  has ChoiceField $.event is required where Coding|UriStr;
  has Canonical $.definition;
  has Reference $.responsible;
  has MessageHeader_Source $.source is required;
  has MessageHeader_Response $.response;
  has MessageHeader_Destination @.destination;
}
class Goal_Target is FHIR is export {
  has Str $.id;
  has ChoiceField $.due where Duration|Date;
  has CodeableConcept $.measure;
  has Extension @.extension;
  has ChoiceField $.detail where Bool|CodeableConcept|Int|Quantity|Range|Ratio|Str;
  has Extension @.modifierExtension;
}

class Goal is DomainResource is export {
  method resourceType(--> 'Goal') {}
  has Annotation @.note;
  has Reference $.subject is required;
  has CodeableConcept @.category;
  has CodeableConcept $.priority;
  has ChoiceField $.start where CodeableConcept|Date;
  has Reference @.addresses;
  has Identifier @.identifier;
  has Date $.statusDate;
  has CodeableConcept $.description is required;
  has Reference $.expressedBy;
  has CodeableConcept @.outcomeCode;
  has Str $.statusReason;
  has FHIRCode $.lifecycleStatus is required;
  has Reference @.outcomeReference;
  has CodeableConcept $.achievementStatus;
  has Goal_Target @.target;
}
class MedicationDispense_Performer is FHIR is export {
  has Str $.id;
  has Reference $.actor is required;
  has CodeableConcept $.function;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationDispense_Substitution is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has CodeableConcept @.reason;
  has Extension @.extension;
  has Bool $.wasSubstituted is required;
  has Reference @.responsibleParty;
  has Extension @.modifierExtension;
}

class MedicationDispense is DomainResource is export {
  method resourceType(--> 'MedicationDispense') {}
  has CodeableConcept $.type;
  has Annotation @.note;
  has Reference @.partOf;
  has FHIRCode $.status is required;
  has Reference $.subject;
  has Reference $.context;
  has CodeableConcept $.category;
  has Reference $.location;
  has Quantity $.quantity;
  has Reference @.receiver;
  has Identifier @.identifier;
  has Quantity $.daysSupply;
  has Reference $.destination;
  has DateTime $.whenPrepared;
  has Reference @.eventHistory;
  has ChoiceField $.medication is required where CodeableConcept|Reference;
  has Reference @.detectedIssue;
  has DateTime $.whenHandedOver;
  has ChoiceField $.statusReason where CodeableConcept|Reference;
  has Dosage @.dosageInstruction;
  has Reference @.supportingInformation;
  has Reference @.authorizingPrescription;
  has MedicationDispense_Performer @.performer;
  has MedicationDispense_Substitution $.substitution;
}
class OperationDefinition_Overload is FHIR is export {
  has Str $.id;
  has Str $.comment;
  has Extension @.extension;
  has Str @.parameterName;
  has Extension @.modifierExtension;
}

class OperationDefinition_Parameter_Binding is FHIR is export {
  has Str $.id;
  has FHIRCode $.strength is required;
  has Canonical $.valueSet is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class OperationDefinition_Parameter_ReferencedFrom is FHIR is export {
  has Str $.id;
  has Str $.source is required;
  has Str $.sourceId;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class OperationDefinition_Parameter is FHIR is export {
  has Str $.id;
  has FHIRCode $.use is required;
  has Int $.min is required;
  has Str $.max is required;
  has FHIRCode $.name is required;
  has FHIRCode $.type;
  has OperationDefinition_Parameter @.part;
  has Extension @.extension;
  has FHIRCode $.searchType;
  has Str $.documentation;
  has Canonical @.targetProfile;
  has Extension @.modifierExtension;
  has OperationDefinition_Parameter_Binding $.binding;
  has OperationDefinition_Parameter_ReferencedFrom @.referencedFrom;
}

class OperationDefinition is DomainResource is export {
  method resourceType(--> 'OperationDefinition') {}
  has UriStr $.url;
  has Str $.name is required;
  has FHIRCode $.kind is required;
  has DateTime $.date;
  has FHIRCode $.code is required;
  has Canonical $.base;
  has Bool $.type is required;
  has Str $.title;
  has FHIRCode $.status is required;
  has Bool $.system is required;
  has Str $.version;
  has ContactDetail @.contact;
  has Markdown $.purpose;
  has Markdown $.comment;
  has FHIRCode @.resource;
  has Bool $.instance is required;
  has Str $.publisher;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has Bool $.affectsState;
  has Canonical $.inputProfile;
  has Canonical $.outputProfile;
  has OperationDefinition_Overload @.overload;
  has OperationDefinition_Parameter @.parameter;
}
class ClaimResponse_Total is FHIR is export {
  has Str $.id;
  has Money $.amount is required;
  has CodeableConcept $.category is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class ClaimResponse_Error is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code is required;
  has Extension @.extension;
  has PositiveInt $.itemSequence;
  has PositiveInt $.detailSequence;
  has Extension @.modifierExtension;
  has PositiveInt $.subDetailSequence;
}

class ClaimResponse_Payment is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Date $.date;
  has Money $.amount is required;
  has Extension @.extension;
  has Money $.adjustment;
  has Identifier $.identifier;
  has CodeableConcept $.adjustmentReason;
  has Extension @.modifierExtension;
}

class ClaimResponse_ProcessNote is FHIR is export {
  has Str $.id;
  has FHIRCode $.type;
  has Str $.text is required;
  has PositiveInt $.number;
  has CodeableConcept $.language;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class ClaimResponse_Insurance is FHIR is export {
  has Str $.id;
  has Bool $.focal is required;
  has PositiveInt $.sequence is required;
  has Reference $.coverage is required;
  has Extension @.extension;
  has Reference $.claimResponse;
  has Extension @.modifierExtension;
  has Str $.businessArrangement;
}

class ClaimResponse_Item_Adjudication is FHIR is export {
  has Str $.id;
  has Real $.value;
  has CodeableConcept $.reason;
  has Money $.amount;
  has CodeableConcept $.category is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class ClaimResponse_Item_Detail_SubDetail is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has PositiveInt @.noteNumber;
  has ClaimResponse_Item_Adjudication @.adjudication;
  has Extension @.modifierExtension;
  has PositiveInt $.subDetailSequence is required;
}
class ClaimResponse_Item_Detail is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has PositiveInt @.noteNumber;
  has ClaimResponse_Item_Adjudication @.adjudication is required;
  has PositiveInt $.detailSequence is required;
  has Extension @.modifierExtension;
  has ClaimResponse_Item_Detail_SubDetail @.subDetail;
}
class ClaimResponse_Item is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has PositiveInt @.noteNumber;
  has PositiveInt $.itemSequence is required;
  has Extension @.modifierExtension;
  has ClaimResponse_Item_Adjudication @.adjudication is required;
  has ClaimResponse_Item_Detail @.detail;
}

class ClaimResponse_AddItem_Detail_SubDetail is FHIR is export {
  has Str $.id;
  has Money $.net;
  has Real $.factor;
  has CodeableConcept @.modifier;
  has Quantity $.quantity;
  has Extension @.extension;
  has Money $.unitPrice;
  has PositiveInt @.noteNumber;
  has ClaimResponse_Item_Adjudication @.adjudication is required;
  has CodeableConcept $.productOrService is required;
  has Extension @.modifierExtension;
}
class ClaimResponse_AddItem_Detail is FHIR is export {
  has Str $.id;
  has Money $.net;
  has Real $.factor;
  has CodeableConcept @.modifier;
  has Quantity $.quantity;
  has Extension @.extension;
  has Money $.unitPrice;
  has PositiveInt @.noteNumber;
  has ClaimResponse_Item_Adjudication @.adjudication is required;
  has CodeableConcept $.productOrService is required;
  has Extension @.modifierExtension;
  has ClaimResponse_AddItem_Detail_SubDetail @.subDetail;
}
class ClaimResponse_AddItem is FHIR is export {
  has Str $.id;
  has Money $.net;
  has Real $.factor;
  has CodeableConcept @.subSite;
  has Reference @.provider;
  has CodeableConcept @.modifier;
  has Quantity $.quantity;
  has CodeableConcept $.bodySite;
  has Extension @.extension;
  has Money $.unitPrice;
  has PositiveInt @.noteNumber;
  has CodeableConcept @.programCode;
  has ChoiceField $.serviced where Date|Period;
  has ChoiceField $.location where Address|CodeableConcept|Reference;
  has PositiveInt @.itemSequence;
  has ClaimResponse_Item_Adjudication @.adjudication is required;
  has PositiveInt @.detailSequence;
  has CodeableConcept $.productOrService is required;
  has Extension @.modifierExtension;
  has PositiveInt @.subdetailSequence;
  has ClaimResponse_AddItem_Detail @.detail;
}

class ClaimResponse is DomainResource is export {
  method resourceType(--> 'ClaimResponse') {}
  has FHIRCode $.use is required;
  has CodeableConcept $.type is required;
  has Attachment $.form;
  has FHIRCode $.status is required;
  has CodeableConcept $.subType;
  has Reference $.patient is required;
  has DateTime $.created is required;
  has Reference $.insurer is required;
  has Reference $.request;
  has FHIRCode $.outcome is required;
  has CodeableConcept $.formCode;
  has Reference $.requestor;
  has CodeableConcept $.payeeType;
  has Identifier @.identifier;
  has Str $.preAuthRef;
  has Str $.disposition;
  has ClaimResponse_Item_Adjudication @.adjudication;
  has CodeableConcept $.fundsReserve;
  has Period $.preAuthPeriod;
  has Reference @.communicationRequest;
  has ClaimResponse_Total @.total;
  has ClaimResponse_Error @.error;
  has ClaimResponse_Payment $.payment;
  has ClaimResponse_ProcessNote @.processNote;
  has ClaimResponse_Insurance @.insurance;
  has ClaimResponse_Item @.item;
  has ClaimResponse_AddItem @.addItem;
}
class DocumentReference_Content is FHIR is export {
  has Str $.id;
  has Coding $.format;
  has Extension @.extension;
  has Attachment $.attachment is required;
  has Extension @.modifierExtension;
}

class DocumentReference_Context is FHIR is export {
  has Str $.id;
  has CodeableConcept @.event;
  has Period $.period;
  has Reference @.related;
  has Extension @.extension;
  has Reference @.encounter;
  has CodeableConcept $.facilityType;
  has CodeableConcept $.practiceSetting;
  has Extension @.modifierExtension;
  has Reference $.sourcePatientInfo;
}

class DocumentReference_RelatesTo is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Reference $.target is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class DocumentReference is DomainResource is export {
  method resourceType(--> 'DocumentReference') {}
  has CodeableConcept $.type;
  has DateTime $.date;
  has FHIRCode $.status is required;
  has Reference @.author;
  has Reference $.subject;
  has CodeableConcept @.category;
  has FHIRCode $.docStatus;
  has Reference $.custodian;
  has Identifier @.identifier;
  has Str $.description;
  has Reference $.authenticator;
  has CodeableConcept @.securityLabel;
  has Identifier $.masterIdentifier;
  has DocumentReference_Content @.content is required;
  has DocumentReference_Context $.context;
  has DocumentReference_RelatesTo @.relatesTo;
}
class MedicationAdministration_Dosage is FHIR is export {
  has Str $.id;
  has Str $.text;
  has CodeableConcept $.site;
  has Quantity $.dose;
  has CodeableConcept $.route;
  has CodeableConcept $.method;
  has ChoiceField $.rate where Quantity|Ratio;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationAdministration_Performer is FHIR is export {
  has Str $.id;
  has Reference $.actor is required;
  has CodeableConcept $.function;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MedicationAdministration is DomainResource is export {
  method resourceType(--> 'MedicationAdministration') {}
  has Annotation @.note;
  has Reference @.partOf;
  has FHIRCode $.status is required;
  has Reference @.device;
  has Reference $.subject is required;
  has Reference $.context;
  has Reference $.request;
  has CodeableConcept $.category;
  has Identifier @.identifier;
  has CodeableConcept @.reasonCode;
  has UriStr @.instantiates;
  has CodeableConcept @.statusReason;
  has ChoiceField $.effective is required where DateTime|Period;
  has Reference @.eventHistory;
  has ChoiceField $.medication is required where CodeableConcept|Reference;
  has Reference @.reasonReference;
  has Reference @.supportingInformation;
  has MedicationAdministration_Dosage $.dosage;
  has MedicationAdministration_Performer @.performer;
}

class AppointmentResponse is DomainResource is export {
  method resourceType(--> 'AppointmentResponse') {}
  has DateTime $.end;
  has DateTime $.start;
  has Reference $.actor;
  has Str $.comment;
  has Identifier @.identifier;
  has Reference $.appointment is required;
  has CodeableConcept @.participantType;
  has FHIRCode $.participantStatus is required;
}
class Provenance_Agent is FHIR is export {
  has Str $.id;
  has Reference $.who is required;
  has CodeableConcept $.type;
  has CodeableConcept @.role;
  has Extension @.extension;
  has Reference $.onBehalfOf;
  has Extension @.modifierExtension;
}

class Provenance_Entity is FHIR is export {
  has Str $.id;
  has FHIRCode $.role is required;
  has Reference $.what is required;
  has Provenance_Agent @.agent;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class Provenance is DomainResource is export {
  method resourceType(--> 'Provenance') {}
  has Reference @.target is required;
  has UriStr @.policy;
  has CodeableConcept @.reason;
  has DateTime $.recorded is required;
  has Reference $.location;
  has CodeableConcept $.activity