### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: lib/FHIR/DomainModel.rakumod
### ----------------------------------------------------
### -- Chunk 5 of 8
 is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has ChoiceField $.value is required where Bool|FHIRCode|Coding|Real|DateTime|Int|Str;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class CodeSystem_Concept_Designation is FHIR is export {
  has Str $.id;
  has Coding $.use;
  has Str $.value is required;
  has FHIRCode $.language;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class CodeSystem_Concept is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Str $.display;
  has CodeSystem_Concept @.concept;
  has Extension @.extension;
  has Str $.definition;
  has Extension @.modifierExtension;
  has CodeSystem_Concept_Property @.property;
  has CodeSystem_Concept_Designation @.designation;
}

class CodeSystem is DomainResource is export {
  method resourceType(--> 'CodeSystem') {}
  has UriStr $.url;
  has Str $.name;
  has DateTime $.date;
  has Str $.title;
  has UnsignedInt $.count;
  has FHIRCode $.status is required;
  has Str $.version;
  has ContactDetail @.contact;
  has Markdown $.purpose;
  has FHIRCode $.content is required;
  has Canonical $.valueSet;
  has Str $.publisher;
  has Markdown $.copyright;
  has Identifier @.identifier;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Canonical $.supplements;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has Bool $.caseSensitive;
  has Bool $.compositional;
  has Bool $.versionNeeded;
  has FHIRCode $.hierarchyMeaning;
  has CodeSystem_Filter @.filter;
  has CodeSystem_Property @.property;
  has CodeSystem_Concept @.concept;
}
class SubstanceSpecification_Code is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code;
  has CodeableConcept $.status;
  has Reference @.source;
  has Str $.comment;
  has Extension @.extension;
  has DateTime $.statusDate;
  has Extension @.modifierExtension;
}

class SubstanceSpecification_Moiety is FHIR is export {
  has Str $.id;
  has CodeableConcept $.role;
  has Str $.name;
  has Extension @.extension;
  has ChoiceField $.amount where Quantity|Str;
  has Identifier $.identifier;
  has CodeableConcept $.stereochemistry;
  has CodeableConcept $.opticalActivity;
  has Str $.molecularFormula;
  has Extension @.modifierExtension;
}

class SubstanceSpecification_Property is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code;
  has CodeableConcept $.category;
  has Extension @.extension;
  has ChoiceField $.amount where Quantity|Str;
  has Str $.parameters;
  has Extension @.modifierExtension;
  has ChoiceField $.definingSubstance where CodeableConcept|Reference;
}

class SubstanceSpecification_Name_Official is FHIR is export {
  has Str $.id;
  has DateTime $.date;
  has CodeableConcept $.status;
  has Extension @.extension;
  has CodeableConcept $.authority;
  has Extension @.modifierExtension;
}
class SubstanceSpecification_Name is FHIR is export {
  has Str $.id;
  has Str $.name is required;
  has CodeableConcept $.type;
  has CodeableConcept $.status;
  has CodeableConcept @.domain;
  has Reference @.source;
  has SubstanceSpecification_Name @.synonym;
  has CodeableConcept @.language;
  has Extension @.extension;
  has Bool $.preferred;
  has SubstanceSpecification_Name @.translation;
  has CodeableConcept @.jurisdiction;
  has Extension @.modifierExtension;
  has SubstanceSpecification_Name_Official @.official;
}

class SubstanceSpecification_Relationship is FHIR is export {
  has Str $.id;
  has Reference @.source;
  has Extension @.extension;
  has ChoiceField $.amount where Quantity|Range|Ratio|Str;
  has Bool $.isDefining;
  has CodeableConcept $.amountType;
  has ChoiceField $.substance where CodeableConcept|Reference;
  has CodeableConcept $.relationship;
  has Extension @.modifierExtension;
  has Ratio $.amountRatioLowLimit;
}

class SubstanceSpecification_Structure_Representation is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Extension @.extension;
  has Attachment $.attachment;
  has Str $.representation;
  has Extension @.modifierExtension;
}

class SubstanceSpecification_Structure_Isotope_MolecularWeight is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has CodeableConcept $.method;
  has Quantity $.amount;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class SubstanceSpecification_Structure_Isotope is FHIR is export {
  has Str $.id;
  has CodeableConcept $.name;
  has Quantity $.halfLife;
  has Extension @.extension;
  has Identifier $.identifier;
  has CodeableConcept $.substitution;
  has Extension @.modifierExtension;
  has SubstanceSpecification_Structure_Isotope_MolecularWeight $.molecularWeight;
}
class SubstanceSpecification_Structure is FHIR is export {
  has Str $.id;
  has Reference @.source;
  has Extension @.extension;
  has CodeableConcept $.stereochemistry;
  has CodeableConcept $.opticalActivity;
  has SubstanceSpecification_Structure_Isotope_MolecularWeight $.molecularWeight;
  has Str $.molecularFormula;
  has Extension @.modifierExtension;
  has Str $.molecularFormulaByMoiety;
  has SubstanceSpecification_Structure_Representation @.representation;
  has SubstanceSpecification_Structure_Isotope @.isotope;
}

class SubstanceSpecification is DomainResource is export {
  method resourceType(--> 'SubstanceSpecification') {}
  has CodeableConcept $.type;
  has CodeableConcept $.status;
  has CodeableConcept $.domain;
  has Reference @.source;
  has Str $.comment;
  has Reference $.polymer;
  has Reference $.protein;
  has Identifier $.identifier;
  has Str $.description;
  has Reference $.nucleicAcid;
  has Reference $.sourceMaterial;
  has SubstanceSpecification_Structure_Isotope_MolecularWeight @.molecularWeight;
  has Reference $.referenceInformation;
  has SubstanceSpecification_Code @.code;
  has SubstanceSpecification_Moiety @.moiety;
  has SubstanceSpecification_Property @.property;
  has SubstanceSpecification_Name @.name;
  has SubstanceSpecification_Relationship @.relationship;
  has SubstanceSpecification_Structure $.structure;
}
class MolecularSequence_Variant is FHIR is export {
  has Str $.id;
  has Int $.end;
  has Int $.start;
  has Str $.cigar;
  has Extension @.extension;
  has Str $.observedAllele;
  has Reference $.variantPointer;
  has Str $.referenceAllele;
  has Extension @.modifierExtension;
}

class MolecularSequence_Repository is FHIR is export {
  has Str $.id;
  has UriStr $.url;
  has FHIRCode $.type is required;
  has Str $.name;
  has Extension @.extension;
  has Str $.datasetId;
  has Str $.readsetId;
  has Str $.variantsetId;
  has Extension @.modifierExtension;
}

class MolecularSequence_Quality_Roc is FHIR is export {
  has Str $.id;
  has Int @.score;
  has Int @.numTP;
  has Int @.numFP;
  has Int @.numFN;
  has Real @.fMeasure;
  has Extension @.extension;
  has Real @.precision;
  has Real @.sensitivity;
  has Extension @.modifierExtension;
}
class MolecularSequence_Quality is FHIR is export {
  has Str $.id;
  has Int $.end;
  has FHIRCode $.type is required;
  has Real $.gtFP;
  has Int $.start;
  has Quantity $.score;
  has CodeableConcept $.method;
  has Real $.recall;
  has Real $.fScore;
  has Real $.truthTP;
  has Real $.queryTP;
  has Real $.truthFN;
  has Real $.queryFP;
  has Extension @.extension;
  has Real $.precision;
  has CodeableConcept $.standardSequence;
  has Extension @.modifierExtension;
  has MolecularSequence_Quality_Roc $.roc;
}

class MolecularSequence_ReferenceSeq is FHIR is export {
  has Str $.id;
  has FHIRCode $.strand;
  has Extension @.extension;
  has Int $.windowEnd;
  has CodeableConcept $.chromosome;
  has Str $.genomeBuild;
  has FHIRCode $.orientation;
  has Int $.windowStart;
  has CodeableConcept $.referenceSeqId;
  has Extension @.modifierExtension;
  has Str $.referenceSeqString;
  has Reference $.referenceSeqPointer;
}

class MolecularSequence_StructureVariant_Outer is FHIR is export {
  has Str $.id;
  has Int $.end;
  has Int $.start;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class MolecularSequence_StructureVariant_Inner is FHIR is export {
  has Str $.id;
  has Int $.end;
  has Int $.start;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class MolecularSequence_StructureVariant is FHIR is export {
  has Str $.id;
  has Bool $.exact;
  has Int $.length;
  has Extension @.extension;
  has CodeableConcept $.variantType;
  has Extension @.modifierExtension;
  has MolecularSequence_StructureVariant_Outer $.outer;
  has MolecularSequence_StructureVariant_Inner $.inner;
}

class MolecularSequence is DomainResource is export {
  method resourceType(--> 'MolecularSequence') {}
  has FHIRCode $.type;
  has Reference $.device;
  has Reference $.patient;
  has Reference @.pointer;
  has Reference $.specimen;
  has Quantity $.quantity;
  has Reference $.performer;
  has Identifier @.identifier;
  has Str $.observedSeq;
  has Int $.readCoverage;
  has Int $.coordinateSystem is required;
  has MolecularSequence_Variant @.variant;
  has MolecularSequence_Repository @.repository;
  has MolecularSequence_Quality @.quality;
  has MolecularSequence_ReferenceSeq $.referenceSeq;
  has MolecularSequence_StructureVariant @.structureVariant;
}
class CoverageEligibilityResponse_Error is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class CoverageEligibilityResponse_Insurance_Item_Benefit is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has ChoiceField $.used where Money|Str|UnsignedInt;
  has Extension @.extension;
  has ChoiceField $.allowed where Money|Str|UnsignedInt;
  has Extension @.modifierExtension;
}
class CoverageEligibilityResponse_Insurance_Item is FHIR is export {
  has Str $.id;
  has Str $.name;
  has CodeableConcept $.unit;
  has CodeableConcept $.term;
  has CodeableConcept $.network;
  has CodeableConcept $.category;
  has CodeableConcept @.modifier;
  has Reference $.provider;
  has Bool $.excluded;
  has Extension @.extension;
  has Str $.description;
  has CodeableConcept $.productOrService;
  has UriStr $.authorizationUrl;
  has Extension @.modifierExtension;
  has Bool $.authorizationRequired;
  has CodeableConcept @.authorizationSupporting;
  has CoverageEligibilityResponse_Insurance_Item_Benefit @.benefit;
}
class CoverageEligibilityResponse_Insurance is FHIR is export {
  has Str $.id;
  has Bool $.inforce;
  has Reference $.coverage is required;
  has Extension @.extension;
  has Period $.benefitPeriod;
  has Extension @.modifierExtension;
  has CoverageEligibilityResponse_Insurance_Item @.item;
}

class CoverageEligibilityResponse is DomainResource is export {
  method resourceType(--> 'CoverageEligibilityResponse') {}
  has CodeableConcept $.form;
  has FHIRCode $.status is required;
  has FHIRCode @.purpose is required;
  has Reference $.patient is required;
  has DateTime $.created is required;
  has Reference $.request is required;
  has FHIRCode $.outcome is required;
  has Reference $.insurer is required;
  has Reference $.requestor;
  has Identifier @.identifier;
  has Str $.preAuthRef;
  has ChoiceField $.serviced where Date|Period;
  has Str $.disposition;
  has CoverageEligibilityResponse_Error @.error;
  has CoverageEligibilityResponse_Insurance @.insurance;
}

class Library is DomainResource is export {
  method resourceType(--> 'Library') {}
  has UriStr $.url;
  has Str $.name;
  has CodeableConcept $.type is required;
  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 Markdown $.purpose;
  has Attachment @.content;
  has Str $.subtitle;
  has ContactDetail @.reviewer;
  has ContactDetail @.endorser;
  has Str $.publisher;
  has Markdown $.copyright;
  has ParameterDefinition @.parameter;
  has Identifier @.identifier;
  has ChoiceField $.subject where CodeableConcept|Reference;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has Date $.approvalDate;
  has Date $.lastReviewDate;
  has Period $.effectivePeriod;
  has RelatedArtifact @.relatedArtifact;
  has DataRequirement @.dataRequirement;
}
class Consent_Policy is FHIR is export {
  has Str $.id;
  has UriStr $.uri;
  has Extension @.extension;
  has UriStr $.authority;
  has Extension @.modifierExtension;
}

class Consent_Verification is FHIR is export {
  has Str $.id;
  has Bool $.verified is required;
  has Extension @.extension;
  has Reference $.verifiedWith;
  has DateTime $.verificationDate;
  has Extension @.modifierExtension;
}

class Consent_Provision_Data is FHIR is export {
  has Str $.id;
  has FHIRCode $.meaning is required;
  has Extension @.extension;
  has Reference $.reference is required;
  has Extension @.modifierExtension;
}

class Consent_Provision_Actor is FHIR is export {
  has Str $.id;
  has CodeableConcept $.role is required;
  has Extension @.extension;
  has Reference $.reference is required;
  has Extension @.modifierExtension;
}
class Consent_Provision is FHIR is export {
  has Str $.id;
  has FHIRCode $.type;
  has CodeableConcept @.code;
  has Coding @.class;
  has Period $.period;
  has CodeableConcept @.action;
  has Coding @.purpose;
  has Extension @.extension;
  has Consent_Provision @.provision;
  has Period $.dataPeriod;
  has Coding @.securityLabel;
  has Extension @.modifierExtension;
  has Consent_Provision_Data @.data;
  has Consent_Provision_Actor @.actor;
}

class Consent is DomainResource is export {
  method resourceType(--> 'Consent') {}
  has CodeableConcept $.scope is required;
  has FHIRCode $.status is required;
  has Reference $.patient;
  has CodeableConcept @.category is required;
  has DateTime $.dateTime;
  has Reference @.performer;
  has ChoiceField $.source where Attachment|Reference;
  has Identifier @.identifier;
  has CodeableConcept $.policyRule;
  has Reference @.organization;
  has Consent_Policy @.policy;
  has Consent_Verification @.verification;
  has Consent_Provision $.provision;
}

class Count is Quantity is export {
  
}
class InsurancePlan_Contact is FHIR is export {
  has Str $.id;
  has HumanName $.name;
  has CodeableConcept $.purpose;
  has ContactPoint @.telecom;
  has Address $.address;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class InsurancePlan_Coverage_Benefit_Limit is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code;
  has Quantity $.value;
  has Extension @.extension;
  has Extension @.modifierExtension;
}
class InsurancePlan_Coverage_Benefit is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Extension @.extension;
  has Str $.requirement;
  has Extension @.modifierExtension;
  has InsurancePlan_Coverage_Benefit_Limit @.limit;
}
class InsurancePlan_Coverage is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Reference @.network;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has InsurancePlan_Coverage_Benefit @.benefit is required;
}

class InsurancePlan_Plan_GeneralCost is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Money $.cost;
  has Str $.comment;
  has Extension @.extension;
  has PositiveInt $.groupSize;
  has Extension @.modifierExtension;
}

class InsurancePlan_Plan_SpecificCost_Benefit_Cost is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Quantity $.value;
  has Extension @.extension;
  has CodeableConcept @.qualifiers;
  has CodeableConcept $.applicability;
  has Extension @.modifierExtension;
}
class InsurancePlan_Plan_SpecificCost_Benefit is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has InsurancePlan_Plan_SpecificCost_Benefit_Cost @.cost;
}
class InsurancePlan_Plan_SpecificCost is FHIR is export {
  has Str $.id;
  has CodeableConcept $.category is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has InsurancePlan_Plan_SpecificCost_Benefit @.benefit;
}
class InsurancePlan_Plan is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Reference @.network;
  has Extension @.extension;
  has Identifier @.identifier;
  has Reference @.coverageArea;
  has Extension @.modifierExtension;
  has InsurancePlan_Plan_GeneralCost @.generalCost;
  has InsurancePlan_Plan_SpecificCost @.specificCost;
}

class InsurancePlan is DomainResource is export {
  method resourceType(--> 'InsurancePlan') {}
  has CodeableConcept @.type;
  has Str $.name;
  has Str @.alias;
  has FHIRCode $.status;
  has Period $.period;
  has Reference $.ownedBy;
  has Reference @.network;
  has Reference @.endpoint;
  has Identifier @.identifier;
  has Reference @.coverageArea;
  has Reference $.administeredBy;
  has InsurancePlan_Contact @.contact;
  has InsurancePlan_Coverage @.coverage;
  has InsurancePlan_Plan @.plan;
}

class Media is DomainResource is export {
  method resourceType(--> 'Media') {}
  has CodeableConcept $.type;
  has CodeableConcept $.view;
  has Annotation @.note;
  has PositiveInt $.width;
  has Reference @.partOf;
  has FHIRCode $.status is required;
  has DateTime $.issued;
  has Reference $.device;
  has PositiveInt $.height;
  has PositiveInt $.frames;
  has Reference @.basedOn;
  has Reference $.subject;
  has Attachment $.content is required;
  has CodeableConcept $.modality;
  has Reference $.operator;
  has CodeableConcept $.bodySite;
  has Real $.duration;
  has Reference $.encounter;
  has Identifier @.identifier;
  has ChoiceField $.created where DateTime|Period;
  has CodeableConcept @.reasonCode;
  has Str $.deviceName;
}
class CapabilityStatement_Software is FHIR is export {
  has Str $.id;
  has Str $.name is required;
  has Str $.version;
  has Extension @.extension;
  has DateTime $.releaseDate;
  has Extension @.modifierExtension;
}

class CapabilityStatement_Document is FHIR is export {
  has Str $.id;
  has FHIRCode $.mode is required;
  has Canonical $.profile is required;
  has Extension @.extension;
  has Markdown $.documentation;
  has Extension @.modifierExtension;
}

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

class CapabilityStatement_Rest_Security is FHIR is export {
  has Str $.id;
  has Bool $.cors;
  has CodeableConcept @.service;
  has Extension @.extension;
  has Markdown $.description;
  has Extension @.modifierExtension;
}

class CapabilityStatement_Rest_Interaction is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Extension @.extension;
  has Markdown $.documentation;
  has Extension @.modifierExtension;
}

class CapabilityStatement_Rest_Resource_Operation is FHIR is export {
  has Str $.id;
  has Str $.name is required;
  has Extension @.extension;
  has Canonical $.definition is required;
  has Markdown $.documentation;
  has Extension @.modifierExtension;
}

class CapabilityStatement_Rest_Resource_Interaction is FHIR is export {
  has Str $.id;
  has FHIRCode $.code is required;
  has Extension @.extension;
  has Markdown $.documentation;
  has Extension @.modifierExtension;
}

class CapabilityStatement_Rest_Resource_SearchParam is FHIR is export {
  has Str $.id;
  has Str $.name is required;
  has FHIRCode $.type is required;
  has Extension @.extension;
  has Canonical $.definition;
  has Markdown $.documentation;
  has Extension @.modifierExtension;
}
class CapabilityStatement_Rest_Resource is FHIR is export {
  has Str $.id;
  has FHIRCode $.type is required;
  has Canonical $.profile;
  has Extension @.extension;
  has FHIRCode $.versioning;
  has Bool $.readHistory;
  has Bool $.updateCreate;
  has Markdown $.documentation;
  has Str @.searchInclude;
  has FHIRCode $.conditionalRead;
  has FHIRCode @.referencePolicy;
  has Canonical @.supportedProfile;
  has Str @.searchRevInclude;
  has Extension @.modifierExtension;
  has Bool $.conditionalCreate;
  has Bool $.conditionalUpdate;
  has FHIRCode $.conditionalDelete;
  has CapabilityStatement_Rest_Resource_Operation @.operation;
  has CapabilityStatement_Rest_Resource_Interaction @.interaction;
  has CapabilityStatement_Rest_Resource_SearchParam @.searchParam;
}
class CapabilityStatement_Rest is FHIR is export {
  has Str $.id;
  has FHIRCode $.mode is required;
  has Extension @.extension;
  has CapabilityStatement_Rest_Resource_Operation @.operation;
  has CapabilityStatement_Rest_Resource_SearchParam @.searchParam;
  has Canonical @.compartment;
  has Markdown $.documentation;
  has Extension @.modifierExtension;
  has CapabilityStatement_Rest_Security $.security;
  has CapabilityStatement_Rest_Interaction @.interaction;
  has CapabilityStatement_Rest_Resource @.resource;
}

class CapabilityStatement_Messaging_Endpoint is FHIR is export {
  has Str $.id;
  has UrlStr $.address is required;
  has Coding $.protocol is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class CapabilityStatement_Messaging_SupportedMessage is FHIR is export {
  has Str $.id;
  has FHIRCode $.mode is required;
  has Extension @.extension;
  has Canonical $.definition is required;
  has Extension @.modifierExtension;
}
class CapabilityStatement_Messaging is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has UnsignedInt $.reliableCache;
  has Markdown $.documentation;
  has Extension @.modifierExtension;
  has CapabilityStatement_Messaging_Endpoint @.endpoint;
  has CapabilityStatement_Messaging_SupportedMessage @.supportedMessage;
}

class CapabilityStatement is DomainResource is export {
  method resourceType(--> 'CapabilityStatement') {}
  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 FHIRCode @.format is required;
  has Str $.version;
  has ContactDetail @.contact;
  has Markdown $.purpose;
  has Canonical @.imports;
  has Str $.publisher;
  has Markdown $.copyright;
  has UsageContext @.useContext;
  has Markdown $.description;
  has FHIRCode $.fhirVersion is required;
  has FHIRCode @.patchFormat;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has Canonical @.instantiates;
  has Canonical @.implementationGuide;
  has CapabilityStatement_Software $.software;
  has CapabilityStatement_Document @.document;
  has CapabilityStatement_Implementation $.implementation;
  has CapabilityStatement_Rest @.rest;
  has CapabilityStatement_Messaging @.messaging;
}
class GraphDefinition_Link_Target_Compartment is FHIR is export {
  has Str $.id;
  has FHIRCode $.use is required;
  has FHIRCode $.code is required;
  has FHIRCode $.rule is required;
  has Extension @.extension;
  has Str $.expression;
  has Str $.description;
  has Extension @.modifierExtension;
}
class GraphDefinition_Link_Target is FHIR is export {
  has Str $.id;
  has FHIRCode $.type is required;
  has GraphDefinition_Link @.link;
  has Str $.params;
  has Canonical $.profile;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has GraphDefinition_Link_Target_Compartment @.compartment;
}
class GraphDefinition_Link is FHIR is export {
  has Str $.id;
  has Int $.min;
  has Str $.max;
  has Str $.path;
  has Extension @.extension;
  has Str $.sliceName;
  has Str $.description;
  has Extension @.modifierExtension;
  has GraphDefinition_Link_Target @.target;
}

class GraphDefinition is DomainResource is export {
  method resourceType(--> 'GraphDefinition') {}
  has UriStr $.url;
  has Str $.name is required;
  has DateTime $.date;
  has FHIRCode $.start is required;
  has FHIRCode $.status is required;
  has Str $.version;
  has ContactDetail @.contact;
  has Markdown $.purpose;
  has Canonical $.profile;
  has Str $.publisher;
  has UsageContext @.useContext;
  has Markdown $.description;
  has Bool $.experimental;
  has CodeableConcept @.jurisdiction;
  has GraphDefinition_Link @.link;
}
class CoverageEligibilityRequest_Insurance is FHIR is export {
  has Str $.id;
  has Bool $.focal;
  has Reference $.coverage is required;
  has Extension @.extension;
  has Extension @.modifierExtension;
  has Str $.businessArrangement;
}

class CoverageEligibilityRequest_SupportingInfo is FHIR is export {
  has Str $.id;
  has PositiveInt $.sequence is required;
  has Extension @.extension;
  has Reference $.information is required;
  has Bool $.appliesToAll;
  has Extension @.modifierExtension;
}

class CoverageEligibilityRequest_Item_Diagnosis is FHIR is export {
  has Str $.id;
  has Extension @.extension;
  has ChoiceField $.diagnosis where CodeableConcept|Reference;
  has Extension @.modifierExtension;
}
class CoverageEligibilityRequest_Item is FHIR is export {
  has Str $.id;
  has Reference @.detail;
  has CodeableConcept $.category;
  has CodeableConcept @.modifier;
  has Reference $.provider;
  has Quantity $.quantity;
  has Reference $.facility;
  has Extension @.extension;
  has Money $.unitPrice;
  has CodeableConcept $.productOrService;
  has Extension @.modifierExtension;
  has PositiveInt @.supportingInfoSequence;
  has CoverageEligibilityRequest_Item_Diagnosis @.diagnosis;
}

class CoverageEligibilityRequest is DomainResource is export {
  method resourceType(--> 'CoverageEligibilityRequest') {}
  has FHIRCode $.status is required;
  has FHIRCode @.purpose is required;
  has Reference $.patient is required;
  has DateTime $.created is required;
  has Reference $.enterer;
  has Reference $.insurer is required;
  has CodeableConcept $.priority;
  has Reference $.provider;
  has Reference $.facility;
  has Identifier @.identifier;
  has ChoiceField $.serviced where Date|Period;
  has CoverageEligibilityRequest_Insurance @.insurance;
  has CoverageEligibilityRequest_SupportingInfo @.supportingInfo;
  has CoverageEligibilityRequest_Item @.item;
}
class PractitionerRole_NotAvailable is FHIR is export {
  has Str $.id;
  has Period $.during;
  has Extension @.extension;
  has Str $.description is required;
  has Extension @.modifierExtension;
}

class PractitionerRole_AvailableTime is FHIR is export {
  has Str $.id;
  has Bool $.allDay;
  has Extension @.extension;
  has FHIRCode @.daysOfWeek;
  has Instant $.availableEndTime;
  has Extension @.modifierExtension;
  has Instant $.availableStartTime;
}

class PractitionerRole is DomainResource is export {
  method resourceType(--> 'PractitionerRole') {}
  has CodeableConcept @.code;
  has Bool $.active;
  has Period $.period;
  has ContactPoint @.telecom;
  has Reference @.location;
  has Reference @.endpoint;
  has CodeableConcept @.specialty;
  has Identifier @.identifier;
  has Reference $.practitioner;
  has Reference $.organization;
  has Reference @.healthcareService;
  has Str $.availabilityExceptions;
  has PractitionerRole_NotAvailable @.notAvailable;
  has PractitionerRole_AvailableTime @.availableTime;
}
class ExplanationOfBenefit_Payee is FHIR is export {
  has Str $.id;
  has CodeableConcept $.type;
  has Reference $.party;
  has Extension @.extension;
  has Extension @.modifierExtension;
}

class ExplanationOfBenefit_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 ExplanationOfBenefit_Related is FHIR is export {
  has Str $.id;
  has Reference $.claim;
  has Extension @.extension;
  has Identifier $.reference;
  has CodeableConcept $.relationship;
  has Extension @.modifierExtension;
}

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

class ExplanationOfBenefit_CareTeam is FHIR is export {
  has Str $.id;
  has CodeableConcept $.role;
  has PositiveInt $.sequence is required;
  has Reference $.provider is required;
  has Extension @.extension;
  has Bool $.responsible;
  has CodeableConcept $.qualification;
  has Extension @.modifierExtension;
}

class ExplanationOfBenefit_Accident is FHIR is export {
  has Str $.id;
  has Date $.date;
  has CodeableConcept $.type;
  has Extension @.extension;
  has ChoiceField $.location where Address|Reference;
  has Extension @.modifierExtension;
}

class ExplanationOfBenefit_Diagnosis is FHIR is export {
  has Str $.id;
  has CodeableConcept @.type;
  has PositiveInt $.sequence is required;
  has Extension @.extension;
  has CodeableConcept $.onAdmission;
  has CodeableConcept $.packageCode;
  has ChoiceField $.diagnosis is required where CodeableConcept|Reference;
  has Extension @.modifierExtension;
}

class ExplanationOfBenefit_Procedure is FHIR is export {
  has Str $.id;
  has Reference @.udi;
  has CodeableConcept @.type;
  has DateTime $.date;
  has PositiveInt $.sequence is required;
  has Extension @.extension;
  has ChoiceField $.procedure is required where CodeableConcept|Reference;
  has Extension @.modifierExtension;
}

class ExplanationOfBenefit_Insurance is FHIR is export {
  has Str $.id;
  has Bool $.focal is required;
  has Reference $.coverage is required;
  has Extension @.extension;
  has Str @.preAuthRef;
  has Extension @.modifierExtension;
}

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

class ExplanationOfBenefit_SupportingInfo is FHIR is export {
  has Str $.id;
  has CodeableConcept $.code;
  has Coding $.reason;
  has PositiveInt $.sequence is required;
  has CodeableConcept $.category is required;
  has ChoiceField $.value where Attachment|Bool|Quantity|Reference|Str;
  has Extension @.extension;
  has ChoiceField $.timing where Date|Period;
  has Extension @.modifierExtension;
}

class ExplanationOfBenefit_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 ExplanationOfBenefit_Item_Detail_SubDetail is FHIR is export {
  has Str $.id;
  has Money $.net;
  has Reference @.udi;
  has Real $.factor;
  has CodeableConcept $.revenue;
  has PositiveInt $.sequence is required;
  has CodeableConcept $.category;
  has CodeableConcept @.modifier;
  has Quantity $.quantity;
  has Extension @.extension;
  has Money $.unitPrice;
  has PositiveInt @.noteNumber;
  has CodeableConcept @.programCode;
  has ExplanationOfBenefit_Item_Adjudication @.adjudication;
  has CodeableConcept $.productOrService is required;
  has Extension @.modifierExtension;
}
class ExplanationOfBenefit_Item_Detail is FHIR is export {
  has Str $.id;
  has Money $.net;
  has Reference @.udi;
  has Real $.factor;
  has CodeableConcept $.revenue;
  has PositiveInt $.sequence is required;
  has CodeableConcept $.category;
  has CodeableConcept @.modifier;
  has Quantity $.quantity;
  has Extension @.extension;
  has Money $.unitPrice;
  has PositiveInt @.noteNumber;
  has CodeableConcept @.programCode;
  has ExplanationOfBenefit_Item_Adjudication @.adjudication;
  has CodeableConcept $.productOrService is required;
  has Extension @.modifierExtension;
  has ExplanationOfBenefit_Item_Detail_SubDetail @.subDetail;
}
class ExplanationOfBenefit_Item is FHIR is export {
  has Str $.id;
  has Money $.net;
  has Reference @.udi;
  has Real $.factor;
  has CodeableConcept $.revenue;
  has CodeableConcept @.subSite;
  has PositiveInt $.sequence is required;
  has CodeableConcept $.category;
  has CodeableConcept @.modifier;
  has Quantity $.quantity;
  has CodeableConcept $.bodySite;
  has Extension @.extension;
  has Money $.unitPrice;
  has Reference @.encounter;
  has PositiveInt @.noteNumber;
  has CodeableConcept @.programCode;
  has ChoiceField $.serviced where Date|Period;
  has ChoiceField $.location where Address|CodeableConcept|Reference;
  has PositiveInt @.careTeamSequence;
  has CodeableConcept $.productOrService is required;
  has Extension @.modifierExtension;
  has PositiveInt @.diagnosisSequence;
  has PositiveInt @.procedureSequence;
  has PositiveInt @.informationSequence;
  has ExplanationOfBenefit_Item_Adjudication @.adjudication;
  has ExplanationOfBenefit_Item_Detail @.detail;
}

class ExplanationOfBenefit_AddItem_Detail_SubDetail is FHIR is export {
  has Str $.id;
  has Money $.net;
  has Real $.factor;
  has CodeableConcept @.modifier;
  has Quantity $.quantity;
 