from typing import Sequence as Sequence_, Optional as Optional_, Literal as Literal_, Annotated as Annotated_, NewType as NewType_ # type: ignore

from .BaseModel import BaseModel as BaseModel
from pydantic import Field, Extra


class Element(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Base definition for all elements in a resource."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class BackboneElement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Base definition for all elements that are defined inside a resource - but not those in a data type."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


base64Binary = NewType_('base64Binary', str)


'A stream of bytes'


boolean = NewType_('boolean', bool)


'Value of "true" or "false"'


canonical = NewType_('canonical', str)


'A URI that is a reference to a canonical URL on a FHIR resource'


code = NewType_('code', str)


'A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents'


date = NewType_('date', str)


'A date or partial date (e.g. just year or year + month). There is no UTC offset. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.'


dateTime = NewType_('dateTime', str)


'A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a UTC offset SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.'


decimal = NewType_('decimal', float)


'A rational number with implicit precision'


id = NewType_('id', str)


'Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.'


instant = NewType_('instant', str)


'An instant in time - known at least to the second'


integer = NewType_('integer', int)


'A whole number'


integer64 = NewType_('integer64', int)


'A very large whole number'


markdown = NewType_('markdown', str)


'A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine'


oid = NewType_('oid', str)


'An OID represented as a URI'


positiveInt = NewType_('positiveInt', str)


'An integer with a value that is positive (e.g. >0)'


string = NewType_('string', str)


'A sequence of Unicode characters'


time = NewType_('time', str)


'A time during the day, with no date specified'


unsignedInt = NewType_('unsignedInt', str)


'An integer with a value that is not negative (e.g. >= 0)'


uri = NewType_('uri', str)


'String of characters used to identify a name or a resource'


url = NewType_('url', str)


'A URI that is a literal reference'


uuid = NewType_('uuid', str)


'A UUID, represented as a URI'


xhtml = NewType_('xhtml', str)


'XHTML'


class Address(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
The ISO21090-codedString may be used to provide a coded representation of the contents of strings in an Address."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Optional_['code'] = Field(default=None)
    'The purpose of this address.'
    type: Optional_['code'] = Field(default=None)
    'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.'
    text: Optional_['string'] = Field(default=None)
    'Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts.'
    line: Sequence_['string'] = Field(default_factory=list)
    'This component contains the house number, apartment number, street name, street direction,  P.O. Box number, delivery hints, and similar address information.'
    city: Optional_['string'] = Field(default=None)
    'The name of the city, town, suburb, village or other community or delivery center.'
    state: Optional_['string'] = Field(default=None)
    'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes).'
    period: Optional_['Period'] = Field(default=None)
    'Time period when address was/is in use.'
    country: Optional_['string'] = Field(default=None)
    'Country - a nation as commonly understood or generally accepted.'
    district: Optional_['string'] = Field(default=None)
    'The name of the administrative area (county).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    postalCode: Optional_['string'] = Field(default=None)
    'A postal code designating a region defined by the postal service.'


class Age(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A duration of time during which an organism (or a process) has existed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    unit: Optional_['string'] = Field(default=None)
    'A human-readable form of the unit.'
    value: Optional_['decimal'] = Field(default=None)
    'The value of the measured amount. The value includes an implicit precision in the presentation of the value.'
    system: Optional_['uri'] = Field(default=None)
    'The identification of the system that provides the coded form of the unit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Optional_['code'] = Field(default=None)
    'How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.'
    code: Optional_['code'] = Field(default=None)
    'A computer processable form of the unit in some unit representation system.'


class Annotation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A  text note which also  contains information about who made the statement and when."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    time: Optional_['dateTime'] = Field(default=None)
    'Indicates when this particular annotation was made.'
    text: 'markdown' = Field(default=...)
    'The text of the annotation in markdown format.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    authorReference: Optional_['Reference'] = Field(default=None)
    'The individual responsible for making the annotation.'
    authorString: Optional_['string'] = Field(default=None)
    'The individual responsible for making the annotation.'


class Attachment(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """For referring to data content defined in other formats."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    data: Optional_['base64Binary'] = Field(default=None)
    'The actual data of the attachment - a sequence of bytes, base64 encoded.'
    size: Optional_['integer64'] = Field(default=None)
    'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).'
    hash: Optional_['base64Binary'] = Field(default=None)
    'The calculated hash of the data using SHA-1. Represented using base64.'
    title: Optional_['string'] = Field(default=None)
    'A label or set of text to display in place of the data.'
    width: Optional_['positiveInt'] = Field(default=None)
    'Width of the image in pixels (photo/video).'
    pages: Optional_['positiveInt'] = Field(default=None)
    'The number of pages when printed.'
    height: Optional_['positiveInt'] = Field(default=None)
    'Height of the image in pixels (photo/video).'
    frames: Optional_['positiveInt'] = Field(default=None)
    'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.'
    language: Optional_['code'] = Field(default=None)
    'The human language of the content. The value can be any valid value according to BCP 47.'
    creation: Optional_['dateTime'] = Field(default=None)
    'The date that the attachment was first created.'
    duration: Optional_['decimal'] = Field(default=None)
    'The duration of the recording in seconds - for audio and video.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    contentType: Optional_['code'] = Field(default=None)
    'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.'
    url: Optional_['url'] = Field(default=None)
    'A location where the data can be accessed.'


class AvailabilityNotAvailableTime(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Not available during this time due to provided reason."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    during: Optional_['Period'] = Field(default=None)
    'Service not available during this period.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'Reason presented to the user explaining why time not available.'


class AvailabilityAvailableTime(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Times the {item} is available."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    allDay: Optional_['boolean'] = Field(default=None)
    'Always available? i.e. 24 hour service.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    daysOfWeek: Sequence_['code'] = Field(default_factory=list)
    'mon | tue | wed | thu | fri | sat | sun.'
    availableEndTime: Optional_['time'] = Field(default=None)
    'Closing time of day (ignored if allDay = true).'
    availableStartTime: Optional_['time'] = Field(default=None)
    'Opening time of day (ignored if allDay = true).'


class Availability(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Availability data for an {item}."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    availableTime: Sequence_['AvailabilityAvailableTime'] = Field(default_factory=list)
    'Times the {item} is available.'
    notAvailableTime: Sequence_['AvailabilityNotAvailableTime'] = Field(default_factory=list)
    'Not available during this time due to provided reason.'


class BackboneType(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Base definition for the few data types that are allowed to carry modifier extensions."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Base(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Base definition for all types defined in FHIR type system."""


class CodeableConcept(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    text: Optional_['string'] = Field(default=None)
    'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.'
    coding: Sequence_['Coding'] = Field(default_factory=list)
    'A reference to a code defined by a terminology system.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class CodeableReference(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A reference to a resource (by instance), or instead, a reference to a concept defined in a terminology or ontology (by class)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    concept: Optional_['CodeableConcept'] = Field(default=None)
    'A reference to a concept - e.g. the information is identified by its general class to the degree of precision found in the terminology.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['Reference'] = Field(default=None)
    'A reference to a resource the provides exact details about the information being referenced.'


class Coding(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A reference to a code defined by a terminology system."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    system: Optional_['uri'] = Field(default=None)
    'The identification of the code system that defines the meaning of the symbol in the code.'
    version: Optional_['string'] = Field(default=None)
    'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.'
    display: Optional_['string'] = Field(default=None)
    'A representation of the meaning of the code in the system, following the rules of the system.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    userSelected: Optional_['boolean'] = Field(default=None)
    'Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).'
    code: Optional_['code'] = Field(default=None)
    'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).'


class ContactDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies contact information for a person or organization."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'The name of an individual to contact.'
    telecom: Sequence_['ContactPoint'] = Field(default_factory=list)
    'The contact details for the individual (if a name was provided) or the organization.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class ContactPoint(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Optional_['code'] = Field(default=None)
    'Identifies the purpose for the contact point.'
    rank: Optional_['positiveInt'] = Field(default=None)
    'Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.'
    value: Optional_['string'] = Field(default=None)
    'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).'
    system: Optional_['code'] = Field(default=None)
    'Telecommunications form for contact point - what communications system is required to make use of the contact.'
    period: Optional_['Period'] = Field(default=None)
    'Time period when the contact point was/is in use.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class Contributor(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of contributor.'
    name: 'string' = Field(default=...)
    'The name of the individual or organization responsible for the contribution.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the contributor.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class Count(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    unit: Optional_['string'] = Field(default=None)
    'A human-readable form of the unit.'
    value: Optional_['decimal'] = Field(default=None)
    'The value of the measured amount. The value includes an implicit precision in the presentation of the value.'
    system: Optional_['uri'] = Field(default=None)
    'The identification of the system that provides the coded form of the unit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Optional_['code'] = Field(default=None)
    'How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.'
    code: Optional_['code'] = Field(default=None)
    'A computer processable form of the unit in some unit representation system.'


class DataRequirementValueFilter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Value filters specify additional constraints on the data for elements other than code-valued or date-valued. Each value filter specifies an additional constraint on the data (i.e. valueFilters are AND'ed, not OR'ed)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    path: Optional_['string'] = Field(default=None)
    'The attribute of the filter. The specified path SHALL be a FHIRPath resolvable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of a type that is comparable to the valueFilter.value[x] element for the filter.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of the filter.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The value of the filter.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'The value of the filter.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Optional_['code'] = Field(default=None)
    'The comparator to be used to determine whether the value is matching.'
    searchParam: Optional_['string'] = Field(default=None)
    'A search parameter defined on the specified type of the DataRequirement, and which searches on elements of a type compatible with the type of the valueFilter.value[x] for the filter.'


class DataRequirementDateFilter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    path: Optional_['string'] = Field(default=None)
    'The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolvable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    searchParam: Optional_['string'] = Field(default=None)
    'A date parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type date, dateTime, Period, Schedule, or Timing.'


class DataRequirementCodeFilter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    path: Optional_['string'] = Field(default=None)
    'The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolvable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.'
    code: Sequence_['Coding'] = Field(default_factory=list)
    'The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes.'
    valueSet: Optional_['canonical'] = Field(default=None)
    'The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    searchParam: Optional_['string'] = Field(default=None)
    'A token parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type code, Coding, or CodeableConcept.'


class DataRequirementSort(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies the order of the results to be returned."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    path: 'string' = Field(default=...)
    'The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    direction: 'code' = Field(default=...)
    'The direction of the sort, ascending or descending.'


class DataRequirement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.'
    sort: Sequence_['DataRequirementSort'] = Field(default_factory=list)
    'Specifies the order of the results to be returned.'
    limit: Optional_['positiveInt'] = Field(default=None)
    'Specifies a maximum number of results that are required (uses the _count search parameter).'
    profile: Sequence_['canonical'] = Field(default_factory=list)
    'The profile of the required data, specified as the uri of the profile definition.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.'
    codeFilter: Sequence_['DataRequirementCodeFilter'] = Field(default_factory=list)
    "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed."
    dateFilter: Sequence_['DataRequirementDateFilter'] = Field(default_factory=list)
    "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed."
    mustSupport: Sequence_['string'] = Field(default_factory=list)
    'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. \n\nThe value of mustSupport SHALL be a FHIRPath resolvable on the type of the DataRequirement. The path SHALL consist only of identifiers, constant indexers, and .resolve() (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).'
    valueFilter: Sequence_['DataRequirementValueFilter'] = Field(default_factory=list)
    "Value filters specify additional constraints on the data for elements other than code-valued or date-valued. Each value filter specifies an additional constraint on the data (i.e. valueFilters are AND'ed, not OR'ed)."


class DataType(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The base class for all re-useable types defined as part of the FHIR Specification."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class Distance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A length - a value with a unit that is a physical distance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    unit: Optional_['string'] = Field(default=None)
    'A human-readable form of the unit.'
    value: Optional_['decimal'] = Field(default=None)
    'The value of the measured amount. The value includes an implicit precision in the presentation of the value.'
    system: Optional_['uri'] = Field(default=None)
    'The identification of the system that provides the coded form of the unit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Optional_['code'] = Field(default=None)
    'How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.'
    code: Optional_['code'] = Field(default=None)
    'A computer processable form of the unit in some unit representation system.'


class DosageDoseAndRate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Depending on the resource,this is the amount of medication administered, to  be administered or typical amount to be administered."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of dose or rate specified, for example, ordered or calculated.'
    doseRange: Optional_['Range'] = Field(default=None)
    'Amount of medication per dose.'
    doseQuantity: Optional_['Quantity'] = Field(default=None)
    'Amount of medication per dose.'
    rateRatio: Optional_['Ratio'] = Field(default=None)
    'Amount of medication per unit of time.'
    rateRange: Optional_['Range'] = Field(default=None)
    'Amount of medication per unit of time.'
    rateQuantity: Optional_['Quantity'] = Field(default=None)
    'Amount of medication per unit of time.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class Dosage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates how the medication is/was taken or should be taken by the patient."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    text: Optional_['string'] = Field(default=None)
    'Free text dosage instructions e.g. SIG.'
    site: Optional_['CodeableConcept'] = Field(default=None)
    'Body site to administer to.'
    route: Optional_['CodeableConcept'] = Field(default=None)
    'How drug should enter body.'
    timing: Optional_['Timing'] = Field(default=None)
    'When medication should be administered.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'Technique for administering medication.'
    sequence: Optional_['integer'] = Field(default=None)
    'Indicates the order in which the dosage instructions should be applied or interpreted.'
    asNeeded: Optional_['boolean'] = Field(default=None)
    'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    asNeededFor: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Indicates whether the Medication is only taken based on a precondition for taking the Medication (CodeableConcept).'
    doseAndRate: Sequence_['DosageDoseAndRate'] = Field(default_factory=list)
    'Depending on the resource,this is the amount of medication administered, to  be administered or typical amount to be administered.'
    maxDosePerPeriod: Sequence_['Ratio'] = Field(default_factory=list)
    'Upper limit on medication per unit of time.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    patientInstruction: Optional_['string'] = Field(default=None)
    'Instructions in terms that are understood by the patient or consumer.'
    maxDosePerLifetime: Optional_['Quantity'] = Field(default=None)
    'Upper limit on medication per lifetime of the patient.'
    additionalInstruction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Supplemental instructions to the patient on how to take the medication  (e.g. "with meals" or"take half to one hour before food") or warnings for the patient about the medication (e.g. "may cause drowsiness" or "avoid exposure of skin to direct sunlight or sunlamps").'
    maxDosePerAdministration: Optional_['Quantity'] = Field(default=None)
    'Upper limit on medication per administration.'


class Duration(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A length of time."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    unit: Optional_['string'] = Field(default=None)
    'A human-readable form of the unit.'
    value: Optional_['decimal'] = Field(default=None)
    'The value of the measured amount. The value includes an implicit precision in the presentation of the value.'
    system: Optional_['uri'] = Field(default=None)
    'The identification of the system that provides the coded form of the unit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Optional_['code'] = Field(default=None)
    'How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.'
    code: Optional_['code'] = Field(default=None)
    'A computer processable form of the unit in some unit representation system.'


class ElementDefinitionConstraint(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance."""
    key: 'id' = Field(default=...)
    'Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality.'
    human: 'string' = Field(default=...)
    'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.'
    source: Optional_['canonical'] = Field(default=None)
    'A reference to the original source of the constraint, for traceability purposes.'
    severity: 'code' = Field(default=...)
    'Identifies the impact constraint violation has on the conformance of the instance.'
    suppress: Optional_['boolean'] = Field(default=None)
    'If true, indicates that the warning or best practice guideline should be suppressed.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Optional_['string'] = Field(default=None)
    'A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.'
    requirements: Optional_['markdown'] = Field(default=None)
    'Description of why this constraint is necessary or appropriate.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ElementDefinitionMapping(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies a concept from an external specification that roughly corresponds to this element."""
    map: 'string' = Field(default=...)
    'Expresses what part of the target specification corresponds to this element.'
    comment: Optional_['markdown'] = Field(default=None)
    'Comments that provide information about the mapping or its use.'
    identity: 'id' = Field(default=...)
    'An internal reference to the definition of a mapping.'
    language: Optional_['code'] = Field(default=None)
    'Identifies the computable language in which mapping.map is expressed.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ElementDefinitionBinding(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    strength: 'code' = Field(default=...)
    'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.'
    valueSet: Optional_['canonical'] = Field(default=None)
    'Refers to the value set that identifies the set of codes the binding refers to.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    additional: Sequence_['ElementDefinitionBindingAdditional'] = Field(default_factory=list)
    'Additional bindings that help applications implementing this element. Additional bindings do not replace the main binding but provide more information and/or context.'
    description: Optional_['markdown'] = Field(default=None)
    'Describes the intended use of this particular set of codes.'


class ElementDefinitionBindingAdditional(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional bindings that help applications implementing this element. Additional bindings do not replace the main binding but provide more information and/or context."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    any: Optional_['boolean'] = Field(default=None)
    'Whether the binding applies to all repeats, or just to any one of them. This is only relevant for elements that can repeat.'
    usage: Sequence_['UsageContext'] = Field(default_factory=list)
    'Qualifies the usage of the binding. Typically bindings are qualified by jurisdiction, but they may also be qualified by gender, workflow status, clinical domain etc. The information to decide whether a usege context applies is usually outside the resource, determined by context, and this might present challenges for validation tooling.'
    purpose: 'code' = Field(default=...)
    'The use of this additional binding.'
    valueSet: 'canonical' = Field(default=...)
    'The valueSet that is being bound for the purpose.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    shortDoco: Optional_['string'] = Field(default=None)
    'Concise documentation - for summary tables.'
    documentation: Optional_['markdown'] = Field(default=None)
    'Documentation of the purpose of use of the bindingproviding additional information about how it is intended to be used.'


class ElementDefinitionExample(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A sample value for this element demonstrating the type of information that would typically be found in the element."""
    label: 'string' = Field(default=...)
    'Describes the purpose of this example among the set of examples.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueCanonical: Optional_['canonical'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueCode: Optional_['code'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueDate: Optional_['date'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueId: Optional_['id'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueInstant: Optional_['instant'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueInteger64: Optional_['integer64'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueOid: Optional_['oid'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueString: Optional_['string'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueTime: Optional_['time'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueUri: Optional_['uri'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueUrl: Optional_['url'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueUuid: Optional_['uuid'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueAddress: Optional_['Address'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueAge: Optional_['Age'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueAnnotation: Optional_['Annotation'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueCount: Optional_['Count'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueDistance: Optional_['Distance'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueHumanName: Optional_['HumanName'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueMoney: Optional_['Money'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueRatioRange: Optional_['RatioRange'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueSignature: Optional_['Signature'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueTiming: Optional_['Timing'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueExpression: Optional_['Expression'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueUsageContext: Optional_['UsageContext'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueAvailability: Optional_['Availability'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueDosage: Optional_['Dosage'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    valueMeta: Optional_['Meta'] = Field(default=None)
    'The actual value for the element, which must be one of the types allowed for this element.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ElementDefinitionSlicing(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    rules: 'code' = Field(default=...)
    'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.'
    ordered: Optional_['boolean'] = Field(default=None)
    'If the matching elements have to occur in the same order as defined in the profile.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.'
    discriminator: Sequence_['ElementDefinitionSlicingDiscriminator'] = Field(default_factory=list)
    'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.'


class ElementDefinitionSlicingDiscriminator(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'How the element value is interpreted when discrimination is evaluated.'
    path: 'string' = Field(default=...)
    'A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class ElementDefinitionType(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The data type or resource that the value of this element is permitted to be."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    profile: Sequence_['canonical'] = Field(default_factory=list)
    'Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    versioning: Optional_['code'] = Field(default=None)
    'Whether this reference needs to be version specific or version independent, or whether either can be used.'
    aggregation: Sequence_['code'] = Field(default_factory=list)
    'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.'
    targetProfile: Sequence_['canonical'] = Field(default_factory=list)
    'Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.'
    code: 'uri' = Field(default=...)
    'URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.'


class ElementDefinitionBase(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    min: 'unsignedInt' = Field(default=...)
    'Minimum cardinality of the base element identified by the path.'
    max: 'string' = Field(default=...)
    'Maximum cardinality of the base element identified by the path.'
    path: 'string' = Field(default=...)
    'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class ElementDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Captures constraints on each element within the resource, profile, or extension."""
    min: Optional_['unsignedInt'] = Field(default=None)
    'The minimum number of times this element SHALL appear in the instance.'
    max: Optional_['string'] = Field(default=None)
    'The maximum number of times this element is permitted to appear in the instance.'
    path: 'string' = Field(default=...)
    'The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension.'
    base: Optional_['ElementDefinitionBase'] = Field(default=None)
    'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.'
    type: Sequence_['ElementDefinitionType'] = Field(default_factory=list)
    'The data type or resource that the value of this element is permitted to be.'
    label: Optional_['string'] = Field(default=None)
    'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.'
    short: Optional_['string'] = Field(default=None)
    'A concise description of what this element means (e.g. for use in autogenerated summaries).'
    alias: Sequence_['string'] = Field(default_factory=list)
    'Identifies additional names by which this element might also be known.'
    slicing: Optional_['ElementDefinitionSlicing'] = Field(default=None)
    'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).'
    comment: Optional_['markdown'] = Field(default=None)
    'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).'
    example: Sequence_['ElementDefinitionExample'] = Field(default_factory=list)
    'A sample value for this element demonstrating the type of information that would typically be found in the element.'
    binding: Optional_['ElementDefinitionBinding'] = Field(default=None)
    'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).'
    mapping: Sequence_['ElementDefinitionMapping'] = Field(default_factory=list)
    'Identifies a concept from an external specification that roughly corresponds to this element.'
    fixedBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedBoolean: Optional_['boolean'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedCanonical: Optional_['canonical'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedCode: Optional_['code'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedDate: Optional_['date'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedDateTime: Optional_['dateTime'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedDecimal: Optional_['decimal'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedId: Optional_['id'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedInstant: Optional_['instant'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedInteger: Optional_['integer'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedInteger64: Optional_['integer64'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedMarkdown: Optional_['markdown'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedOid: Optional_['oid'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedPositiveInt: Optional_['positiveInt'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedString: Optional_['string'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedTime: Optional_['time'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedUri: Optional_['uri'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedUrl: Optional_['url'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedUuid: Optional_['uuid'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedAddress: Optional_['Address'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedAge: Optional_['Age'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedAnnotation: Optional_['Annotation'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedAttachment: Optional_['Attachment'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedCoding: Optional_['Coding'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedCount: Optional_['Count'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedDistance: Optional_['Distance'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedDuration: Optional_['Duration'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedHumanName: Optional_['HumanName'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedIdentifier: Optional_['Identifier'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedMoney: Optional_['Money'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedPeriod: Optional_['Period'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedQuantity: Optional_['Quantity'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedRange: Optional_['Range'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedRatio: Optional_['Ratio'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedRatioRange: Optional_['RatioRange'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedReference: Optional_['Reference'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedSampledData: Optional_['SampledData'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedSignature: Optional_['Signature'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedTiming: Optional_['Timing'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedExpression: Optional_['Expression'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedUsageContext: Optional_['UsageContext'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedAvailability: Optional_['Availability'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedDosage: Optional_['Dosage'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    fixedMeta: Optional_['Meta'] = Field(default=None)
    'Specifies a value that SHALL be exactly the value  for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sliceName: Optional_['string'] = Field(default=None)
    'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.'
    maxLength: Optional_['integer'] = Field(default=None)
    'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. ```maxLength``` SHOULD only be used on primitive data types that have a string representation (see [http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics](http://hl7.org/fhir/extensions/StructureDefinition-structuredefinition-type-characteristics.html)).'
    condition: Sequence_['id'] = Field(default_factory=list)
    'A reference to an invariant that may make additional statements about the cardinality or value in the instance.'
    isSummary: Optional_['boolean'] = Field(default=None)
    'Whether the element should be included if a client requests a search with the parameter _summary=true.'
    definition: Optional_['markdown'] = Field(default=None)
    'Provides a complete explanation of the meaning of the data element for human readability.  For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).'
    patternBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternBoolean: Optional_['boolean'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternCanonical: Optional_['canonical'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternCode: Optional_['code'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternDate: Optional_['date'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternDateTime: Optional_['dateTime'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternDecimal: Optional_['decimal'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternId: Optional_['id'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternInstant: Optional_['instant'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternInteger: Optional_['integer'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternInteger64: Optional_['integer64'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternMarkdown: Optional_['markdown'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternOid: Optional_['oid'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternPositiveInt: Optional_['positiveInt'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternString: Optional_['string'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternTime: Optional_['time'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternUri: Optional_['uri'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternUrl: Optional_['url'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternUuid: Optional_['uuid'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternAddress: Optional_['Address'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternAge: Optional_['Age'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternAnnotation: Optional_['Annotation'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternAttachment: Optional_['Attachment'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternCoding: Optional_['Coding'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternCount: Optional_['Count'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternDistance: Optional_['Distance'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternDuration: Optional_['Duration'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternHumanName: Optional_['HumanName'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternIdentifier: Optional_['Identifier'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternMoney: Optional_['Money'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternPeriod: Optional_['Period'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternQuantity: Optional_['Quantity'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternRange: Optional_['Range'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternRatio: Optional_['Ratio'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternRatioRange: Optional_['RatioRange'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternReference: Optional_['Reference'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternSampledData: Optional_['SampledData'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternSignature: Optional_['Signature'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternTiming: Optional_['Timing'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternExpression: Optional_['Expression'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternUsageContext: Optional_['UsageContext'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternAvailability: Optional_['Availability'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternDosage: Optional_['Dosage'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    patternMeta: Optional_['Meta'] = Field(default=None)
    'Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.  \n\nWhen pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.\n\nWhen an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.\n\nWhen pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e.,\n\n1. If primitive: it must match exactly the pattern value\n2. If a complex object: it must match (recursively) the pattern value\n3. If an array: it must match (recursively) the pattern value\n\nIf a pattern[x] is declared on a repeating element, the pattern applies to all repetitions.  If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See [Examples of Patterns](elementdefinition-examples.html#pattern-examples) for examples of pattern usage and the effect it will have.'
    constraint: Sequence_['ElementDefinitionConstraint'] = Field(default_factory=list)
    'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.'
    isModifier: Optional_['boolean'] = Field(default=None)
    'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.'
    minValueDate: Optional_['date'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValueDateTime: Optional_['dateTime'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValueInstant: Optional_['instant'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValueTime: Optional_['time'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValueDecimal: Optional_['decimal'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValueInteger: Optional_['integer'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValueInteger64: Optional_['integer64'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    minValueQuantity: Optional_['Quantity'] = Field(default=None)
    'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueDate: Optional_['date'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueDateTime: Optional_['dateTime'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueInstant: Optional_['instant'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueTime: Optional_['time'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueDecimal: Optional_['decimal'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueInteger: Optional_['integer'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueInteger64: Optional_['integer64'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    maxValueQuantity: Optional_['Quantity'] = Field(default=None)
    'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.'
    mustSupport: Optional_['boolean'] = Field(default=None)
    'If true, implementations that produce or consume resources SHALL provide "support" for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below).  If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.'
    requirements: Optional_['markdown'] = Field(default=None)
    'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.'
    orderMeaning: Optional_['string'] = Field(default=None)
    'If present, indicates that the order of the repeating element has meaning and describes what that meaning is.  If absent, it means that the order of the element has no meaning.'
    mustHaveValue: Optional_['boolean'] = Field(default=None)
    'Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.'
    representation: Sequence_['code'] = Field(default_factory=list)
    "Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of 'xmlAttr', no matter what FHIR serialization format is used."
    defaultValueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueBoolean: Optional_['boolean'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueCanonical: Optional_['canonical'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueCode: Optional_['code'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueDate: Optional_['date'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueDateTime: Optional_['dateTime'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueDecimal: Optional_['decimal'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueId: Optional_['id'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueInstant: Optional_['instant'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueInteger: Optional_['integer'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueInteger64: Optional_['integer64'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueMarkdown: Optional_['markdown'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueOid: Optional_['oid'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueString: Optional_['string'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueTime: Optional_['time'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueUri: Optional_['uri'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueUrl: Optional_['url'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueUuid: Optional_['uuid'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueAddress: Optional_['Address'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueAge: Optional_['Age'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueAnnotation: Optional_['Annotation'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueAttachment: Optional_['Attachment'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueCoding: Optional_['Coding'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueContactPoint: Optional_['ContactPoint'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueCount: Optional_['Count'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueDistance: Optional_['Distance'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueDuration: Optional_['Duration'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueHumanName: Optional_['HumanName'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueIdentifier: Optional_['Identifier'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueMoney: Optional_['Money'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValuePeriod: Optional_['Period'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueQuantity: Optional_['Quantity'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueRange: Optional_['Range'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueRatio: Optional_['Ratio'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueRatioRange: Optional_['RatioRange'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueReference: Optional_['Reference'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueSampledData: Optional_['SampledData'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueSignature: Optional_['Signature'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueTiming: Optional_['Timing'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueContactDetail: Optional_['ContactDetail'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueExpression: Optional_['Expression'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueUsageContext: Optional_['UsageContext'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueAvailability: Optional_['Availability'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueDosage: Optional_['Dosage'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    defaultValueMeta: Optional_['Meta'] = Field(default=None)
    "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')."
    contentReference: Optional_['uri'] = Field(default=None)
    'Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.'
    isModifierReason: Optional_['string'] = Field(default=None)
    'Explains how that element affects the interpretation of the resource or element that contains it.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    valueAlternatives: Sequence_['canonical'] = Field(default_factory=list)
    'Specifies a list of extensions that can appear in place of a primitive value.'
    meaningWhenMissing: Optional_['markdown'] = Field(default=None)
    "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing')."
    sliceIsConstraining: Optional_['boolean'] = Field(default=None)
    'If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Sequence_['Coding'] = Field(default_factory=list)
    'A code that has the same meaning as the element in a particular terminology.'


class Expression(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['code'] = Field(default=None)
    'A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.'
    language: Optional_['code'] = Field(default=None)
    'The media type of the language for the expression.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['uri'] = Field(default=None)
    'A URI that defines where the expression is found.'
    expression: Optional_['string'] = Field(default=None)
    'An expression in the specified language that returns a value.'
    description: Optional_['string'] = Field(default=None)
    'A brief, natural language description of the condition that effectively communicates the intended semantics.'


class ExtendedContactDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies contact information for a specific purpose over a period of time, might be handled/monitored by a specific named person or organization."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Sequence_['HumanName'] = Field(default_factory=list)
    'The name of an individual to contact, some types of contact detail are usually blank.'
    period: Optional_['Period'] = Field(default=None)
    'Period that this contact was valid for usage.'
    purpose: Optional_['CodeableConcept'] = Field(default=None)
    'The purpose/type of contact.'
    telecom: Sequence_['ContactPoint'] = Field(default_factory=list)
    'The contact details application for the purpose defined.'
    address: Optional_['Address'] = Field(default=None)
    'Address for the contact.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    organization: Optional_['Reference'] = Field(default=None)
    'This contact detail is handled/monitored by a specific organization. If the name is provided in the contact, then it is referring to the named individual within this organization.'


class Extension(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Optional Extension Element - found in all resources."""
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueCanonical: Optional_['canonical'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueCode: Optional_['code'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueDate: Optional_['date'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueId: Optional_['id'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueInstant: Optional_['instant'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueInteger: Optional_['integer'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueInteger64: Optional_['integer64'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueOid: Optional_['oid'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueString: Optional_['string'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueTime: Optional_['time'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueUri: Optional_['uri'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueUrl: Optional_['url'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueUuid: Optional_['uuid'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueAddress: Optional_['Address'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueAge: Optional_['Age'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueAnnotation: Optional_['Annotation'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueCount: Optional_['Count'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueDistance: Optional_['Distance'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueHumanName: Optional_['HumanName'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueMoney: Optional_['Money'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueRange: Optional_['Range'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueRatioRange: Optional_['RatioRange'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueReference: Optional_['Reference'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueSignature: Optional_['Signature'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueTiming: Optional_['Timing'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueExpression: Optional_['Expression'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueUsageContext: Optional_['UsageContext'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueAvailability: Optional_['Availability'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueDosage: Optional_['Dosage'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    valueMeta: Optional_['Meta'] = Field(default=None)
    'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    url: 'str' = Field(default=...)
    'Source of the definition for the extension code - a logical name or a URL.'


class HumanName(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A name, normally of a human, that can be used for other living entities (e.g. animals but not organizations) that have been assigned names by a human and may need the use of name parts or the need for usage information."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Optional_['code'] = Field(default=None)
    'Identifies the purpose for this name.'
    text: Optional_['string'] = Field(default=None)
    'Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.'
    given: Sequence_['string'] = Field(default_factory=list)
    'Given name.'
    family: Optional_['string'] = Field(default=None)
    'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.'
    prefix: Sequence_['string'] = Field(default_factory=list)
    'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.'
    suffix: Sequence_['string'] = Field(default_factory=list)
    'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.'
    period: Optional_['Period'] = Field(default=None)
    'Indicates the period of time when this name was valid for the named person.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class Identifier(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Optional_['code'] = Field(default=None)
    'The purpose of this identifier.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.'
    value: Optional_['string'] = Field(default=None)
    'The portion of the identifier typically relevant to the user and which is unique within the context of the system.'
    system: Optional_['uri'] = Field(default=None)
    'Establishes the namespace for the value - that is, an absolute URL that describes a set values that are unique.'
    period: Optional_['Period'] = Field(default=None)
    'Time period during which identifier is/was valid for use.'
    assigner: Optional_['Reference'] = Field(default=None)
    'Organization that issued/manages the identifier.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class MarketingStatus(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    status: 'CodeableConcept' = Field(default=...)
    'This attribute provides information on the status of the marketing of the medicinal product See ISO/TS 20443 for more information and examples.'
    country: Optional_['CodeableConcept'] = Field(default=None)
    'The country in which the marketing authorization has been granted shall be specified It should be specified using the ISO 3166 ‑ 1 alpha-2 code elements.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    dateRange: Optional_['Period'] = Field(default=None)
    'The date when the Medicinal Product is placed on the market by the Marketing Authorization Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.'
    restoreDate: Optional_['dateTime'] = Field(default=None)
    'The date when the Medicinal Product is placed on the market by the Marketing Authorization Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.'
    jurisdiction: Optional_['CodeableConcept'] = Field(default=None)
    'Where a Medicines Regulatory Agency has granted a marketing authorization for which specific provisions within a jurisdiction apply, the jurisdiction can be specified using an appropriate controlled terminology The controlled term and the controlled term identifier shall be specified.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Meta(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."""
    tag: Sequence_['Coding'] = Field(default_factory=list)
    'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.'
    source: Optional_['uri'] = Field(default=None)
    'A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.'
    profile: Sequence_['canonical'] = Field(default_factory=list)
    'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).'
    security: Sequence_['Coding'] = Field(default_factory=list)
    'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    versionId: Optional_['id'] = Field(default=None)
    'The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.'
    lastUpdated: Optional_['instant'] = Field(default=None)
    'When the resource last changed - e.g. when the version changed.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class MonetaryComponent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Availability data for an {item}."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'base | surcharge | deduction | discount | tax | informational.'
    factor: Optional_['decimal'] = Field(default=None)
    'Factor used for calculating this component.'
    amount: Optional_['Money'] = Field(default=None)
    'Explicit value amount to be used.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.'


class Money(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An amount of economic utility in some recognized currency."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    value: Optional_['decimal'] = Field(default=None)
    'Numerical value (with implicit precision).'
    currency: Optional_['code'] = Field(default=None)
    'ISO 4217 Currency Code.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class Narrative(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A human-readable summary of the resource conveying the essential clinical and business information for the resource."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    div: 'xhtml' = Field(default=...)
    'The actual narrative content, a stripped down version of XHTML.'
    status: 'code' = Field(default=...)
    "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class ParameterDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: 'code' = Field(default=...)
    'Whether the parameter is input or output for the module.'
    min: Optional_['integer'] = Field(default=None)
    'The minimum number of times this parameter SHALL appear in the request or response.'
    max: Optional_['string'] = Field(default=None)
    'The maximum number of times this element is permitted to appear in the request or response.'
    name: Optional_['code'] = Field(default=None)
    'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.'
    type: 'code' = Field(default=...)
    'The type of the parameter.'
    profile: Optional_['canonical'] = Field(default=None)
    'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    documentation: Optional_['string'] = Field(default=None)
    'A brief discussion of what the parameter is for and how it is used by the module.'


class Period(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A time period defined by a start and end date and optionally time."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    end: Optional_['dateTime'] = Field(default=None)
    'The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.'
    start: Optional_['dateTime'] = Field(default=None)
    'The start of the period. The boundary is inclusive.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class PrimitiveType(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The base type for all re-useable types defined that have a simple property."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class ProductShelfLife(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The shelf-life and storage information for a medicinal product item or container can be described using this class."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'This describes the shelf life, taking into account various scenarios such as shelf life of the packaged Medicinal Product itself, shelf life after transformation where necessary and shelf life after the first opening of a bottle, etc. The shelf life type shall be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    periodDuration: Optional_['Duration'] = Field(default=None)
    'The shelf life time period can be specified using a numerical value for the period of time and its unit of time measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.'
    periodString: Optional_['string'] = Field(default=None)
    'The shelf life time period can be specified using a numerical value for the period of time and its unit of time measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    specialPrecautionsForStorage: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Special precautions for storage, if any, can be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.'


class Quantity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    unit: Optional_['string'] = Field(default=None)
    'A human-readable form of the unit.'
    value: Optional_['decimal'] = Field(default=None)
    'The value of the measured amount. The value includes an implicit precision in the presentation of the value.'
    system: Optional_['uri'] = Field(default=None)
    'The identification of the system that provides the coded form of the unit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Optional_['code'] = Field(default=None)
    'How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.'
    code: Optional_['code'] = Field(default=None)
    'A computer processable form of the unit in some unit representation system.'


class Range(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of ordered Quantities defined by a low and high limit."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    low: Optional_['Quantity'] = Field(default=None)
    'The low limit. The boundary is inclusive.'
    high: Optional_['Quantity'] = Field(default=None)
    'The high limit. The boundary is inclusive.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class Ratio(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A relationship of two Quantity values - expressed as a numerator and a denominator."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    numerator: Optional_['Quantity'] = Field(default=None)
    'The value of the numerator.'
    denominator: Optional_['Quantity'] = Field(default=None)
    'The value of the denominator.'


class RatioRange(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A range of ratios expressed as a low and high numerator and a denominator."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    denominator: Optional_['Quantity'] = Field(default=None)
    'The value of the denominator.'
    lowNumerator: Optional_['Quantity'] = Field(default=None)
    'The value of the low limit numerator.'
    highNumerator: Optional_['Quantity'] = Field(default=None)
    'The value of the high limit numerator.'


class Reference(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A reference from one resource to another."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['uri'] = Field(default=None)
    'The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).'
    display: Optional_['string'] = Field(default=None)
    'Plain text narrative that identifies the resource in addition to the resource reference.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['string'] = Field(default=None)
    "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."
    identifier: Optional_['Identifier'] = Field(default=None)
    'An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.'


class RelatedArtifact(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Related artifacts such as additional documentation, justification, or bibliographic references."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of relationship to the related artifact.'
    label: Optional_['string'] = Field(default=None)
    'A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index.'
    display: Optional_['string'] = Field(default=None)
    'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.'
    citation: Optional_['markdown'] = Field(default=None)
    'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.'
    document: Optional_['Attachment'] = Field(default=None)
    'The document being referenced, represented as an attachment. This is exclusive with the resource element.'
    resource: Optional_['canonical'] = Field(default=None)
    'The related artifact, such as a library, value set, profile, or other knowledge resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    classifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Provides additional classifiers of the related artifact.'
    publicationDate: Optional_['date'] = Field(default=None)
    'The date of publication of the artifact being referred to.'
    resourceReference: Optional_['Reference'] = Field(default=None)
    'The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource.'
    publicationStatus: Optional_['code'] = Field(default=None)
    'The publication status of the artifact being referred to.'


class SampledData(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    data: Optional_['string'] = Field(default=None)
    'A series of data points which are decimal values or codes separated by a single space (character u20). The special codes "E" (error), "L" (below detection limit) and "U" (above detection limit) are also defined for used in place of decimal values.'
    origin: 'Quantity' = Field(default=...)
    'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.'
    factor: Optional_['decimal'] = Field(default=None)
    'A correction factor that is applied to the sampled data points before they are added to the origin.'
    codeMap: Optional_['canonical'] = Field(default=None)
    'Reference to ConceptMap that defines the codes used in the data.'
    offsets: Optional_['string'] = Field(default=None)
    'A series of data points which are decimal values separated by a single space (character u20).  The units in which the offsets are expressed are found in intervalUnit.  The absolute point at which the measurements begin SHALL be conveyed outside the scope of this datatype, e.g. Observation.effectiveDateTime for a timing offset.'
    interval: Optional_['decimal'] = Field(default=None)
    'Amount of intervalUnits between samples, e.g. milliseconds for time-based sampling.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    lowerLimit: Optional_['decimal'] = Field(default=None)
    'The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit).'
    upperLimit: Optional_['decimal'] = Field(default=None)
    'The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit).'
    dimensions: 'positiveInt' = Field(default=...)
    'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.'
    intervalUnit: 'code' = Field(default=...)
    'The measurement unit in which the sample interval is expressed.'


class Signature(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    who: Optional_['Reference'] = Field(default=None)
    'A reference to an application-usable description of the identity that signed  (e.g. the signature used their private key).'
    type: Sequence_['Coding'] = Field(default_factory=list)
    'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.'
    when: Optional_['instant'] = Field(default=None)
    'When the digital signature was signed.'
    data: Optional_['base64Binary'] = Field(default=None)
    'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sigFormat: Optional_['code'] = Field(default=None)
    'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.'
    onBehalfOf: Optional_['Reference'] = Field(default=None)
    'A reference to an application-usable description of the identity that is represented by the signature.'
    targetFormat: Optional_['code'] = Field(default=None)
    'A mime type that indicates the technical format of the target resources signed by the signature.'


class TimingRepeat(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of rules that describe when the event is scheduled."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    when: Sequence_['code'] = Field(default_factory=list)
    'An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.'
    count: Optional_['positiveInt'] = Field(default=None)
    'A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values.'
    period: Optional_['decimal'] = Field(default=None)
    'Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.'
    offset: Optional_['unsignedInt'] = Field(default=None)
    'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.'
    countMax: Optional_['positiveInt'] = Field(default=None)
    'If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.'
    duration: Optional_['decimal'] = Field(default=None)
    'How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    boundsDuration: Optional_['Duration'] = Field(default=None)
    'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.'
    boundsRange: Optional_['Range'] = Field(default=None)
    'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.'
    boundsPeriod: Optional_['Period'] = Field(default=None)
    'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.'
    frequency: Optional_['positiveInt'] = Field(default=None)
    'The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency.'
    periodMax: Optional_['decimal'] = Field(default=None)
    'If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days.'
    dayOfWeek: Sequence_['code'] = Field(default_factory=list)
    'If one or more days of week is provided, then the action happens only on the specified day(s).'
    timeOfDay: Sequence_['time'] = Field(default_factory=list)
    'Specified time of day for action to take place.'
    periodUnit: Optional_['code'] = Field(default=None)
    "The units of time for the period in UCUM units\nNormal practice is to use the 'mo' code as a calendar month when calculating the next occurrence."
    durationMax: Optional_['decimal'] = Field(default=None)
    'If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.'
    durationUnit: Optional_['code'] = Field(default=None)
    "The units of time for the duration, in UCUM units\nNormal practice is to use the 'mo' code as a calendar month when calculating the next occurrence."
    frequencyMax: Optional_['positiveInt'] = Field(default=None)
    'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.'


class Timing(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).'
    event: Sequence_['dateTime'] = Field(default_factory=list)
    'Identifies specific times when the event occurs.'
    repeat: Optional_['TimingRepeat'] = Field(default=None)
    'A set of rules that describe when the event is scheduled.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TriggerDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of triggering event.'
    name: Optional_['string'] = Field(default=None)
    'A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.'
    data: Sequence_['DataRequirement'] = Field(default_factory=list)
    'The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    timingTiming: Optional_['Timing'] = Field(default=None)
    'The timing of the event (if this is a periodic trigger).'
    timingReference: Optional_['Reference'] = Field(default=None)
    'The timing of the event (if this is a periodic trigger).'
    timingDate: Optional_['date'] = Field(default=None)
    'The timing of the event (if this is a periodic trigger).'
    timingDateTime: Optional_['dateTime'] = Field(default=None)
    'The timing of the event (if this is a periodic trigger).'
    condition: Optional_['Expression'] = Field(default=None)
    'A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.'
    subscriptionTopic: Optional_['canonical'] = Field(default=None)
    'A reference to a SubscriptionTopic resource that defines the event. If this element is provided, no other information about the trigger definition may be supplied.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code that identifies the event.'


class UsageContext(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'Coding' = Field(default=...)
    'A code that identifies the type of context being specified by this usage context.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.'
    valueRange: Optional_['Range'] = Field(default=None)
    'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'


class VirtualServiceDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Virtual Service Contact Details."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    addressUrl: Optional_['url'] = Field(default=None)
    'What address or number needs to be used for a user to connect to the virtual service to join. The channelType informs as to which datatype is appropriate to use (requires knowledge of the specific type).'
    addressString: Optional_['string'] = Field(default=None)
    'What address or number needs to be used for a user to connect to the virtual service to join. The channelType informs as to which datatype is appropriate to use (requires knowledge of the specific type).'
    addressContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'What address or number needs to be used for a user to connect to the virtual service to join. The channelType informs as to which datatype is appropriate to use (requires knowledge of the specific type).'
    addressExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'What address or number needs to be used for a user to connect to the virtual service to join. The channelType informs as to which datatype is appropriate to use (requires knowledge of the specific type).'
    sessionKey: Optional_['string'] = Field(default=None)
    'Session Key required by the virtual service.'
    channelType: Optional_['Coding'] = Field(default=None)
    'The type of virtual service to connect to (i.e. Teams, Zoom, Specific VMR technology, WhatsApp).'
    additionalInfo: Sequence_['url'] = Field(default_factory=list)
    'Address to see alternative connection details.'
    maxParticipants: Optional_['positiveInt'] = Field(default=None)
    'Maximum number of participants supported by the virtual service.'


class MoneyQuantity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """There SHALL be a code if there is a value and it SHALL be an expression of currency.  If system is present, it SHALL be ISO 4217 (system = "urn:iso:std:iso:4217" - currency)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    unit: Optional_['string'] = Field(default=None)
    'A human-readable form of the unit.'
    value: Optional_['decimal'] = Field(default=None)
    'The value of the measured amount. The value includes an implicit precision in the presentation of the value.'
    system: Optional_['uri'] = Field(default=None)
    'The identification of the system that provides the coded form of the unit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Optional_['code'] = Field(default=None)
    'How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.'
    code: Optional_['code'] = Field(default=None)
    'A computer processable form of the unit in some unit representation system.'


class SimpleQuantity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The comparator is not used on a SimpleQuantity"""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    unit: Optional_['string'] = Field(default=None)
    'A human-readable form of the unit.'
    value: Optional_['decimal'] = Field(default=None)
    'The value of the measured amount. The value includes an implicit precision in the presentation of the value.'
    system: Optional_['uri'] = Field(default=None)
    'The identification of the system that provides the coded form of the unit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Sequence_['code'] = Field(default_factory=list)
    'Not allowed to be used in this context'
    code: Optional_['code'] = Field(default=None)
    'A computer processable form of the unit in some unit representation system.'


class Resource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This is the base resource type for everything."""
    resourceType: Literal_['Resource'] = Field(default=...)
    'Base Resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'


class AccountRelatedAccount(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Other associated accounts related to this account."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    account: 'Reference' = Field(default=...)
    'Reference to an associated Account.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    relationship: Optional_['CodeableConcept'] = Field(default=None)
    'Relationship of the associated Account.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AccountProcedure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableReference' = Field(default=...)
    'The procedure relevant to the account.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'How this procedure value should be used in charging the account.'
    device: Sequence_['Reference'] = Field(default_factory=list)
    'Any devices that were associated with the procedure relevant to the account.'
    sequence: Optional_['positiveInt'] = Field(default=None)
    'Ranking of the procedure (for each type).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    packageCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs.'
    dateOfService: Optional_['dateTime'] = Field(default=None)
    'Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AccountDiagnosis(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …).'
    sequence: Optional_['positiveInt'] = Field(default=None)
    'Ranking of the diagnosis (for each type).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: 'CodeableReference' = Field(default=...)
    'The diagnosis relevant to the account.'
    onAdmission: Optional_['boolean'] = Field(default=None)
    'Was the Diagnosis present on Admission in the related Encounter.'
    packageCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs.'
    dateOfDiagnosis: Optional_['dateTime'] = Field(default=None)
    'Ranking of the diagnosis (for each type).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AccountGuarantor(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The parties responsible for balancing the account if other payment options fall short."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    party: 'Reference' = Field(default=...)
    'The entity who is responsible.'
    onHold: Optional_['boolean'] = Field(default=None)
    'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.'
    period: Optional_['Period'] = Field(default=None)
    'The timeframe during which the guarantor accepts responsibility for the account.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AccountCoverage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    coverage: 'Reference' = Field(default=...)
    'The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.'
    priority: Optional_['positiveInt'] = Field(default=None)
    'The priority of the coverage in the context of this account.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AccountBalance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The calculated account balances - these are calculated and processed by the finance system.\r\rThe balances with a `term` that is not current are usually generated/updated by an invoicing or similar process."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    term: Optional_['CodeableConcept'] = Field(default=None)
    'The term of the account balances - The balance value is the amount that was outstanding for this age.'
    amount: 'Money' = Field(default=...)
    'The actual balance value calculated for the age defined in the term property.'
    estimate: Optional_['boolean'] = Field(default=None)
    'The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    aggregate: Optional_['CodeableConcept'] = Field(default=None)
    'Who is expected to pay this part of the balance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Account(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc."""
    resourceType: Literal_['Account'] = Field(default=...)
    'Tracks balance, charges, for patient or cost center'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Categorizes the account for reporting and searching purposes.'
    name: Optional_['string'] = Field(default=None)
    'Name used for the account when displaying it to humans in reports, etc.'
    owner: Optional_['Reference'] = Field(default=None)
    'Indicates the service area, hospital, department, etc. with responsibility for managing the Account.'
    status: 'code' = Field(default=...)
    'Indicates whether the account is presently used/usable or not.'
    subject: Sequence_['Reference'] = Field(default_factory=list)
    'Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.'
    balance: Sequence_['AccountBalance'] = Field(default_factory=list)
    'The calculated account balances - these are calculated and processed by the finance system.\r\rThe balances with a `term` that is not current are usually generated/updated by an invoicing or similar process.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    coverage: Sequence_['AccountCoverage'] = Field(default_factory=list)
    'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.'
    currency: Optional_['CodeableConcept'] = Field(default=None)
    'The default currency for the account.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    guarantor: Sequence_['AccountGuarantor'] = Field(default_factory=list)
    'The parties responsible for balancing the account if other payment options fall short.'
    diagnosis: Sequence_['AccountDiagnosis'] = Field(default_factory=list)
    'When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).'
    procedure: Sequence_['AccountProcedure'] = Field(default_factory=list)
    'When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique identifier used to reference the account.  Might or might not be intended for human use (e.g. credit card number).'
    description: Optional_['markdown'] = Field(default=None)
    'Provides additional information about what the account tracks and how it is used.'
    calculatedAt: Optional_['instant'] = Field(default=None)
    'Time the balance amount was calculated.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    billingStatus: Optional_['CodeableConcept'] = Field(default=None)
    'The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.'
    servicePeriod: Optional_['Period'] = Field(default=None)
    'The date range of services associated with this account.'
    relatedAccount: Sequence_['AccountRelatedAccount'] = Field(default_factory=list)
    'Other associated accounts related to this account.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ActivityDefinitionDynamicValue(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    path: 'string' = Field(default=...)
    'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolvable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: 'Expression' = Field(default=...)
    'An expression specifying the value of the customized element.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ActivityDefinitionParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who should participate in performing the action described."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['code'] = Field(default=None)
    'The type of participant in the action.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'The role the participant should play in performing the described action.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates how the actor will be involved in the action - author, reviewer, witness, etc.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    typeCanonical: Optional_['canonical'] = Field(default=None)
    'The type of participant in the action.'
    typeReference: Optional_['Reference'] = Field(default=None)
    'The type of participant in the action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ActivityDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context."""
    resourceType: Literal_['ActivityDefinition'] = Field(default=...)
    'The definition of a specific activity to be taken, independent of any particular patient or context'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    kind: Optional_['code'] = Field(default=None)
    'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the activity definition.'
    usage: Optional_['markdown'] = Field(default=None)
    'A detailed description of how the activity definition is used from a clinical perspective.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.'
    status: 'code' = Field(default=...)
    'The status of this activity definition. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the content.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the content.'
    intent: Optional_['code'] = Field(default=None)
    'Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.'
    dosage: Sequence_['Dosage'] = Field(default_factory=list)
    'Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this activity definition is needed and why it has been designed as it has.'
    library: Sequence_['canonical'] = Field(default_factory=list)
    'A reference to a Library resource containing any formal logic used by the activity definition.'
    profile: Optional_['canonical'] = Field(default=None)
    'A profile to which the target of the activity definition is expected to conform.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    subtitle: Optional_['string'] = Field(default=None)
    'An explanatory or alternate title for the activity definition giving additional information about its content.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the activity  should be addressed with respect to other requests.'
    location: Optional_['CodeableReference'] = Field(default=None)
    'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).'
    bodySite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites)."
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the activity definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.'
    timingTiming: Optional_['Timing'] = Field(default=None)
    'The timing or frequency upon which the described activity is to occur.'
    timingAge: Optional_['Age'] = Field(default=None)
    'The timing or frequency upon which the described activity is to occur.'
    timingRange: Optional_['Range'] = Field(default=None)
    'The timing or frequency upon which the described activity is to occur.'
    timingDuration: Optional_['Duration'] = Field(default=None)
    'The timing or frequency upon which the described activity is to occur.'
    transform: Optional_['canonical'] = Field(default=None)
    'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    subjectCanonical: Optional_['canonical'] = Field(default=None)
    'A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances.'
    productReference: Optional_['Reference'] = Field(default=None)
    'Identifies the food, drug or other product being consumed or supplied in the activity.'
    productCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Identifies the food, drug or other product being consumed or supplied in the activity.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the activity definition from a consumer's perspective."
    asNeededBoolean: Optional_['boolean'] = Field(default=None)
    'If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.'
    asNeededCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.'
    participant: Sequence_['ActivityDefinitionParticipant'] = Field(default_factory=list)
    'Indicates who should participate in performing the action described.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the activity definition is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    doNotPerform: Optional_['boolean'] = Field(default=None)
    'Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.'
    dynamicValue: Sequence_['ActivityDefinitionDynamicValue'] = Field(default_factory=list)
    "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result."
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the activity definition content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, or bibliographic references.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    specimenRequirement: Sequence_['canonical'] = Field(default_factory=list)
    'Defines specimen requirements for the action to be performed, such as required specimens for a lab test.'
    observationRequirement: Sequence_['canonical'] = Field(default_factory=list)
    'Defines observation requirements for the action to be performed, such as body weight or surface area.'
    observationResultRequirement: Sequence_['canonical'] = Field(default_factory=list)
    'Defines the observations that are expected to be produced by the action.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the activity definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.'


class ActorDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes an actor - a human or an application that plays a role in data exchange, and that may have obligations associated with the role the actor plays."""
    resourceType: Literal_['ActorDefinition'] = Field(default=...)
    'An application that exchanges data'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the actor definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the actor definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the actor definition changes.'
    type: 'code' = Field(default=...)
    'Whether the actor represents a human or an appliction.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the actor definition.'
    status: 'code' = Field(default=...)
    'The status of this actor definition. Enables tracking the life-cycle of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the actor definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the actor definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this actor definition is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the actor definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the actor definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the actor definition.'
    reference: Sequence_['url'] = Field(default_factory=list)
    'A reference to additional documentation about the actor, but description and documentation.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this actor definition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate actor definition instances.'
    description: Optional_['markdown'] = Field(default=None)
    'A free text natural language description of the actor.'
    derivedFrom: Sequence_['canonical'] = Field(default_factory=list)
    'A url that identifies the definition of this actor in another IG (which IG must be listed in the dependencies). This actor inherits all the obligations etc. as defined in the other IG.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this actor definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the actor definition is intended to be used.'
    capabilities: Optional_['canonical'] = Field(default=None)
    'The capability statement for the actor (if the concept is applicable).'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    documentation: Optional_['markdown'] = Field(default=None)
    'Documentation about the functionality of the actor.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this actor definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this actor definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the actor definition is stored on different servers.'


class AdministrableProductDefinitionRouteOfAdministration(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The path by which the product is taken into or makes contact with the body. In some regions this is referred to as the licenced or approved route. RouteOfAdministration cannot be used when the 'formOf' product already uses MedicinalProductDefinition.route (and vice versa)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Coded expression for the route.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    firstDose: Optional_['Quantity'] = Field(default=None)
    'The first dose (dose quantity) administered can be specified for the product, using a numerical value and its unit of measurement.'
    maxSingleDose: Optional_['Quantity'] = Field(default=None)
    'The maximum single dose that can be administered, specified using a numerical value and its unit of measurement.'
    maxDosePerDay: Optional_['Quantity'] = Field(default=None)
    'The maximum dose per day (maximum dose quantity to be administered in any one 24-h period) that can be administered.'
    targetSpecies: Sequence_['AdministrableProductDefinitionRouteOfAdministrationTargetSpecies'] = Field(default_factory=list)
    'A species for which this route applies.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    maxTreatmentPeriod: Optional_['Duration'] = Field(default=None)
    'The maximum treatment period during which the product can be administered.'
    maxDosePerTreatmentPeriod: Optional_['Ratio'] = Field(default=None)
    'The maximum dose per treatment period that can be administered.'


class AdministrableProductDefinitionRouteOfAdministrationTargetSpecies(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A species for which this route applies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Coded expression for the species.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    withdrawalPeriod: Sequence_['AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriod'] = Field(default_factory=list)
    'A species specific time during which consumption of animal product is not appropriate.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriod(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A species specific time during which consumption of animal product is not appropriate."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    value: 'Quantity' = Field(default=...)
    'A value for the time.'
    tissue: 'CodeableConcept' = Field(default=...)
    'Coded expression for the type of tissue for which the withdrawal period applies, e.g. meat, milk.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    supportingInformation: Optional_['string'] = Field(default=None)
    'Extra information about the withdrawal period.'


class AdministrableProductDefinitionProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Characteristics e.g. a product's onset of action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A code expressing the type of characteristic.'
    status: Optional_['CodeableConcept'] = Field(default=None)
    'The status of characteristic e.g. assigned or pending.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A value for the characteristic.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'A value for the characteristic.'
    valueDate: Optional_['date'] = Field(default=None)
    'A value for the characteristic.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'A value for the characteristic.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'A value for the characteristic.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'A value for the characteristic.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'A value for the characteristic.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AdministrableProductDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed)."""
    resourceType: Literal_['AdministrableProductDefinition'] = Field(default=...)
    'A medicinal product in the final form, suitable for administration - after any mixing of multiple components'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: 'code' = Field(default=...)
    'The status of this administrable product. Enables tracking the life-cycle of the content.'
    formOf: Sequence_['Reference'] = Field(default_factory=list)
    "References a product from which one or more of the constituent parts of that product can be prepared and used as described by this administrable product.  If this administrable product describes the administration of a crushed tablet, the 'formOf' would be the product representing a distribution containing tablets and possibly also a cream.  This is distinct from the 'producedFrom' which refers to the specific components of the product that are used in this preparation, rather than the product as a whole."
    device: Optional_['Reference'] = Field(default=None)
    'A device that is integral to the medicinal product, in effect being considered as an "ingredient" of the medicinal product. This is not intended for devices that are just co-packaged.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    property: Sequence_['AdministrableProductDefinitionProperty'] = Field(default_factory=list)
    "Characteristics e.g. a product's onset of action."
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'An identifier for the administrable product.'
    ingredient: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The ingredients of this administrable medicinal product. This is only needed if the ingredients are not specified either using ManufacturedItemDefiniton (via AdministrableProductDefinition.producedFrom) to state which component items are used to make this, or using by incoming references from the Ingredient resource, to state in detail which substances exist within this. This element allows a basic coded ingredient to be used.'
    description: Optional_['markdown'] = Field(default=None)
    'A general description of the product, when in its final form, suitable for administration e.g. effervescent blue liquid, to be swallowed. Intended to be used when the other structured properties of this resource are insufficient or cannot be supported. It is not intended to duplicate information already carried elswehere.'
    producedFrom: Sequence_['Reference'] = Field(default_factory=list)
    "Indicates the specific manufactured items that are part of the 'formOf' product that are used in the preparation of this specific administrable form.  In some cases, an administrable form might use all of the items from the overall product (or there might only be one item), while in other cases, an administrable form might use only a subset of the items available in the overall product.  For example, an administrable form might involve combining a liquid and a powder available as part of an overall product, but not involve applying the also supplied cream."
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    unitOfPresentation: Optional_['CodeableConcept'] = Field(default=None)
    "The presentation type in which this item is given to a patient. e.g. for a spray - 'puff' (as in 'contains 100 mcg per puff'), or for a liquid - 'vial' (as in 'contains 5 ml per vial')."
    administrableDoseForm: Optional_['CodeableConcept'] = Field(default=None)
    "The dose form of the final product after necessary reconstitution or processing. Contrasts to the manufactured dose form (see ManufacturedItemDefinition). If the manufactured form was 'powder for solution for injection', the administrable dose form could be 'solution for injection' (once mixed with another item having manufactured form 'solvent for solution for injection')."
    routeOfAdministration: Sequence_['AdministrableProductDefinitionRouteOfAdministration'] = Field(default=...)
    "The path by which the product is taken into or makes contact with the body. In some regions this is referred to as the licenced or approved route. RouteOfAdministration cannot be used when the 'formOf' product already uses MedicinalProductDefinition.route (and vice versa)."


class AdverseEventContributingFactor(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The contributing factors suspected to have increased the probability or severity of the adverse event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    itemReference: Optional_['Reference'] = Field(default=None)
    'The item that is suspected to have increased the probability or severity of the adverse event.'
    itemCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The item that is suspected to have increased the probability or severity of the adverse event.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AdverseEventMitigatingAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The ameliorating action taken after the adverse event occured in order to reduce the extent of harm."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    itemReference: Optional_['Reference'] = Field(default=None)
    'The ameliorating action taken after the adverse event occured in order to reduce the extent of harm.'
    itemCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The ameliorating action taken after the adverse event occured in order to reduce the extent of harm.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AdverseEventPreventiveAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Preventive actions that contributed to avoiding the adverse event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    itemReference: Optional_['Reference'] = Field(default=None)
    'The action that contributed to avoiding the adverse event.'
    itemCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The action that contributed to avoiding the adverse event.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AdverseEventSupportingInfo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Supporting information relevant to the event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    itemReference: Optional_['Reference'] = Field(default=None)
    "Relevant past history for the subject. In a clinical care context, an example being a patient had an adverse event following a pencillin administration and the patient had a previously documented penicillin allergy. In a clinical trials context, an example is a bunion or rash that was present prior to the study. Additionally, the supporting item can be a document that is relevant to this instance of the adverse event that is not part of the subject's medical history. For example, a clinical note, staff list, or material safety data sheet (MSDS).  Supporting information is not a contributing factor, preventive action, or mitigating action."
    itemCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    "Relevant past history for the subject. In a clinical care context, an example being a patient had an adverse event following a pencillin administration and the patient had a previously documented penicillin allergy. In a clinical trials context, an example is a bunion or rash that was present prior to the study. Additionally, the supporting item can be a document that is relevant to this instance of the adverse event that is not part of the subject's medical history. For example, a clinical note, staff list, or material safety data sheet (MSDS).  Supporting information is not a contributing factor, preventive action, or mitigating action."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AdverseEventSuspectEntity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes the entity that is suspected to have caused the adverse event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    causality: Optional_['AdverseEventSuspectEntityCausality'] = Field(default=None)
    'Information on the possible cause of the event.'
    instanceCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Identifies the actual instance of what caused the adverse event.  May be a substance, medication, medication administration, medication statement or a device.'
    instanceReference: Optional_['Reference'] = Field(default=None)
    'Identifies the actual instance of what caused the adverse event.  May be a substance, medication, medication administration, medication statement or a device.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AdverseEventSuspectEntityCausality(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information on the possible cause of the event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    author: Optional_['Reference'] = Field(default=None)
    'The author of the information on the possible cause of the event.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    assessmentMethod: Optional_['CodeableConcept'] = Field(default=None)
    'The method of evaluating the relatedness of the suspected entity to the event.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    entityRelatedness: Optional_['CodeableConcept'] = Field(default=None)
    'The result of the assessment regarding the relatedness of the suspected entity to the event.'


class AdverseEventParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what participated in the adverse event and how they were involved."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'Indicates who or what participated in the event.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of involvement of the actor in the adverse event, such as contributor or informant.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AdverseEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management. Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers. Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints."""
    resourceType: Literal_['AdverseEvent'] = Field(default=...)
    'An event that may be related to unintended effects on a patient or research participant'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the adverse event by the performer, subject or other participants.'
    study: Sequence_['Reference'] = Field(default_factory=list)
    'The research study that the subject is enrolled in.'
    status: 'code' = Field(default=...)
    'The current state of the adverse event or potential adverse event.'
    subject: 'Reference' = Field(default=...)
    'This subject or group impacted by the event.'
    outcome: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Describes the type of outcome from the adverse event, such as resolved, recovering, ongoing, resolved-with-sequelae, or fatal.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The overall type of event, intended for search and filtering purposes.'
    detected: Optional_['dateTime'] = Field(default=None)
    'Estimated or actual date the AdverseEvent began, in the opinion of the reporter.'
    location: Optional_['Reference'] = Field(default=None)
    'The information about where the adverse event occurred.'
    recorder: Optional_['Reference'] = Field(default=None)
    'Information on who recorded the adverse event.  May be the patient or a practitioner.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    actuality: 'code' = Field(default=...)
    'Whether the event actually happened or was a near miss. Note that this is independent of whether anyone was affected or harmed or how severely.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter associated with the start of the AdverseEvent.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    seriousness: Optional_['CodeableConcept'] = Field(default=None)
    'Assessment whether this event, or averted event, was of clinical importance.'
    participant: Sequence_['AdverseEventParticipant'] = Field(default_factory=list)
    'Indicates who or what participated in the adverse event and how they were involved.'
    recordedDate: Optional_['dateTime'] = Field(default=None)
    'The date on which the existence of the AdverseEvent was first recorded.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'The date (and perhaps time) when the adverse event occurred.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'The date (and perhaps time) when the adverse event occurred.'
    occurrenceTiming: Optional_['Timing'] = Field(default=None)
    'The date (and perhaps time) when the adverse event occurred.'
    suspectEntity: Sequence_['AdverseEventSuspectEntity'] = Field(default_factory=list)
    'Describes the entity that is suspected to have caused the adverse event.'
    supportingInfo: Sequence_['AdverseEventSupportingInfo'] = Field(default_factory=list)
    'Supporting information relevant to the event.'
    resultingEffect: Sequence_['Reference'] = Field(default_factory=list)
    'Information about the condition that occurred as a result of the adverse event, such as hives due to the exposure to a substance (for example, a drug or a chemical) or a broken leg as a result of the fall.'
    preventiveAction: Sequence_['AdverseEventPreventiveAction'] = Field(default_factory=list)
    'Preventive actions that contributed to avoiding the adverse event.'
    mitigatingAction: Sequence_['AdverseEventMitigatingAction'] = Field(default_factory=list)
    'The ameliorating action taken after the adverse event occured in order to reduce the extent of harm.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    contributingFactor: Sequence_['AdverseEventContributingFactor'] = Field(default_factory=list)
    'The contributing factors suspected to have increased the probability or severity of the adverse event.'
    expectedInResearchStudy: Optional_['boolean'] = Field(default=None)
    'Considered likely or probable or anticipated in the research study.  Whether the reported event matches any of the outcomes for the patient that are considered by the study as known or likely.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Specific event that occurred or that was averted, such as patient fall, wrong organ removed, or wrong blood transfused.'


class AllergyIntoleranceParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'Indicates who or what participated in the activities related to the allergy or intolerance.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AllergyIntoleranceReaction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details about each adverse reaction event linked to exposure to the identified substance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Additional text about the adverse reaction event not captured in other fields.'
    onset: Optional_['dateTime'] = Field(default=None)
    'Record of the date and/or time of the onset of the Reaction.'
    severity: Optional_['code'] = Field(default=None)
    'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    substance: Optional_['CodeableConcept'] = Field(default=None)
    "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance."
    description: Optional_['string'] = Field(default=None)
    'Text description about the reaction as a whole, including details of the manifestation if required.'
    manifestation: Sequence_['CodeableReference'] = Field(default=...)
    'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.'
    exposureRoute: Optional_['CodeableConcept'] = Field(default=None)
    'Identification of the route by which the subject was exposed to the substance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AllergyIntolerance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Risk of harmful or undesirable physiological response which is specific to an individual and associated with exposure to a substance."""
    resourceType: Literal_['AllergyIntolerance'] = Field(default=...)
    'Allergy or Intolerance (generally: Risk of adverse reaction to a substance)'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Identification of the underlying physiological mechanism for the reaction risk.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.'
    patient: 'Reference' = Field(default=...)
    'The patient who has the allergy or intolerance.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['code'] = Field(default_factory=list)
    'Category of the identified substance.'
    onsetDateTime: Optional_['dateTime'] = Field(default=None)
    'Estimated or actual date,  date-time, or age when allergy or intolerance was identified.'
    onsetAge: Optional_['Age'] = Field(default=None)
    'Estimated or actual date,  date-time, or age when allergy or intolerance was identified.'
    onsetPeriod: Optional_['Period'] = Field(default=None)
    'Estimated or actual date,  date-time, or age when allergy or intolerance was identified.'
    onsetRange: Optional_['Range'] = Field(default=None)
    'Estimated or actual date,  date-time, or age when allergy or intolerance was identified.'
    onsetString: Optional_['string'] = Field(default=None)
    'Estimated or actual date,  date-time, or age when allergy or intolerance was identified.'
    reaction: Sequence_['AllergyIntoleranceReaction'] = Field(default_factory=list)
    'Details about each adverse reaction event linked to exposure to the identified substance.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter when the allergy or intolerance was asserted.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    criticality: Optional_['code'] = Field(default=None)
    'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.'
    participant: Sequence_['AllergyIntoleranceParticipant'] = Field(default_factory=list)
    'Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved.'
    recordedDate: Optional_['dateTime'] = Field(default=None)
    'The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    clinicalStatus: Optional_['CodeableConcept'] = Field(default=None)
    'The clinical status of the allergy or intolerance.'
    lastOccurrence: Optional_['dateTime'] = Field(default=None)
    'Represents the date and/or time of the last known occurrence of a reaction event.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    verificationStatus: Optional_['CodeableConcept'] = Field(default=None)
    'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., "Latex"), an allergy or intolerance condition (e.g., "Latex allergy"), or a negated/excluded code for a specific substance or class (e.g., "No latex allergy") or a general or categorical negated statement (e.g.,  "No known allergy", "No known drug allergies").  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the \'code\' and ignore the \'reaction.substance\'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.'


class AppointmentRecurrenceTemplate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The details of the recurrence pattern or template that is used to generate recurring appointments."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    timezone: Optional_['CodeableConcept'] = Field(default=None)
    'The timezone of the recurring appointment occurrences.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    excludingDate: Sequence_['date'] = Field(default_factory=list)
    'Any dates, such as holidays, that should be excluded from the recurrence.'
    recurrenceType: 'CodeableConcept' = Field(default=...)
    'How often the appointment series should recur.'
    occurrenceDate: Sequence_['date'] = Field(default_factory=list)
    'The list of specific dates that will have appointments generated.'
    weeklyTemplate: Optional_['AppointmentRecurrenceTemplateWeeklyTemplate'] = Field(default=None)
    'Information about weekly recurring appointments.'
    yearlyTemplate: Optional_['AppointmentRecurrenceTemplateYearlyTemplate'] = Field(default=None)
    'Information about yearly recurring appointments.'
    occurrenceCount: Optional_['positiveInt'] = Field(default=None)
    'How many appointments are planned in the recurrence.'
    monthlyTemplate: Optional_['AppointmentRecurrenceTemplateMonthlyTemplate'] = Field(default=None)
    'Information about monthly recurring appointments.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    lastOccurrenceDate: Optional_['date'] = Field(default=None)
    'Recurring appointments will not occur after this date.'
    excludingRecurrenceId: Sequence_['positiveInt'] = Field(default_factory=list)
    'Any dates, such as holidays, that should be excluded from the recurrence.'


class AppointmentRecurrenceTemplateMonthlyTemplate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about monthly recurring appointments."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    dayOfWeek: Optional_['Coding'] = Field(default=None)
    'Indicates which day of the week the recurring appointments should occur each nth week.'
    dayOfMonth: Optional_['positiveInt'] = Field(default=None)
    'Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.'
    monthInterval: 'positiveInt' = Field(default=...)
    'Indicates that recurring appointments should occur every nth month.'
    nthWeekOfMonth: Optional_['Coding'] = Field(default=None)
    'Indicates which week within a month the appointments in the series of recurring appointments should occur on.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AppointmentRecurrenceTemplateYearlyTemplate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about yearly recurring appointments."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    yearInterval: 'positiveInt' = Field(default=...)
    'Appointment recurs every nth year.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AppointmentRecurrenceTemplateWeeklyTemplate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about weekly recurring appointments."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    monday: Optional_['boolean'] = Field(default=None)
    'Indicates that recurring appointments should occur on Mondays.'
    friday: Optional_['boolean'] = Field(default=None)
    'Indicates that recurring appointments should occur on Fridays.'
    sunday: Optional_['boolean'] = Field(default=None)
    'Indicates that recurring appointments should occur on Sundays.'
    tuesday: Optional_['boolean'] = Field(default=None)
    'Indicates that recurring appointments should occur on Tuesdays.'
    thursday: Optional_['boolean'] = Field(default=None)
    'Indicates that recurring appointments should occur on Thursdays.'
    saturday: Optional_['boolean'] = Field(default=None)
    'Indicates that recurring appointments should occur on Saturdays.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    wednesday: Optional_['boolean'] = Field(default=None)
    'Indicates that recurring appointments should occur on Wednesdays.'
    weekInterval: Optional_['positiveInt'] = Field(default=None)
    'The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AppointmentParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """List of participants involved in the appointment."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Role of participant in the appointment.'
    actor: Optional_['Reference'] = Field(default=None)
    'The individual, device, location, or service participating in the appointment.'
    period: Optional_['Period'] = Field(default=None)
    'Participation period of the actor.'
    status: 'code' = Field(default=...)
    'Participation status of the actor.'
    required: Optional_['boolean'] = Field(default=None)
    'Whether this participant is required to be present at the meeting. If false, the participant is optional.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Appointment(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)."""
    resourceType: Literal_['Appointment'] = Field(default=...)
    'A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    end: Optional_['instant'] = Field(default=None)
    'Date/Time that the appointment is to conclude.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    slot: Sequence_['Reference'] = Field(default_factory=list)
    "The slots from the participants' schedules that will be filled by the appointment."
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Additional notes/comments about the appointment.'
    class_: Sequence_['CodeableConcept'] = Field(default_factory=list, alias='class')
    'Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.'
    start: Optional_['instant'] = Field(default=None)
    'Date/Time that the appointment is to take place.'
    status: 'code' = Field(default=...)
    'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.'
    account: Sequence_['Reference'] = Field(default_factory=list)
    'The set of accounts that is expected to be used for billing the activities that result from this Appointment.'
    created: Optional_['dateTime'] = Field(default=None)
    'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'The request this appointment is allocated to assess (e.g. incoming referral or procedure request).'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    priority: Optional_['CodeableConcept'] = Field(default=None)
    'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).'
    replaces: Sequence_['Reference'] = Field(default_factory=list)
    'Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specialty: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The specialty of a practitioner that would be required to perform the service requested in this appointment.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).'
    serviceType: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The specific service that is to be performed during this appointment.'
    description: Optional_['string'] = Field(default=None)
    'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the note field.'
    participant: Sequence_['AppointmentParticipant'] = Field(default=...)
    'List of participants involved in the appointment.'
    recurrenceId: Optional_['positiveInt'] = Field(default=None)
    'The sequence number that identifies a specific appointment in a recurring pattern.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    virtualService: Sequence_['VirtualServiceDetail'] = Field(default_factory=list)
    'Connection details of a virtual service (e.g. conference call).'
    serviceCategory: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A broad categorization of the service that is to be performed during this appointment.'
    appointmentType: Optional_['CodeableConcept'] = Field(default=None)
    'The style of appointment or patient that has been booked in the slot (not service type).'
    minutesDuration: Optional_['positiveInt'] = Field(default=None)
    'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times.  For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work.  Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.'
    requestedPeriod: Sequence_['Period'] = Field(default_factory=list)
    'A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.'
    cancellationDate: Optional_['dateTime'] = Field(default=None)
    'The date/time describing when the appointment was cancelled.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    occurrenceChanged: Optional_['boolean'] = Field(default=None)
    'This appointment varies from the recurring pattern.'
    cancellationReason: Optional_['CodeableConcept'] = Field(default=None)
    'The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.'
    patientInstruction: Sequence_['CodeableReference'] = Field(default_factory=list)
    'While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).'
    recurrenceTemplate: Sequence_['AppointmentRecurrenceTemplate'] = Field(default_factory=list)
    'The details of the recurrence pattern or template that is used to generate recurring appointments.'
    previousAppointment: Optional_['Reference'] = Field(default=None)
    'The previous appointment in a series of related appointments.'
    supportingInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Additional information to support the appointment provided when making the appointment.'
    originatingAppointment: Optional_['Reference'] = Field(default=None)
    'The originating appointment in a recurring set of related appointments.'


class AppointmentResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."""
    resourceType: Literal_['AppointmentResponse'] = Field(default=...)
    'A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    end: Optional_['instant'] = Field(default=None)
    'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    start: Optional_['instant'] = Field(default=None)
    'Date/Time that the appointment is to take place, or requested new start time.'
    actor: Optional_['Reference'] = Field(default=None)
    'A Person, Location, HealthcareService, or Device that is participating in the appointment.'
    comment: Optional_['markdown'] = Field(default=None)
    'Additional comments about the appointment.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    recurring: Optional_['boolean'] = Field(default=None)
    'Indicates that this AppointmentResponse applies to all occurrences in a recurring request.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.'
    appointment: 'Reference' = Field(default=...)
    'Appointment that this response is replying to.'
    recurrenceId: Optional_['positiveInt'] = Field(default=None)
    'The recurrence ID (sequence number) of the specific appointment when responding to a recurring request.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDate: Optional_['date'] = Field(default=None)
    'The original date within a recurring request. This could be used in place of the recurrenceId to be more direct (or where the template is provided through the simple list of dates in `Appointment.occurrenceDate`).'
    proposedNewTime: Optional_['boolean'] = Field(default=None)
    'Indicates that the response is proposing a different time that was initially requested.  The new proposed time will be indicated in the start and end properties.'
    participantType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Role of participant in the appointment.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    participantStatus: 'code' = Field(default=...)
    'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.'


class ArtifactAssessmentContent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A component comment, classifier, or rating of the artifact."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates what type of content this component represents.'
    path: Sequence_['uri'] = Field(default_factory=list)
    'A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.'
    author: Optional_['Reference'] = Field(default=None)
    'Indicates who or what authored the content.'
    summary: Optional_['markdown'] = Field(default=None)
    'A brief summary of the content of this component.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'A quantitative rating of the artifact.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    component: Sequence_['ArtifactAssessmentContent'] = Field(default_factory=list)
    'If the informationType is container, the components of the content.'
    classifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Represents a rating, classifier, or assessment of the artifact.'
    freeToShare: Optional_['boolean'] = Field(default=None)
    'Acceptable to publicly share the comment, classifier or rating.'
    informationType: Optional_['code'] = Field(default=None)
    'The type of information this component of the content represents.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ArtifactAssessment(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content."""
    resourceType: Literal_['ArtifactAssessment'] = Field(default=...)
    'Adds metadata-supported comments, classifiers or ratings related to a Resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    title: Optional_['string'] = Field(default=None)
    'A short title for the assessment for use in displaying and selecting.'
    content: Sequence_['ArtifactAssessmentContent'] = Field(default_factory=list)
    'A component comment, classifier, or rating of the artifact.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    citeAsReference: Optional_['Reference'] = Field(default=None)
    'Display of or reference to the bibliographic citation of the comment, classifier, or rating.'
    citeAsMarkdown: Optional_['markdown'] = Field(default=None)
    'Display of or reference to the bibliographic citation of the comment, classifier, or rating.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    artifactReference: Optional_['Reference'] = Field(default=None)
    'A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.'
    artifactCanonical: Optional_['canonical'] = Field(default=None)
    'A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.'
    artifactUri: Optional_['uri'] = Field(default=None)
    'A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.'
    disposition: Optional_['code'] = Field(default=None)
    'Indicates the disposition of the responsible party to the comment or change request.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    workflowStatus: Optional_['code'] = Field(default=None)
    'Indicates the workflow status of the comment or change request.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.'


class AuditEventOutcome(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates whether the event succeeded or failed. A free text descripiton can be given in outcome.text."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'Coding' = Field(default=...)
    'Indicates whether the event succeeded or failed.'
    detail: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Additional details about the error. This may be a text description of the error or a system code that identifies the error.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AuditEventEntity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specific instances of data or objects that have been accessed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    what: Optional_['Reference'] = Field(default=None)
    'Identifies a specific instance of the entity. The reference should be version specific. This is allowed to be a Parameters resource.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'Code representing the role the entity played in the event being audited.'
    query: Optional_['base64Binary'] = Field(default=None)
    'The query parameters for a query-type entities.'
    agent: Sequence_['AuditEventAgent'] = Field(default_factory=list)
    "The entity is attributed to an agent to express the agent's responsibility for that entity in the activity. This is most used to indicate when persistence media (the entity) are used by an agent. For example when importing data from a device, the device would be described in an entity, and the user importing data from that media would be indicated as the entity.agent."
    detail: Sequence_['AuditEventEntityDetail'] = Field(default_factory=list)
    'Tagged value pairs for conveying additional information about the entity.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    securityLabel: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Security labels for the identified entity.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AuditEventEntityDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Tagged value pairs for conveying additional information about the entity."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The type of extra detail provided in the value.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The  value of the extra detail.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The  value of the extra detail.'
    valueString: Optional_['string'] = Field(default=None)
    'The  value of the extra detail.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The  value of the extra detail.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The  value of the extra detail.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The  value of the extra detail.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The  value of the extra detail.'
    valueTime: Optional_['time'] = Field(default=None)
    'The  value of the extra detail.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The  value of the extra detail.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The  value of the extra detail.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'The  value of the extra detail.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AuditEventSource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The actor that is reporting the event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    site: Optional_['Reference'] = Field(default=None)
    'Logical source location within the healthcare enterprise network.  For example, a hospital or other provider location within a multi-entity provider group.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Code specifying the type of source where event originated.'
    observer: 'Reference' = Field(default=...)
    'Identifier of the source where the event was detected.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AuditEventAgent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An actor taking an active role in the event or activity that is logged."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    who: 'Reference' = Field(default=...)
    'Reference to who this agent is that was involved in the event.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The Functional Role of the user when performing the event.'
    role: Sequence_['CodeableConcept'] = Field(default_factory=list)
    "The structural roles of the agent indicating the agent's competency. The security role enabling the agent with respect to the activity."
    policy: Sequence_['uri'] = Field(default_factory=list)
    'Where the policy(ies) are known that authorized the agent participation in the event. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.'
    location: Optional_['Reference'] = Field(default=None)
    'Where the agent location is known, the agent location when the event occurred.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requestor: Optional_['boolean'] = Field(default=None)
    'Indicator that the user is or is not the requestor, or initiator, for the event being audited.'
    networkReference: Optional_['Reference'] = Field(default=None)
    'When the event utilizes a network there should be an agent describing the local system, and an agent describing remote system, with the network interface details.'
    networkUri: Optional_['uri'] = Field(default=None)
    'When the event utilizes a network there should be an agent describing the local system, and an agent describing remote system, with the network interface details.'
    networkString: Optional_['string'] = Field(default=None)
    'When the event utilizes a network there should be an agent describing the local system, and an agent describing remote system, with the network interface details.'
    authorization: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The authorization (e.g., PurposeOfUse) that was used during the event being recorded.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class AuditEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis."""
    resourceType: Literal_['AuditEvent'] = Field(default=...)
    'Record of an event'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    agent: Sequence_['AuditEventAgent'] = Field(default=...)
    'An actor taking an active role in the event or activity that is logged.'
    action: Optional_['code'] = Field(default=None)
    'Indicator for type of action performed during the event that generated the audit.'
    source: 'AuditEventSource' = Field(default=...)
    'The actor that is reporting the event.'
    entity: Sequence_['AuditEventEntity'] = Field(default_factory=list)
    'Specific instances of data or objects that have been accessed.'
    outcome: Optional_['AuditEventOutcome'] = Field(default=None)
    'Indicates whether the event succeeded or failed. A free text descripiton can be given in outcome.text.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'Allows tracing of authorizatino for the events and tracking whether proposals/recommendations were acted upon.'
    patient: Optional_['Reference'] = Field(default=None)
    'The patient element is available to enable deterministic tracking of activities that involve the patient as the subject of the data used in an activity.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Classification of the type of event.'
    severity: Optional_['code'] = Field(default=None)
    'Indicates and enables segmentation of various severity including debugging from critical.'
    recorded: 'instant' = Field(default=...)
    'The time when the event was recorded.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'This will typically be the encounter the event occurred, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission lab tests).'
    occurredPeriod: Optional_['Period'] = Field(default=None)
    'The time or period during which the activity occurred.'
    occurredDateTime: Optional_['dateTime'] = Field(default=None)
    'The time or period during which the activity occurred.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    authorization: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The authorization (e.g., PurposeOfUse) that was used during the event being recorded.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'CodeableConcept' = Field(default=...)
    'Describes what happened. The most specific code for the event.'


class Basic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."""
    resourceType: Literal_['Basic'] = Field(default=...)
    'Resource for non-supported content'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    author: Optional_['Reference'] = Field(default=None)
    'Indicates who was responsible for creating the resource instance.'
    subject: Optional_['Reference'] = Field(default=None)
    'Identifies the patient, practitioner, device or any other resource that is the "focus" of this resource.'
    created: Optional_['dateTime'] = Field(default=None)
    'Identifies when the resource was first created.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier assigned to the resource for business purposes, outside the context of FHIR.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'CodeableConcept' = Field(default=...)
    "Identifies the 'type' of resource - equivalent to the resource name for other resources."


class Binary(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc."""
    resourceType: Literal_['Binary'] = Field(default=...)
    'Pure binary content defined by a format other than FHIR'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    data: Optional_['base64Binary'] = Field(default=None)
    'The actual content, base64 encoded.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contentType: 'code' = Field(default=...)
    'MimeType of the binary content represented as a standard MimeType (BCP 13).'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    securityContext: Optional_['Reference'] = Field(default=None)
    'This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.'


class BiologicallyDerivedProductCollection(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """How this product was collected."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    source: Optional_['Reference'] = Field(default=None)
    'The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    collector: Optional_['Reference'] = Field(default=None)
    'Healthcare professional who is performing the collection.'
    collectedDateTime: Optional_['dateTime'] = Field(default=None)
    'Time of product collection.'
    collectedPeriod: Optional_['Period'] = Field(default=None)
    'Time of product collection.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class BiologicallyDerivedProductProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A property that is specific to this BiologicallyDerviedProduct instance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Code that specifies the property. It should reference an established coding system.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Property values.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'Property values.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Property values.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'Property values.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Property values.'
    valueRange: Optional_['Range'] = Field(default=None)
    'Property values.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'Property values.'
    valueString: Optional_['string'] = Field(default=None)
    'Property values.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'Property values.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class BiologicallyDerivedProduct(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource reflects an instance of a biologically derived product. A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity."""
    resourceType: Literal_['BiologicallyDerivedProduct'] = Field(default=...)
    'This resource reflects an instance of a biologically derived product'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    parent: Sequence_['Reference'] = Field(default_factory=list)
    'Parent product (if any) for this biologically-derived product.'
    request: Sequence_['Reference'] = Field(default_factory=list)
    'Request to obtain and/or infuse this biologically derived product.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    division: Optional_['string'] = Field(default=None)
    'A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.'
    property: Sequence_['BiologicallyDerivedProductProperty'] = Field(default_factory=list)
    'A property that is specific to this BiologicallyDerviedProduct instance.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique instance identifiers assigned to a biologically derived product. Note: This is a business identifier, not a resource identifier.'
    collection: Optional_['BiologicallyDerivedProductCollection'] = Field(default=None)
    'How this product was collected.'
    productCode: Optional_['CodeableConcept'] = Field(default=None)
    'A codified value that systematically supports characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    productStatus: Optional_['Coding'] = Field(default=None)
    'Whether the product is currently available.'
    expirationDate: Optional_['dateTime'] = Field(default=None)
    'Date, and where relevant time, of expiration.'
    productCategory: Optional_['Coding'] = Field(default=None)
    'Broad category of this product.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    processingFacility: Sequence_['Reference'] = Field(default_factory=list)
    'Processing facilities responsible for the labeling and distribution of this biologically derived product.'
    biologicalSourceEvent: Optional_['Identifier'] = Field(default=None)
    'An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.'
    storageTempRequirements: Optional_['Range'] = Field(default=None)
    'The temperature requirements for storage of the biologically-derived product.'


class BiologicallyDerivedProductDispensePerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what performed an action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'Identifies the person responsible for the action.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Identifies the function of the performer during the dispense.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class BiologicallyDerivedProductDispense(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource reflects an instance of a biologically derived product dispense. The supply or dispense of a biologically derived product from the supply organization or department (e.g. hospital transfusion laboratory) to the clinical team responsible for clinical application."""
    resourceType: Literal_['BiologicallyDerivedProductDispense'] = Field(default=...)
    'A record of dispensation of a biologically derived product'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Additional notes.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular event is a component.'
    status: 'code' = Field(default=...)
    'A code specifying the state of the dispense event.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'The order or request that the dispense is fulfilling. This is a reference to a ServiceRequest resource.'
    product: 'Reference' = Field(default=...)
    'A link to a resource identifying the biologically derived product that is being dispensed.'
    patient: 'Reference' = Field(default=...)
    'A link to a resource representing the patient that the product is dispensed for.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    location: Optional_['Reference'] = Field(default=None)
    'The physical location where the dispense was performed.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount of product in the dispense. Quantity will depend on the product being dispensed. Examples are: volume; cell count; concentration.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    performer: Sequence_['BiologicallyDerivedProductDispensePerformer'] = Field(default_factory=list)
    'Indicates who or what performed an action.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique instance identifiers assigned to a biologically derived product dispense. Note: This is a business identifier, not a resource identifier.'
    matchStatus: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the type of matching associated with the dispense.'
    destination: Optional_['Reference'] = Field(default=None)
    'Link to a resource identifying the physical location that the product was dispatched to.'
    preparedDate: Optional_['dateTime'] = Field(default=None)
    'When the product was selected/ matched.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    whenHandedOver: Optional_['dateTime'] = Field(default=None)
    'When the product was dispatched for clinical use.'
    usageInstruction: Optional_['string'] = Field(default=None)
    'Specific instructions for use.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    originRelationshipType: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the relationship between the donor of the biologically derived product and the intended recipient.'


class BodyStructureIncludedStructure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The anatomical location(s) or region(s) of the specimen, lesion, or body structure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    structure: 'CodeableConcept' = Field(default=...)
    'Code that represents the included structure.'
    qualifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Code that represents the included structure qualifier.'
    laterality: Optional_['CodeableConcept'] = Field(default=None)
    'Code that represents the included structure laterality.'
    spatialReference: Sequence_['Reference'] = Field(default_factory=list)
    'XY or XYZ-coordinate orientation for structure.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    bodyLandmarkOrientation: Sequence_['BodyStructureIncludedStructureBodyLandmarkOrientation'] = Field(default_factory=list)
    'Body locations in relation to a specific body landmark (tatoo, scar, other body structure).'


class BodyStructureIncludedStructureBodyLandmarkOrientation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Body locations in relation to a specific body landmark (tatoo, scar, other body structure)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    clockFacePosition: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'An description of the direction away from a landmark something is located based on a radial clock dial.'
    surfaceOrientation: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The surface area a body location is in relation to a landmark.'
    landmarkDescription: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A description of a landmark on the body used as a reference to locate something else.'
    distanceFromLandmark: Sequence_['BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmark'] = Field(default_factory=list)
    'The distance in centimeters a certain observation is made from a body landmark.'


class BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmark(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The distance in centimeters a certain observation is made from a body landmark."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    value: Sequence_['Quantity'] = Field(default_factory=list)
    'The measured distance (e.g., in cm) from a body landmark.'
    device: Sequence_['CodeableReference'] = Field(default_factory=list)
    'An instrument, tool, analyzer, etc. used in the measurement.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class BodyStructure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case."""
    resourceType: Literal_['BodyStructure'] = Field(default=...)
    'Specific and identified anatomical structure'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    image: Sequence_['Attachment'] = Field(default_factory=list)
    'Image or images used to identify a location.'
    active: Optional_['boolean'] = Field(default=None)
    'Whether this body site is in active use.'
    patient: 'Reference' = Field(default=...)
    'The person to which the body site belongs.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier for this instance of the anatomical structure.'
    morphology: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies.'
    description: Optional_['markdown'] = Field(default=None)
    'A summary, characterization or explanation of the body structure.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    includedStructure: Sequence_['BodyStructureIncludedStructure'] = Field(default=...)
    'The anatomical location(s) or region(s) of the specimen, lesion, or body structure.'
    excludedStructure: Sequence_['BodyStructureIncludedStructure'] = Field(default_factory=list)
    'The anatomical location(s) or region(s) not occupied or represented by the specimen, lesion, or body structure.'


class BundleEntry(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    link: Sequence_['BundleLink'] = Field(default_factory=list)
    'A series of links that provide context to this entry.'
    search: Optional_['BundleEntrySearch'] = Field(default=None)
    'Information about the search process that lead to the creation of this entry.'
    fullUrl: Optional_['uri'] = Field(default=None)
    'The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: \n* invoking a create\n* invoking or responding to an operation where the body is not a single identified resource\n* invoking or returning the results of a search or history operation.'
    request: Optional_['BundleEntryRequest'] = Field(default=None)
    'Additional information about how this entry should be processed as part of a transaction or batch.  For history, it shows how the entry was processed to create the version contained in the entry.'
    resource: Optional_['AnyResource'] = Field(default=None)
    'The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning.'
    response: Optional_['BundleEntryResponse'] = Field(default=None)
    "Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class BundleEntryResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    etag: Optional_['string'] = Field(default=None)
    'The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).'
    status: 'string' = Field(default=...)
    'The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.'
    outcome: Optional_['AnyResource'] = Field(default=None)
    'An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.'
    location: Optional_['uri'] = Field(default=None)
    'The location header created by processing this operation, populated if the operation returns a location.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    lastModified: Optional_['instant'] = Field(default=None)
    'The date/time that the resource was modified on the server.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class BundleEntryRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional information about how this entry should be processed as part of a transaction or batch.  For history, it shows how the entry was processed to create the version contained in the entry."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    url: 'uri' = Field(default=...)
    'The URL for this entry, relative to the root (the address to which the request is posted).'
    method: 'code' = Field(default=...)
    'In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.'
    ifMatch: Optional_['string'] = Field(default=None)
    'Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    ifNoneMatch: Optional_['string'] = Field(default=None)
    'If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread).'
    ifNoneExist: Optional_['string'] = Field(default=None)
    'Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").'
    ifModifiedSince: Optional_['instant'] = Field(default=None)
    'Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class BundleEntrySearch(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the search process that lead to the creation of this entry."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    mode: Optional_['code'] = Field(default=None)
    "Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process."
    score: Optional_['decimal'] = Field(default=None)
    "When searching, the server's search ranking score for the entry."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class BundleLink(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A series of links that provide context to this bundle."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    url: 'uri' = Field(default=...)
    'The reference details for the link.'
    relation: 'code' = Field(default=...)
    'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Bundle(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A container for a collection of resources."""
    resourceType: Literal_['Bundle'] = Field(default=...)
    'Contains a collection of resources'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    type: 'code' = Field(default=...)
    'Indicates the purpose of this bundle - how it is intended to be used.'
    link: Sequence_['BundleLink'] = Field(default_factory=list)
    'A series of links that provide context to this bundle.'
    total: Optional_['unsignedInt'] = Field(default=None)
    "If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search.  It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle."
    entry: Sequence_['BundleEntry'] = Field(default_factory=list)
    'An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).'
    issues: Optional_['AnyResource'] = Field(default=None)
    'Captures issues and warnings that relate to the construction of the Bundle and the content within it.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    timestamp: Optional_['instant'] = Field(default=None)
    'The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.'
    signature: Optional_['Signature'] = Field(default=None)
    'Digital Signature - base64 encoded. XML-DSig or a JWS.'
    identifier: Optional_['Identifier'] = Field(default=None)
    "A persistent identifier for the bundle that won't change as a bundle is copied from server to server."
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'


class CanonicalResource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Common Interface declaration for conformance and knowledge artifact resources."""
    resourceType: Literal_['CanonicalResource'] = Field(default=...)
    'Common Interface declaration for definitional resources'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this {{title}} when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this {{title}} is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the {{title}} is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the {{title}}. This name should be usable as an identifier for the resource by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the {{title}} was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the {{title}} changes.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the {{title}}.'
    status: 'code' = Field(default=...)
    'The current state of this {{title}}. '
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the {{title}} when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the {{title}} author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence without additional knowledge.  (See the versionAlgorithm element.)'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this {{title}} is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the {{title}}.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the {{title}} and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the {{title}}.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this {{title}} when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate {{title}}s.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the {{title}} from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this {{title}} is authored for testing purposes (or education/evaluation/marketing) and is not intended for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the {{title}} is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'


class CapabilityStatementImplementation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    custodian: Optional_['Reference'] = Field(default=None)
    'The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.'
    description: 'markdown' = Field(default=...)
    'Information about the specific installation that this capability statement relates to.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    url: Optional_['url'] = Field(default=None)
    'An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces.'


class CapabilityStatementMessaging(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A description of the messaging capabilities of the solution."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    endpoint: Sequence_['CapabilityStatementMessagingEndpoint'] = Field(default_factory=list)
    'An endpoint (network accessible address) to which messages and/or replies are to be sent.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reliableCache: Optional_['unsignedInt'] = Field(default=None)
    "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender)."
    documentation: Optional_['markdown'] = Field(default=None)
    "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner."
    supportedMessage: Sequence_['CapabilityStatementMessagingSupportedMessage'] = Field(default_factory=list)
    'References to message definitions for messages this system can send or receive.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatementMessagingSupportedMessage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """References to message definitions for messages this system can send or receive."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    mode: 'code' = Field(default=...)
    'The mode of this event declaration - whether application is sender or receiver.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: 'canonical' = Field(default=...)
    'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatementMessagingEndpoint(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An endpoint (network accessible address) to which messages and/or replies are to be sent."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    address: 'url' = Field(default=...)
    'The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier.'
    protocol: 'Coding' = Field(default=...)
    'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatementDocument(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A document definition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    mode: 'code' = Field(default=...)
    'Mode of this document declaration - whether an application is a producer or consumer.'
    profile: 'canonical' = Field(default=...)
    'A profile on the document Bundle that constrains which resources are present, and their contents.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    documentation: Optional_['markdown'] = Field(default=None)
    'A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatementSoftware(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'Name the software is known by.'
    version: Optional_['string'] = Field(default=None)
    'The version identifier for the software covered by this statement.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    releaseDate: Optional_['dateTime'] = Field(default=None)
    'Date this version of the software was released.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatementRest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A definition of the restful capabilities of the solution, if any."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    mode: 'code' = Field(default=...)
    'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.'
    security: Optional_['CapabilityStatementRestSecurity'] = Field(default=None)
    'Information about security implementation from an interface perspective - what a client needs to know.'
    resource: Sequence_['CapabilityStatementRestResource'] = Field(default_factory=list)
    'A specification of the restful capabilities of the solution for a specific resource type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Sequence_['CapabilityStatementRestResourceOperation'] = Field(default_factory=list)
    'Definition of an operation or a named query together with its parameters and their meaning and type.'
    interaction: Sequence_['CapabilityStatementRestInteraction'] = Field(default_factory=list)
    'A specification of restful operations supported by the system.'
    searchParam: Sequence_['CapabilityStatementRestResourceSearchParam'] = Field(default_factory=list)
    'Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation. This is only for searches executed against the system-level endpoint.'
    compartment: Sequence_['canonical'] = Field(default_factory=list)
    'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .'
    documentation: Optional_['markdown'] = Field(default=None)
    "Information about the system's restful capabilities that apply across all applications, such as security."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatementRestInteraction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A specification of restful operations supported by the system."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    documentation: Optional_['markdown'] = Field(default=None)
    'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'A coded identifier of the operation, supported by the system.'


class CapabilityStatementRestResource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A specification of the restful capabilities of the solution for a specific resource type."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'A type of resource exposed via the restful interface.'
    profile: Optional_['canonical'] = Field(default=None)
    'A system-wide profile that is applied across *all* instances of the resource supported by the system. For example, if declared on Observation, this profile is the "superset" of capabilities for laboratory *and* vitals *and* other domains. See further discussion in [Using Profiles](profiling.html#profile-uses).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Sequence_['CapabilityStatementRestResourceOperation'] = Field(default_factory=list)
    'Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.'
    versioning: Optional_['code'] = Field(default=None)
    "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API."
    interaction: Sequence_['CapabilityStatementRestResourceInteraction'] = Field(default_factory=list)
    'Identifies a restful operation supported by the solution.'
    readHistory: Optional_['boolean'] = Field(default=None)
    'A flag for whether the server is able to return past versions as part of the vRead operation.'
    searchParam: Sequence_['CapabilityStatementRestResourceSearchParam'] = Field(default_factory=list)
    'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.'
    updateCreate: Optional_['boolean'] = Field(default=None)
    'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.'
    documentation: Optional_['markdown'] = Field(default=None)
    'Additional information about the resource type used by the system.'
    searchInclude: Sequence_['string'] = Field(default_factory=list)
    'A list of _include values supported by the server.'
    conditionalRead: Optional_['code'] = Field(default=None)
    'A code that indicates how the server supports conditional read.'
    referencePolicy: Sequence_['code'] = Field(default_factory=list)
    'A set of flags that defines how references are supported.'
    supportedProfile: Sequence_['canonical'] = Field(default_factory=list)
    'A list of profiles representing different use cases the system hosts/produces. A supported profile is a statement about the functionality of the data and services provided by the server (or the client) for supported use cases. For example, a system can define and declare multiple Observation profiles for laboratory observations, vital sign observations, etc. By declaring supported profiles, systems provide a way to determine whether individual resources are conformant. See further discussion in [Using Profiles](profiling.html#profile-uses).'
    conditionalPatch: Optional_['boolean'] = Field(default=None)
    'A flag that indicates that the server supports conditional patch.'
    searchRevInclude: Sequence_['string'] = Field(default_factory=list)
    'A list of _revinclude (reverse include) values supported by the server.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    conditionalCreate: Optional_['boolean'] = Field(default=None)
    'A flag that indicates that the server supports conditional create.'
    conditionalUpdate: Optional_['boolean'] = Field(default=None)
    'A flag that indicates that the server supports conditional update.'
    conditionalDelete: Optional_['code'] = Field(default=None)
    'A code that indicates how the server supports conditional delete.'


class CapabilityStatementRestResourceSearchParam(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    "The label used for the search parameter in this particular system's API - i.e. the 'name' portion of the name-value pair that will appear as part of the search URL.  This SHOULD be the same as the SearchParameter.code of the defining SearchParameter.  However, it can sometimes differ if necessary to disambiguate when a server supports multiple SearchParameters that happen to share the same code."
    type: 'code' = Field(default=...)
    'The type of value a search parameter refers to, and how the content is interpreted.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: Optional_['canonical'] = Field(default=None)
    'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.'
    documentation: Optional_['markdown'] = Field(default=None)
    'This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatementRestResourceInteraction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies a restful operation supported by the solution."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    documentation: Optional_['markdown'] = Field(default=None)
    "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'Coded identifier of the operation, supported by the system resource.'


class CapabilityStatementRestResourceOperation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'The name of the operation or query. For an operation, this name is prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called. This SHOULD be the same as the OperationDefinition.code of the defining OperationDefinition.  However, it can sometimes differ if necessary to disambiguate when a server supports multiple OperationDefinition that happen to share the same code.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: 'canonical' = Field(default=...)
    "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported."
    documentation: Optional_['markdown'] = Field(default=None)
    'Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatementRestSecurity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about security implementation from an interface perspective - what a client needs to know."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    cors: Optional_['boolean'] = Field(default=None)
    'Server adds CORS headers when responding to requests - this enables Javascript applications to use the server.'
    service: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Types of security services that are supported/required by the system.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'General description of how security works.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CapabilityStatement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation."""
    resourceType: Literal_['CapabilityStatement'] = Field(default=...)
    'A statement of system capabilities'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: 'dateTime' = Field(default=...)
    'The date  (and optionally time) when the capability statement was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.'
    kind: 'code' = Field(default=...)
    'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).'
    rest: Sequence_['CapabilityStatementRest'] = Field(default_factory=list)
    'A definition of the restful capabilities of the solution, if any.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the capability statement.'
    status: 'code' = Field(default=...)
    'The status of this capability statement. Enables tracking the life-cycle of the content.'
    format: Sequence_['code'] = Field(default=...)
    'A list of the formats supported by this implementation using their content types.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this capability statement is needed and why it has been designed as it has.'
    imports: Sequence_['canonical'] = Field(default_factory=list)
    'Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    software: Optional_['CapabilityStatementSoftware'] = Field(default=None)
    'Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.'
    document: Sequence_['CapabilityStatementDocument'] = Field(default_factory=list)
    'A document definition.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the capability statement.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.'
    messaging: Sequence_['CapabilityStatementMessaging'] = Field(default_factory=list)
    'A description of the messaging capabilities of the solution.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this CapabilityStatement when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate capability statement instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP."
    fhirVersion: 'code' = Field(default=...)
    'The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value.'
    patchFormat: Sequence_['code'] = Field(default_factory=list)
    'A list of the patch formats supported by this implementation using their content types.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the capability statement is intended to be used.'
    instantiates: Sequence_['canonical'] = Field(default_factory=list)
    'Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    implementation: Optional_['CapabilityStatementImplementation'] = Field(default=None)
    'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.'
    acceptLanguage: Sequence_['code'] = Field(default_factory=list)
    'A list of the languages supported by this implementation that are usefully supported in the ```Accept-Language``` header.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    implementationGuide: Sequence_['canonical'] = Field(default_factory=list)
    'A list of implementation guides that the server does (or should) support in their entirety.'


class CarePlanActivity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    progress: Sequence_['Annotation'] = Field(default_factory=list)
    'Notes about the adherence/status/progress of the activity.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    performedActivity: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Identifies the activity that was performed. For example, an activity could be patient education, exercise, or a medication administration. The reference to an "event" resource, such as Procedure or Encounter or Observation, represents the activity that was performed. The requested activity can be conveyed using the CarePlan.activity.plannedActivityReference (a reference to a “request” resource).'
    plannedActivityReference: Optional_['Reference'] = Field(default=None)
    'The details of the proposed activity represented in a specific resource.'


class CarePlan(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."""
    resourceType: Literal_['CarePlan'] = Field(default=...)
    'Healthcare plan for patient or group'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    goal: Sequence_['Reference'] = Field(default_factory=list)
    'Describes the intended objective(s) of carrying out the care plan.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'General notes about the care plan not covered elsewhere.'
    title: Optional_['string'] = Field(default=None)
    'Human-friendly name for the care plan.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger care plan of which this particular care plan is a component or step.'
    status: 'code' = Field(default=...)
    'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.'
    intent: 'code' = Field(default=...)
    'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.'
    period: Optional_['Period'] = Field(default=None)
    'Indicates when the plan did (or is intended to) come into effect and end.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A higher-level request resource (i.e. a plan, proposal or order) that is fulfilled in whole or in part by this care plan.'
    subject: 'Reference' = Field(default=...)
    'Identifies the patient or group whose intended care is described by the plan.'
    created: Optional_['dateTime'] = Field(default=None)
    'Represents when this particular CarePlan record was created in the system, which is often a system-generated date.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    replaces: Sequence_['Reference'] = Field(default_factory=list)
    'Completed or terminated care plan whose function is taken by this new care plan.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies what "kind" of plan this is to support differentiation between multiple co-existing plans; e.g. "Home health", "psychiatric", "asthma", "disease management", "wellness plan", etc.'
    careTeam: Sequence_['Reference'] = Field(default_factory=list)
    'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.'
    activity: Sequence_['CarePlanActivity'] = Field(default_factory=list)
    'Identifies an action that has occurred or is a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring that has occurred, education etc.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.'
    custodian: Optional_['Reference'] = Field(default=None)
    'When populated, the custodian is responsible for the care plan. The care plan is attributed to the custodian.'
    addresses: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    description: Optional_['string'] = Field(default=None)
    'A description of the scope and nature of the plan.'
    contributor: Sequence_['Reference'] = Field(default_factory=list)
    'Identifies the individual(s), organization or device who provided the contents of the care plan.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    supportingInfo: Sequence_['Reference'] = Field(default_factory=list)
    "Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc."
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.'


class CareTeamParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies all people and organizations who are expected to be involved in the care team."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates specific responsibility of an individual within the care team, such as "Primary care physician", "Trained social worker counselor", "Caregiver", etc.'
    member: Optional_['Reference'] = Field(default=None)
    'The specific person or organization who is participating/expected to participate in the care team.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    onBehalfOf: Optional_['Reference'] = Field(default=None)
    'The organization of the practitioner.'
    coveragePeriod: Optional_['Period'] = Field(default=None)
    'When the member is generally available within this care team.'
    coverageTiming: Optional_['Timing'] = Field(default=None)
    'When the member is generally available within this care team.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CareTeam(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care."""
    resourceType: Literal_['CareTeam'] = Field(default=...)
    'Planned participants in the coordination and delivery of care'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the CareTeam.'
    status: Optional_['code'] = Field(default=None)
    'Indicates the current state of the care team.'
    period: Optional_['Period'] = Field(default=None)
    'Indicates when the team did (or is intended to) come into effect and end.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Describes why the care team exists.'
    subject: Optional_['Reference'] = Field(default=None)
    'Identifies the patient or group whose intended care is handled by the team.'
    telecom: Sequence_['ContactPoint'] = Field(default_factory=list)
    'A central contact detail for the care team (that applies to all members).'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    participant: Sequence_['CareTeamParticipant'] = Field(default_factory=list)
    'Identifies all people and organizations who are expected to be involved in the care team.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    managingOrganization: Sequence_['Reference'] = Field(default_factory=list)
    'The organization responsible for the care team.'


class ChargeItemPerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what performed or participated in the charged service."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'The device, practitioner, etc. who performed or participated in the service.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ChargeItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation."""
    resourceType: Literal_['ChargeItem'] = Field(default=...)
    'Item containing charge code(s) associated with the provision of healthcare provider products'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the event by the performer, subject or other participants.'
    status: 'code' = Field(default=...)
    'The current state of the ChargeItem.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'ChargeItems can be grouped to larger ChargeItems covering the whole set.'
    reason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Describes why the event occurred in coded or textual form.'
    subject: 'Reference' = Field(default=...)
    'The individual or set of individuals the action is being or was performed on.'
    enterer: Optional_['Reference'] = Field(default=None)
    'The device, practitioner, etc. who entered the charge item.'
    service: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Indicated the rendered service that caused this charge.'
    product: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Identifies the device, food, drug or other product being charged either by type code or reference to an instance.'
    account: Sequence_['Reference'] = Field(default_factory=list)
    'Account into which this ChargeItems belongs.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'Quantity of which the charge item has been serviced.'
    bodysite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The anatomical location where the related service has been applied.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'This ChargeItem has the details of how the associated Encounter should be billed or otherwise be handled by finance systems.'
    performer: Sequence_['ChargeItemPerformer'] = Field(default_factory=list)
    'Indicates who or what performed or participated in the charged service.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers assigned to this event performer or other systems.'
    costCenter: Optional_['Reference'] = Field(default=None)
    'The financial cost center permits the tracking of charge attribution.'
    enteredDate: Optional_['dateTime'] = Field(default=None)
    'Date the charge item was entered.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    definitionUri: Sequence_['uri'] = Field(default_factory=list)
    'References the (external) source of pricing information, rules of application for the code this ChargeItem uses.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'Date/time(s) or duration when the charged service was applied.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'Date/time(s) or duration when the charged service was applied.'
    occurrenceTiming: Optional_['Timing'] = Field(default=None)
    'Date/time(s) or duration when the charged service was applied.'
    overrideReason: Optional_['CodeableConcept'] = Field(default=None)
    'If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    unitPriceComponent: Optional_['MonetaryComponent'] = Field(default=None)
    'The unit price of the chargable item.'
    definitionCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'References the source of pricing information, rules of application for the code this ChargeItem uses.'
    totalPriceComponent: Optional_['MonetaryComponent'] = Field(default=None)
    'The total price for the chargable item, accounting for the quantity.'
    supportingInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Further information supporting this charge.'
    performingOrganization: Optional_['Reference'] = Field(default=None)
    'The organization performing the service.'
    requestingOrganization: Optional_['Reference'] = Field(default=None)
    'The organization requesting the service.'
    code: 'CodeableConcept' = Field(default=...)
    'A code that identifies the charge, like a billing code.'


class ChargeItemDefinitionPropertyGroup(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    applicability: Sequence_['ChargeItemDefinitionApplicability'] = Field(default_factory=list)
    'Expressions that describe applicability criteria for the priceComponent.'
    priceComponent: Sequence_['MonetaryComponent'] = Field(default_factory=list)
    'The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ChargeItemDefinitionApplicability(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Expressions that describe applicability criteria for the billing code."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Optional_['Expression'] = Field(default=None)
    'An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context environment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the charge item definition content was or is planned to be in active use.'
    relatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'Reference to / quotation of the external source of the group of properties.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ChargeItemDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system."""
    resourceType: Literal_['ChargeItemDefinition'] = Field(default=...)
    'Definition of properties and rules about how the price and the applicability of a ChargeItem can be determined'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the ChargeItemDefinition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the charge item definition.'
    partOf: Sequence_['canonical'] = Field(default_factory=list)
    'A larger definition of which this particular definition is a component or step.'
    status: 'code' = Field(default=...)
    'The current state of the ChargeItemDefinition.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this charge item definition is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    replaces: Sequence_['canonical'] = Field(default_factory=list)
    'As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.'
    instance: Sequence_['Reference'] = Field(default_factory=list)
    'The defined billing details in this resource pertain to the given product instance(s).'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the charge item definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate charge item definition instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the charge item definition from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the charge item definition is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    applicability: Sequence_['ChargeItemDefinitionApplicability'] = Field(default_factory=list)
    'Expressions that describe applicability criteria for the billing code.'
    propertyGroup: Sequence_['ChargeItemDefinitionPropertyGroup'] = Field(default_factory=list)
    'Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.'
    derivedFromUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the charge item definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The defined billing details in this resource pertain to the given billing code.'


class CitationClassification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The assignment to an organizing scheme."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of classifier (e.g. publication type, keyword).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    classifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The specific classification value.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifact(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The article or artifact being described."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    part: Optional_['CitationCitedArtifactPart'] = Field(default=None)
    'The component of the article or artifact.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Any additional information or content for the article or artifact.'
    title: Sequence_['CitationCitedArtifactTitle'] = Field(default_factory=list)
    'The title details of the article or artifact.'
    version: Optional_['CitationCitedArtifactVersion'] = Field(default=None)
    'The defined version of the cited artifact.'
    abstract: Sequence_['CitationCitedArtifactAbstract'] = Field(default_factory=list)
    'The abstract may be used to convey article-contained abstracts, externally-created abstracts, or other descriptive summaries.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    relatesTo: Sequence_['CitationCitedArtifactRelatesTo'] = Field(default_factory=list)
    'The artifact related to the cited artifact.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify the cited artifact when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    statusDate: Sequence_['CitationCitedArtifactStatusDate'] = Field(default_factory=list)
    'An effective date or period, historical or future, actual or expected, for a status of the cited artifact.'
    webLocation: Sequence_['CitationCitedArtifactWebLocation'] = Field(default_factory=list)
    'Used for any URL for the article or artifact cited.'
    dateAccessed: Optional_['dateTime'] = Field(default=None)
    'When the cited artifact was accessed.'
    currentState: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The status of the cited artifact.'
    classification: Sequence_['CitationCitedArtifactClassification'] = Field(default_factory=list)
    'The assignment to an organizing scheme.'
    publicationForm: Sequence_['CitationCitedArtifactPublicationForm'] = Field(default_factory=list)
    'If multiple, used to represent alternative forms of the article that are not separate citations.'
    contributorship: Optional_['CitationCitedArtifactContributorship'] = Field(default=None)
    'This element is used to list authors and other contributors, their contact information, specific contributions, and summary statements.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    relatedIdentifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify things closely related to the cited artifact.'


class CitationCitedArtifactContributorship(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This element is used to list authors and other contributors, their contact information, specific contributions, and summary statements."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    entry: Sequence_['CitationCitedArtifactContributorshipEntry'] = Field(default_factory=list)
    'An individual entity named as a contributor, for example in the author list or contributor list.'
    summary: Sequence_['CitationCitedArtifactContributorshipSummary'] = Field(default_factory=list)
    'Used to record a display of the author/contributor list without separate data element for each list member.'
    complete: Optional_['boolean'] = Field(default=None)
    'Indicates if the list includes all authors and/or contributors.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifactContributorshipSummary(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Used to record a display of the author/contributor list without separate data element for each list member."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Used most commonly to express an author list or a contributorship statement.'
    style: Optional_['CodeableConcept'] = Field(default=None)
    'The format for the display string, such as author last name with first letter capitalized followed by forename initials.'
    value: 'markdown' = Field(default=...)
    'The display string for the author list, contributor list, or contributorship statement.'
    source: Optional_['CodeableConcept'] = Field(default=None)
    'Used to code the producer or rule for creating the display string.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifactContributorshipEntry(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An individual entity named as a contributor, for example in the author list or contributor list."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'The role of the contributor (e.g. author, editor, reviewer, funder).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    contributor: 'Reference' = Field(default=...)
    'The identity of the individual contributor.'
    affiliation: Sequence_['Reference'] = Field(default_factory=list)
    'Organization affiliated with the contributor.'
    rankingOrder: Optional_['positiveInt'] = Field(default=None)
    'Provides a numerical ranking to represent the degree of contributorship relative to other contributors, such as 1 for first author and 2 for second author.'
    forenameInitials: Optional_['string'] = Field(default=None)
    'For citation styles that use initials.'
    contributionType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'This element identifies the specific nature of an individual’s contribution with respect to the cited work.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    contributionInstance: Sequence_['CitationCitedArtifactContributorshipEntryContributionInstance'] = Field(default_factory=list)
    'Contributions with accounting for time or number.'
    correspondingContact: Optional_['boolean'] = Field(default=None)
    'Whether the contributor is the corresponding contributor for the role.'


class CitationCitedArtifactContributorshipEntryContributionInstance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Contributions with accounting for time or number."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The specific contribution.'
    time: Optional_['dateTime'] = Field(default=None)
    'The time that the contribution was made.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifactPublicationForm(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """If multiple, used to represent alternative forms of the article that are not separate citations."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    issue: Optional_['string'] = Field(default=None)
    'Issue, part or supplement of journal or other collection in which the article is published.'
    volume: Optional_['string'] = Field(default=None)
    'Volume number of journal or other collection in which the article is published.'
    language: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The language or languages in which this form of the article is published.'
    lastPage: Optional_['string'] = Field(default=None)
    'Used for isolated representation of last page.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    firstPage: Optional_['string'] = Field(default=None)
    'Used for isolated representation of first page.'
    pageCount: Optional_['string'] = Field(default=None)
    'Actual or approximate number of pages or screens. Distinct from reporting the page numbers.'
    copyright: Optional_['markdown'] = Field(default=None)
    'Copyright notice for the full article or artifact.'
    pageString: Optional_['string'] = Field(default=None)
    'Used for full display of pagination.'
    publishedIn: Optional_['CitationCitedArtifactPublicationFormPublishedIn'] = Field(default=None)
    'The collection the cited article or artifact is published in.'
    citedMedium: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the form of the medium cited. Common codes are "Internet" or "Print". The CitedMedium value set has 6 codes. The codes internet, print, and offline-digital-storage are the common codes for a typical publication form, though internet and print are more common for study citations. Three additional codes (each appending one of the primary codes with "-without-issue" are used for situations when a study is published both within an issue (of a periodical release as commonly done for journals) AND is published separately from the issue (as commonly done with early online publication), to represent specific identification of the publication form not associated with the issue.'
    articleDate: Optional_['dateTime'] = Field(default=None)
    'The date the article was added to the database, or the date the article was released.'
    accessionNumber: Optional_['string'] = Field(default=None)
    'Entry number or identifier for inclusion in a database.'
    lastRevisionDate: Optional_['dateTime'] = Field(default=None)
    'The date the article was last revised or updated in the database.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    publicationDateText: Optional_['string'] = Field(default=None)
    'Text representation of the date on which the issue of the cited artifact was published.'
    publicationDateSeason: Optional_['string'] = Field(default=None)
    'Spring, Summer, Fall/Autumn, Winter.'


class CitationCitedArtifactPublicationFormPublishedIn(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The collection the cited article or artifact is published in."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Kind of container (e.g. Periodical, database, or book).'
    title: Optional_['string'] = Field(default=None)
    'Name of the database or title of the book or journal.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['Reference'] = Field(default=None)
    'Name of or resource describing the publisher.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Journal identifiers include ISSN, ISO Abbreviation and NLMuniqueID; Book identifiers include ISBN.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    publisherLocation: Optional_['string'] = Field(default=None)
    'Geographic location of the publisher.'


class CitationCitedArtifactClassification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The assignment to an organizing scheme."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of classifier (e.g. publication type, keyword).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    classifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The specific classification value.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    artifactAssessment: Sequence_['Reference'] = Field(default_factory=list)
    'Complex or externally created classification.'


class CitationCitedArtifactWebLocation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Used for any URL for the article or artifact cited."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    url: Optional_['uri'] = Field(default=None)
    'The specific URL.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    classifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A characterization of the object expected at the web location.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifactStatusDate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An effective date or period, historical or future, actual or expected, for a status of the cited artifact."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actual: Optional_['boolean'] = Field(default=None)
    'Either occurred or expected.'
    period: 'Period' = Field(default=...)
    'When the status started and/or ended.'
    activity: 'CodeableConcept' = Field(default=...)
    'A definition of the status associated with a date or period.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifactRelatesTo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The artifact related to the cited artifact."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of relationship to the related artifact.'
    label: Optional_['string'] = Field(default=None)
    'A short label that can be used to reference the related artifact from elsewhere in the containing artifact, such as a footnote index.'
    display: Optional_['string'] = Field(default=None)
    'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.'
    citation: Optional_['markdown'] = Field(default=None)
    'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.'
    document: Optional_['Attachment'] = Field(default=None)
    'The document being referenced, represented as an attachment. Do not use this element if using the resource element to provide the canonical to the related artifact.'
    resource: Optional_['canonical'] = Field(default=None)
    'The related artifact, such as a library, value set, profile, or other knowledge resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    classifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Provides additional classifiers of the related artifact.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    resourceReference: Optional_['Reference'] = Field(default=None)
    'The related artifact, if the artifact is not a canonical resource, or a resource reference to a canonical resource.'


class CitationCitedArtifactAbstract(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The abstract may be used to convey article-contained abstracts, externally-created abstracts, or other descriptive summaries."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Used to express the reason for or classification of the abstract.'
    text: 'markdown' = Field(default=...)
    'Abstract content.'
    language: Optional_['CodeableConcept'] = Field(default=None)
    'Used to express the specific language of the abstract.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    copyright: Optional_['markdown'] = Field(default=None)
    'Copyright notice for the abstract.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifactVersion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The defined version of the cited artifact."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    value: 'string' = Field(default=...)
    'The version number or other version identifier.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    baseCitation: Optional_['Reference'] = Field(default=None)
    'Citation for the main version of the cited artifact.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifactTitle(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The title details of the article or artifact."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Used to express the reason for or classification of the title.'
    text: 'markdown' = Field(default=...)
    'The title of the article or artifact.'
    language: Optional_['CodeableConcept'] = Field(default=None)
    'Used to express the specific language of the title.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationCitedArtifactPart(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The component of the article or artifact."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of component.'
    value: Optional_['string'] = Field(default=None)
    'The specification of the component.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    baseCitation: Optional_['Reference'] = Field(default=None)
    'The citation for the full article or artifact.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationStatusDate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The state or status of the citation record paired with an effective date or period for that state."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actual: Optional_['boolean'] = Field(default=None)
    'Whether the status date is actual (has occurred) or expected (estimated or anticipated).'
    period: 'Period' = Field(default=...)
    'When the status started and/or ended.'
    activity: 'CodeableConcept' = Field(default=...)
    'The state or status of the citation record (that will be paired with the period).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CitationSummary(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A human-readable display of key concepts to represent the citation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    text: 'markdown' = Field(default=...)
    'The human-readable display of the citation summary.'
    style: Optional_['CodeableConcept'] = Field(default=None)
    'Format for display of the citation summary.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Citation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources."""
    resourceType: Literal_['Citation'] = Field(default=...)
    'A description of identification, location, or contributorship of a publication (article or artifact)'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this citation record when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the citation record. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Used for general notes and annotations not coded elsewhere.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the citation record.'
    status: 'code' = Field(default=...)
    'The status of this summary. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Who authored or created the citation record.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Who edited or revised the citation record.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the citation record when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the citation record author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this citation is needed and why it has been designed as it has.'
    summary: Sequence_['CitationSummary'] = Field(default_factory=list)
    'A human-readable display of key concepts to represent the citation.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Who reviewed the citation record.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Who endorsed the citation record.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual that published the citation record.'
    copyright: Optional_['markdown'] = Field(default=None)
    'Use and/or publishing restrictions for the citation record, not for the cited artifact.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this citation record when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate citation record instances.'
    statusDate: Sequence_['CitationStatusDate'] = Field(default_factory=list)
    'The state or status of the citation record paired with an effective date or period for that state.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the citation from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this citation record is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the citation record is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    currentState: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The status of the citation record.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    citedArtifact: Optional_['CitationCitedArtifact'] = Field(default=None)
    'The article or artifact being described.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    classification: Sequence_['CitationClassification'] = Field(default_factory=list)
    'The assignment to an organizing scheme.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the citation record content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Artifact related to the citation record.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the citation record was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the citation record changes.'


class ClaimSupportingInfo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.'
    reason: Optional_['CodeableConcept'] = Field(default=None)
    'Provides the reason in the situation where a reason code is required in addition to the content.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify supporting information entries.'
    category: 'CodeableConcept' = Field(default=...)
    'The general class of the information supplied: information; exception; accident, employment; onset, etc.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueString: Optional_['string'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    timingDate: Optional_['date'] = Field(default=None)
    'The date when or period to which this information refers.'
    timingPeriod: Optional_['Period'] = Field(default=None)
    'The date when or period to which this information refers.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimInsurance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Financial instruments for reimbursement for the health care products and services specified on the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    focal: 'boolean' = Field(default=...)
    'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.'
    coverage: 'Reference' = Field(default=...)
    "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'The business identifier to be used when the claim is sent for adjudication against this insurance policy.'
    preAuthRef: Sequence_['string'] = Field(default_factory=list)
    'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.'
    claimResponse: Optional_['Reference'] = Field(default=None)
    'The result of the adjudication of the line items for the Coverage specified in this insurance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    businessArrangement: Optional_['string'] = Field(default=None)
    'A business agreement number established between the provider and the insurer for special business processing purposes.'


class ClaimProcedure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Procedures performed on the patient relevant to the billing items with the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    udi: Sequence_['Reference'] = Field(default_factory=list)
    'Unique Device Identifiers associated with this line item.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'When the condition was observed or the relative ranking.'
    date: Optional_['dateTime'] = Field(default=None)
    'Date and optionally time the procedure was performed.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify procedure entries.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    procedureCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The code or reference to a Procedure resource which identifies the clinical intervention performed.'
    procedureReference: Optional_['Reference'] = Field(default=None)
    'The code or reference to a Procedure resource which identifies the clinical intervention performed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimDiagnosis(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about diagnoses relevant to the claim items."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'When the condition was observed or the relative ranking.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify diagnosis entries.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    onAdmission: Optional_['CodeableConcept'] = Field(default=None)
    'Indication of whether the diagnosis was present on admission to a facility.'
    diagnosisCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The nature of illness or problem in a coded form or as a reference to an external defined Condition.'
    diagnosisReference: Optional_['Reference'] = Field(default=None)
    'The nature of illness or problem in a coded form or as a reference to an external defined Condition.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimAccident(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details of an accident which resulted in injuries which required the products and services listed in the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    locationAddress: Optional_['Address'] = Field(default=None)
    'The physical location of the accident event.'
    locationReference: Optional_['Reference'] = Field(default=None)
    'The physical location of the accident event.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    date: 'date' = Field(default=...)
    'Date of an accident event  related to the products and services contained in the claim.'


class ClaimCareTeam(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The members of the team who provided the products and services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify care team entries.'
    provider: 'Reference' = Field(default=...)
    'Member of the team who provided the product or service.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specialty: Optional_['CodeableConcept'] = Field(default=None)
    'The specialization of the practitioner or provider which is applicable for this service.'
    responsible: Optional_['boolean'] = Field(default=None)
    'The party who is billing and/or responsible for the claimed products or services.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimRelated(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Other claims which are related to this claim such as prior submissions or claims for related services or for the same event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    claim: Optional_['Reference'] = Field(default=None)
    'Reference to a related claim.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['Identifier'] = Field(default=None)
    'An alternate organizational reference to the case or file to which this particular claim pertains.'
    relationship: Optional_['CodeableConcept'] = Field(default=None)
    'A code to convey how the claims are related.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information code for an event with a corresponding date or period."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A coded event such as when a service is expected or a card printed.'
    whenDateTime: Optional_['dateTime'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    whenPeriod: Optional_['Period'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimPayee(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The party to be reimbursed for cost of the products and services according to the terms of the policy."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Type of Party to be reimbursed: subscriber, provider, other.'
    party: Optional_['Reference'] = Field(default=None)
    'Reference to the individual or organization to whom any payment will be made.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A claim line. Either a simple  product or service or a 'group' of details which can each be a simple items or groups of sub-details."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.'
    udi: Sequence_['Reference'] = Field(default_factory=list)
    'Unique Device Identifiers associated with this line item.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    detail: Sequence_['ClaimItemDetail'] = Field(default_factory=list)
    "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items."
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    request: Sequence_['Reference'] = Field(default_factory=list)
    'Request or Referral for Goods or Service to be rendered.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify item entries.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    bodySite: Sequence_['ClaimItemBodySite'] = Field(default_factory=list)
    'Physical location where the service is performed or applies.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    encounter: Sequence_['Reference'] = Field(default_factory=list)
    'Healthcare encounters related to this claim.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    programCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the program under which this may be recovered.'
    servicedDate: Optional_['date'] = Field(default=None)
    'The date or dates when the service or product was supplied, performed or completed.'
    servicedPeriod: Optional_['Period'] = Field(default=None)
    'The date or dates when the service or product was supplied, performed or completed.'
    locationCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Where the product or service was provided.'
    locationAddress: Optional_['Address'] = Field(default=None)
    'Where the product or service was provided.'
    locationReference: Optional_['Reference'] = Field(default=None)
    'Where the product or service was provided.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    careTeamSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'CareTeam members related to this service or product.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    diagnosisSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Diagnosis applicable for this service or product.'
    procedureSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Procedures applicable for this service or product.'
    informationSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Exceptions, special conditions and supporting information applicable for this service or product.'
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ClaimItemBodySite(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Physical location where the service is performed or applies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    site: Sequence_['CodeableReference'] = Field(default=...)
    'Physical service site on the patient (limb, tooth, etc.).'
    subSite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A region or surface of the bodySite, e.g. limb region or tooth surface(s).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimItemDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.'
    udi: Sequence_['Reference'] = Field(default_factory=list)
    'Unique Device Identifiers associated with this line item.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify item entries.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    subDetail: Sequence_['ClaimItemDetailSubDetail'] = Field(default_factory=list)
    "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items."
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    programCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the program under which this may be recovered.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ClaimItemDetailSubDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for line item.detail.subDetail. Net = unit price * quantity * factor.'
    udi: Sequence_['Reference'] = Field(default_factory=list)
    'Unique Device Identifiers associated with this line item.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify item entries.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    programCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the program under which this may be recovered.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class Claim(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement."""
    resourceType: Literal_['Claim'] = Field(default=...)
    'Claim, Pre-determination or Pre-authorization'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    use: 'code' = Field(default=...)
    "A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided."
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'CodeableConcept' = Field(default=...)
    'The category of claim, e.g. oral, pharmacy, vision, institutional, professional.'
    item: Sequence_['ClaimItem'] = Field(default_factory=list)
    "A claim line. Either a simple  product or service or a 'group' of details which can each be a simple items or groups of sub-details."
    payee: Optional_['ClaimPayee'] = Field(default=None)
    'The party to be reimbursed for cost of the products and services according to the terms of the policy.'
    event: Sequence_['ClaimEvent'] = Field(default_factory=list)
    'Information code for an event with a corresponding date or period.'
    total: Optional_['Money'] = Field(default=None)
    'The total value of the all the items in the claim.'
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    subType: Optional_['CodeableConcept'] = Field(default=None)
    'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.'
    patient: 'Reference' = Field(default=...)
    'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.'
    created: 'dateTime' = Field(default=...)
    'The date this resource was created.'
    enterer: Optional_['Reference'] = Field(default=None)
    'Individual who created the claim, predetermination or preauthorization.'
    insurer: Optional_['Reference'] = Field(default=None)
    'The Insurer who is target of the request.'
    related: Sequence_['ClaimRelated'] = Field(default_factory=list)
    'Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    provider: Optional_['Reference'] = Field(default=None)
    'The provider which is responsible for the claim, predetermination or preauthorization.'
    priority: Optional_['CodeableConcept'] = Field(default=None)
    'The provider-required urgency of processing the request. Typical values include: stat, normal, deferred.'
    referral: Optional_['Reference'] = Field(default=None)
    'The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services.'
    facility: Optional_['Reference'] = Field(default=None)
    'Facility where the services were provided.'
    careTeam: Sequence_['ClaimCareTeam'] = Field(default_factory=list)
    'The members of the team who provided the products and services.'
    accident: Optional_['ClaimAccident'] = Field(default=None)
    'Details of an accident which resulted in injuries which required the products and services listed in the claim.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Sequence_['Reference'] = Field(default_factory=list)
    'Healthcare encounters related to this claim.'
    diagnosis: Sequence_['ClaimDiagnosis'] = Field(default_factory=list)
    'Information about diagnoses relevant to the claim items.'
    procedure: Sequence_['ClaimProcedure'] = Field(default_factory=list)
    'Procedures performed on the patient relevant to the billing items with the claim.'
    insurance: Sequence_['ClaimInsurance'] = Field(default_factory=list)
    'Financial instruments for reimbursement for the health care products and services specified on the claim.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this claim.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    fundsReserve: Optional_['CodeableConcept'] = Field(default=None)
    'A code to indicate whether and for whom funds are to be reserved for future claims.'
    prescription: Optional_['Reference'] = Field(default=None)
    "Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments."
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    billablePeriod: Optional_['Period'] = Field(default=None)
    'The period for which charges are being submitted.'
    supportingInfo: Sequence_['ClaimSupportingInfo'] = Field(default_factory=list)
    'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    originalPrescription: Optional_['Reference'] = Field(default=None)
    'Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.'
    diagnosisRelatedGroup: Optional_['CodeableConcept'] = Field(default=None)
    'A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.'


class ClaimResponseProcessNote(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A note that describes or explains adjudication results in a human readable form."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The business purpose of the note text.'
    text: 'string' = Field(default=...)
    'The explanation or description associated with the processing.'
    number: Optional_['positiveInt'] = Field(default=None)
    'A number to uniquely identify a note entry.'
    language: Optional_['CodeableConcept'] = Field(default=None)
    'A code to define the language used in the text of the note.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimResponseInsurance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Financial instruments for reimbursement for the health care products and services specified on the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    focal: 'boolean' = Field(default=...)
    'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.'
    coverage: 'Reference' = Field(default=...)
    "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    claimResponse: Optional_['Reference'] = Field(default=None)
    'The result of the adjudication of the line items for the Coverage specified in this insurance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    businessArrangement: Optional_['string'] = Field(default=None)
    'A business agreement number established between the provider and the insurer for special business processing purposes.'


class ClaimResponsePayment(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Payment details for the adjudication of the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Whether this represents partial or complete payment of the benefits payable.'
    amount: 'Money' = Field(default=...)
    'Benefits payable less any payment adjustment.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    adjustment: Optional_['Money'] = Field(default=None)
    "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication."
    identifier: Optional_['Identifier'] = Field(default=None)
    "Issuer's unique identifier for the payment instrument."
    adjustmentReason: Optional_['CodeableConcept'] = Field(default=None)
    'Reason for the payment adjustment.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    date: Optional_['date'] = Field(default=None)
    'Estimated date the payment will be issued or the actual issue date of payment.'


class ClaimResponseAddItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The first-tier service adjudications for payor added product or service lines."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    detail: Sequence_['ClaimResponseAddItemDetail'] = Field(default_factory=list)
    'The second-tier service adjudications for payor added services.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    request: Sequence_['Reference'] = Field(default_factory=list)
    'Request or Referral for Goods or Service to be rendered.'
    provider: Sequence_['Reference'] = Field(default_factory=list)
    'The providers who are authorized for the services rendered to the patient.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    bodySite: Sequence_['ClaimResponseAddItemBodySite'] = Field(default_factory=list)
    'Physical location where the service is performed or applies.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    programCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the program under which this may be recovered.'
    servicedDate: Optional_['date'] = Field(default=None)
    'The date or dates when the service or product was supplied, performed or completed.'
    servicedPeriod: Optional_['Period'] = Field(default=None)
    'The date or dates when the service or product was supplied, performed or completed.'
    locationCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Where the product or service was provided.'
    locationAddress: Optional_['Address'] = Field(default=None)
    'Where the product or service was provided.'
    locationReference: Optional_['Reference'] = Field(default=None)
    'Where the product or service was provided.'
    itemSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Claim items which this service line is intended to replace.'
    adjudication: Sequence_['ClaimResponseItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ClaimResponseItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    detailSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'The sequence number of the details within the claim item which this line is intended to replace.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    subdetailSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'The sequence number of the sub-details within the details within the claim item which this line is intended to replace.'
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ClaimResponseAddItemBodySite(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Physical location where the service is performed or applies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    site: Sequence_['CodeableReference'] = Field(default=...)
    'Physical service site on the patient (limb, tooth, etc.).'
    subSite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A region or surface of the bodySite, e.g. limb region or tooth surface(s).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimResponseAddItemDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The second-tier service adjudications for payor added services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    subDetail: Sequence_['ClaimResponseAddItemDetailSubDetail'] = Field(default_factory=list)
    'The third-tier service adjudications for payor added services.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    adjudication: Sequence_['ClaimResponseItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ClaimResponseItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ClaimResponseAddItemDetailSubDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The third-tier service adjudications for payor added services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    adjudication: Sequence_['ClaimResponseItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ClaimResponseItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ClaimResponseError(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Errors encountered during the processing of the adjudication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'An error code, from a specified code system, which details why the claim could not be adjudicated.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Sequence_['string'] = Field(default_factory=list)
    'A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.'
    itemSequence: Optional_['positiveInt'] = Field(default=None)
    'The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.'
    detailSequence: Optional_['positiveInt'] = Field(default=None)
    'The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    subDetailSequence: Optional_['positiveInt'] = Field(default=None)
    'The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.'


class ClaimResponseTotal(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Categorized monetary totals for the adjudication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    amount: 'Money' = Field(default=...)
    'Monetary total amount associated with the category.'
    category: 'CodeableConcept' = Field(default=...)
    'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimResponseEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information code for an event with a corresponding date or period."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A coded event such as when a service is expected or a card printed.'
    whenDateTime: Optional_['dateTime'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    whenPeriod: Optional_['Period'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimResponseItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    detail: Sequence_['ClaimResponseItemDetail'] = Field(default_factory=list)
    "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    itemSequence: 'positiveInt' = Field(default=...)
    'A number to uniquely reference the claim item entries.'
    adjudication: Sequence_['ClaimResponseItemAdjudication'] = Field(default_factory=list)
    'If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.'
    reviewOutcome: Optional_['ClaimResponseItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimResponseItemReviewOutcome(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The high-level results of the adjudication if adjudication has been performed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    reason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The reasons for the result of the claim, predetermination, or preauthorization adjudication.'
    decision: Optional_['CodeableConcept'] = Field(default=None)
    'The result of the claim, predetermination, or preauthorization adjudication.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preAuthRef: Optional_['string'] = Field(default=None)
    'Reference from the Insurer which is used in later communications which refers to this adjudication.'
    preAuthPeriod: Optional_['Period'] = Field(default=None)
    'The time frame during which this authorization is effective.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimResponseItemAdjudication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    reason: Optional_['CodeableConcept'] = Field(default=None)
    'A code supporting the understanding of the adjudication result and explaining variance from expected amount.'
    amount: Optional_['Money'] = Field(default=None)
    'Monetary amount associated with the category.'
    category: 'CodeableConcept' = Field(default=...)
    'A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'A non-monetary value associated with the category. Mutually exclusive to the amount element above.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimResponseItemDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    subDetail: Sequence_['ClaimResponseItemDetailSubDetail'] = Field(default_factory=list)
    'A sub-detail adjudication of a simple product or service.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    adjudication: Sequence_['ClaimResponseItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ClaimResponseItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    detailSequence: 'positiveInt' = Field(default=...)
    'A number to uniquely reference the claim detail entry.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClaimResponseItemDetailSubDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A sub-detail adjudication of a simple product or service."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    adjudication: Sequence_['ClaimResponseItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ClaimResponseItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    subDetailSequence: 'positiveInt' = Field(default=...)
    'A number to uniquely reference the claim sub-detail entry.'


class ClaimResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource provides the adjudication details from the processing of a Claim resource."""
    resourceType: Literal_['ClaimResponse'] = Field(default=...)
    'Response to a claim predetermination or preauthorization'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    use: 'code' = Field(default=...)
    "A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided."
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'CodeableConcept' = Field(default=...)
    'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.'
    item: Sequence_['ClaimResponseItem'] = Field(default_factory=list)
    "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details."
    form: Optional_['Attachment'] = Field(default=None)
    'The actual form, by reference or inclusion, for printing the content or an EOB.'
    event: Sequence_['ClaimResponseEvent'] = Field(default_factory=list)
    'Information code for an event with a corresponding date or period.'
    total: Sequence_['ClaimResponseTotal'] = Field(default_factory=list)
    'Categorized monetary totals for the adjudication.'
    error: Sequence_['ClaimResponseError'] = Field(default_factory=list)
    'Errors encountered during the processing of the adjudication.'
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    subType: Optional_['CodeableConcept'] = Field(default=None)
    'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.'
    patient: 'Reference' = Field(default=...)
    'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.'
    created: 'dateTime' = Field(default=...)
    'The date this resource was created.'
    insurer: Optional_['Reference'] = Field(default=None)
    'The party responsible for authorization, adjudication and reimbursement.'
    request: Optional_['Reference'] = Field(default=None)
    'Original request resource reference.'
    outcome: 'code' = Field(default=...)
    'The outcome of the claim, predetermination, or preauthorization processing.'
    addItem: Sequence_['ClaimResponseAddItem'] = Field(default_factory=list)
    'The first-tier service adjudications for payor added product or service lines.'
    payment: Optional_['ClaimResponsePayment'] = Field(default=None)
    'Payment details for the adjudication of the claim.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    decision: Optional_['CodeableConcept'] = Field(default=None)
    'The result of the claim, predetermination, or preauthorization adjudication.'
    formCode: Optional_['CodeableConcept'] = Field(default=None)
    'A code for the form to be used for printing the content.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requestor: Optional_['Reference'] = Field(default=None)
    'The provider which is responsible for the claim, predetermination or preauthorization.'
    payeeType: Optional_['CodeableConcept'] = Field(default=None)
    'Type of Party to be reimbursed: subscriber, provider, other.'
    encounter: Sequence_['Reference'] = Field(default_factory=list)
    'Healthcare encounters related to this claim.'
    insurance: Sequence_['ClaimResponseInsurance'] = Field(default_factory=list)
    'Financial instruments for reimbursement for the health care products and services specified on the claim.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this claim response.'
    preAuthRef: Optional_['string'] = Field(default=None)
    'Reference from the Insurer which is used in later communications which refers to this adjudication.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    disposition: Optional_['string'] = Field(default=None)
    'A human readable description of the status of the adjudication.'
    processNote: Sequence_['ClaimResponseProcessNote'] = Field(default_factory=list)
    'A note that describes or explains adjudication results in a human readable form.'
    adjudication: Sequence_['ClaimResponseItemAdjudication'] = Field(default_factory=list)
    'The adjudication results which are presented at the header level rather than at the line-item or add-item levels.'
    fundsReserve: Optional_['CodeableConcept'] = Field(default=None)
    'A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    preAuthPeriod: Optional_['Period'] = Field(default=None)
    'The time frame during which this authorization is effective.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    communicationRequest: Sequence_['Reference'] = Field(default_factory=list)
    'Request for additional supporting or authorizing information.'
    diagnosisRelatedGroup: Optional_['CodeableConcept'] = Field(default=None)
    'A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.'


class ClinicalImpressionFinding(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specific findings or diagnoses that were considered likely or relevant to ongoing treatment."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: Optional_['CodeableReference'] = Field(default=None)
    'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.'
    basis: Optional_['string'] = Field(default=None)
    'Which investigations support finding or diagnosis.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClinicalImpression(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score."""
    resourceType: Literal_['ClinicalImpression'] = Field(default=...)
    'A clinical assessment performed when planning treatments and management strategies for a patient'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    date: Optional_['dateTime'] = Field(default=None)
    'Indicates when the documentation of the assessment was complete.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.'
    status: 'code' = Field(default=...)
    'Identifies the workflow status of the assessment.'
    subject: 'Reference' = Field(default=...)
    'The patient or group of individuals assessed as part of this record.'
    problem: Sequence_['Reference'] = Field(default_factory=list)
    'A list of the relevant problems/conditions for a patient.'
    summary: Optional_['string'] = Field(default=None)
    'A text summary of the investigations and the diagnosis.'
    finding: Sequence_['ClinicalImpressionFinding'] = Field(default_factory=list)
    'Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    previous: Optional_['Reference'] = Field(default=None)
    "A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes."
    protocol: Sequence_['uri'] = Field(default_factory=list)
    'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.'
    performer: Optional_['Reference'] = Field(default=None)
    'The clinician performing the assessment.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    description: Optional_['string'] = Field(default=None)
    'A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.'
    statusReason: Optional_['CodeableConcept'] = Field(default=None)
    'Captures the reason for the current state of the ClinicalImpression.'
    effectiveDateTime: Optional_['dateTime'] = Field(default=None)
    'The point in time or period over which the subject was assessed.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The point in time or period over which the subject was assessed.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    changePattern: Optional_['CodeableConcept'] = Field(default=None)
    "Change in the status/pattern of a subject's condition since previously assessed, such as worsening, improving, or no change.  It is a subjective assessment of the direction of the change."
    supportingInfo: Sequence_['Reference'] = Field(default_factory=list)
    'Information supporting the clinical impression, which can contain investigation results.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    prognosisReference: Sequence_['Reference'] = Field(default_factory=list)
    'RiskAssessment expressing likely outcome.'
    prognosisCodeableConcept: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Estimate of likely outcome.'


class ClinicalUseDefinitionUndesirableEffect(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describe the possible undesirable effects (negative outcomes) from the use of the medicinal product as treatment."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    classification: Optional_['CodeableConcept'] = Field(default=None)
    'High level classification of the effect.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    frequencyOfOccurrence: Optional_['CodeableConcept'] = Field(default=None)
    'How often the effect is seen.'
    symptomConditionEffect: Optional_['CodeableReference'] = Field(default=None)
    'The situation in which the undesirable effect may manifest.'


class ClinicalUseDefinitionContraindication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifics for when this is a contraindication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    indication: Sequence_['Reference'] = Field(default_factory=list)
    'The indication which this is a contraidication for.'
    comorbidity: Sequence_['CodeableReference'] = Field(default_factory=list)
    'A comorbidity (concurrent condition) or coinfection.'
    otherTherapy: Sequence_['ClinicalUseDefinitionContraindicationOtherTherapy'] = Field(default_factory=list)
    'Information about the use of the medicinal product in relation to other therapies described as part of the contraindication.'
    diseaseStatus: Optional_['CodeableReference'] = Field(default=None)
    'The status of the disease or symptom for the contraindication, for example "chronic" or "metastatic".'
    applicability: Optional_['Expression'] = Field(default=None)
    'An expression that returns true or false, indicating whether the indication is applicable or not, after having applied its other elements.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    diseaseSymptomProcedure: Optional_['CodeableReference'] = Field(default=None)
    'The situation that is being documented as contraindicating against this item.'


class ClinicalUseDefinitionContraindicationOtherTherapy(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the use of the medicinal product in relation to other therapies described as part of the contraindication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    treatment: 'CodeableReference' = Field(default=...)
    'Reference to a specific medication (active substance, medicinal product or class of products, biological, food etc.) as part of an indication or contraindication.'
    relationshipType: 'CodeableConcept' = Field(default=...)
    'The type of relationship between the medicinal product indication or contraindication and another therapy.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClinicalUseDefinitionInteraction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifics for when this is an interaction."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.'
    effect: Optional_['CodeableReference'] = Field(default=None)
    'The effect of the interaction, for example "reduced gastric absorption of primary medication".'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    incidence: Optional_['CodeableConcept'] = Field(default=None)
    'The incidence of the interaction, e.g. theoretical, observed.'
    management: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Actions for managing the interaction.'
    interactant: Sequence_['ClinicalUseDefinitionInteractionInteractant'] = Field(default_factory=list)
    'The specific medication, product, food, substance etc. or laboratory test that interacts.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClinicalUseDefinitionInteractionInteractant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The specific medication, product, food, substance etc. or laboratory test that interacts."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    itemReference: Optional_['Reference'] = Field(default=None)
    'The specific medication, product, food, substance etc. or laboratory test that interacts.'
    itemCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The specific medication, product, food, substance etc. or laboratory test that interacts.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClinicalUseDefinitionIndication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifics for when this is an indication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comorbidity: Sequence_['CodeableReference'] = Field(default_factory=list)
    'A comorbidity (concurrent condition) or coinfection as part of the indication.'
    durationRange: Optional_['Range'] = Field(default=None)
    'Timing or duration information, that may be associated with use with the indicated condition e.g. Adult patients suffering from myocardial infarction (from a few days until less than 35 days), ischaemic stroke (from 7 days until less than 6 months).'
    durationString: Optional_['string'] = Field(default=None)
    'Timing or duration information, that may be associated with use with the indicated condition e.g. Adult patients suffering from myocardial infarction (from a few days until less than 35 days), ischaemic stroke (from 7 days until less than 6 months).'
    otherTherapy: Sequence_['ClinicalUseDefinitionContraindicationOtherTherapy'] = Field(default_factory=list)
    'Information about the use of the medicinal product in relation to other therapies described as part of the indication.'
    diseaseStatus: Optional_['CodeableReference'] = Field(default=None)
    'The status of the disease or symptom for the indication, for example "chronic" or "metastatic".'
    applicability: Optional_['Expression'] = Field(default=None)
    'An expression that returns true or false, indicating whether the indication is applicable or not, after having applied its other elements.'
    intendedEffect: Optional_['CodeableReference'] = Field(default=None)
    'The intended effect, aim or strategy to be achieved.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    undesirableEffect: Sequence_['Reference'] = Field(default_factory=list)
    'An unwanted side effect or negative outcome that may happen if you use the drug (or other subject of this resource) for this indication.'
    diseaseSymptomProcedure: Optional_['CodeableReference'] = Field(default=None)
    'The situation that is being documented as an indicaton for this item.'


class ClinicalUseDefinitionWarning(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A coded or unformatted textual definition of this warning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'A textual definition of this warning, with formatting.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ClinicalUseDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure."""
    resourceType: Literal_['ClinicalUseDefinition'] = Field(default=...)
    'A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'code' = Field(default=...)
    'indication | contraindication | interaction | undesirable-effect | warning.'
    status: Optional_['CodeableConcept'] = Field(default=None)
    'Whether this is a current issue or one that has been retired etc.'
    subject: Sequence_['Reference'] = Field(default_factory=list)
    'The medication, product, substance, device, procedure etc. for which this is an indication.'
    library: Sequence_['canonical'] = Field(default_factory=list)
    'Logic used by the clinical use definition.'
    warning: Optional_['ClinicalUseDefinitionWarning'] = Field(default=None)
    "A critical piece of information about environmental, health or physical risks or hazards that serve as caution to the user. For example 'Do not operate heavy machinery', 'May cause drowsiness', or 'Get medical advice/attention if you feel unwell'."
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A categorisation of the issue, primarily for dividing warnings into subject heading areas such as "Pregnancy and Lactation", "Overdose", "Effects on Ability to Drive and Use Machines".'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for this issue.'
    indication: Optional_['ClinicalUseDefinitionIndication'] = Field(default=None)
    'Specifics for when this is an indication.'
    population: Sequence_['Reference'] = Field(default_factory=list)
    'The population group to which this applies.'
    interaction: Optional_['ClinicalUseDefinitionInteraction'] = Field(default=None)
    'Specifics for when this is an interaction.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    contraindication: Optional_['ClinicalUseDefinitionContraindication'] = Field(default=None)
    'Specifics for when this is a contraindication.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    undesirableEffect: Optional_['ClinicalUseDefinitionUndesirableEffect'] = Field(default=None)
    'Describe the possible undesirable effects (negative outcomes) from the use of the medicinal product as treatment.'


class CodeSystemProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A property defines an additional slot through which additional information can be provided about a concept."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of the property value. Properties of type "code" contain a code defined by the code system (e.g. a reference to another defined concept).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'A description of the property- why it is defined, and how its value might be used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    uri: Optional_['uri'] = Field(default=None)
    'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.'
    code: 'code' = Field(default=...)
    'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.'


class CodeSystemConcept(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    display: Optional_['string'] = Field(default=None)
    'A human readable string that is the recommended default way to present this concept to a user.'
    concept: Sequence_['CodeSystemConcept'] = Field(default_factory=list)
    'Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning.'
    property: Sequence_['CodeSystemConceptProperty'] = Field(default_factory=list)
    'A property value for this concept.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: Optional_['string'] = Field(default=None)
    'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.'
    designation: Sequence_['CodeSystemConceptDesignation'] = Field(default_factory=list)
    'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'A code - a text symbol - that uniquely identifies the concept within the code system.'


class CodeSystemConceptDesignation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Optional_['Coding'] = Field(default=None)
    'A code that details how this designation would be used.'
    value: 'string' = Field(default=...)
    'The text value for this designation.'
    language: Optional_['code'] = Field(default=None)
    'The language this designation is defined for.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    additionalUse: Sequence_['Coding'] = Field(default_factory=list)
    'Additional codes that detail how this designation would be used, if there is more than one use.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CodeSystemConceptProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A property value for this concept."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueCode: Optional_['code'] = Field(default=None)
    'The value of this property.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The value of this property.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of this property.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of this property.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of this property.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of this property.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of this property.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'A code that is a reference to CodeSystem.property.code.'


class CodeSystemFilter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A filter that can be used in a value set compose statement when selecting concepts using a filter."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    value: 'string' = Field(default=...)
    'A description of what the value for the filter should be.'
    operator: Sequence_['code'] = Field(default=...)
    'A list of operators that can be used with the filter.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'A description of how or why the filter is used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'The code that identifies this filter when it is used as a filter in [ValueSet](valueset.html#).compose.include.filter.'


class CodeSystem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content."""
    resourceType: Literal_['CodeSystem'] = Field(default=...)
    'Declares the existence of and describes a code system or code system supplement'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the code system.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptions related to the content of the CodeSystem. Topics provide a high-level categorization as well as keywords for the CodeSystem that can be useful for filtering and searching.'
    count: Optional_['unsignedInt'] = Field(default=None)
    'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.'
    status: 'code' = Field(default=...)
    'The status of this code system. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the CodeSystem.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the CodeSystem.'
    filter: Sequence_['CodeSystemFilter'] = Field(default_factory=list)
    'A filter that can be used in a value set compose statement when selecting concepts using a filter.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this code system is needed and why it has been designed as it has.'
    content: 'code' = Field(default=...)
    'The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.'
    concept: Sequence_['CodeSystemConcept'] = Field(default_factory=list)
    'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the CodeSystem.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the CodeSystem for use in some setting.'
    valueSet: Optional_['canonical'] = Field(default=None)
    'Canonical reference to the value set that contains all codes in the code system independent of code status.'
    property: Sequence_['CodeSystemProperty'] = Field(default_factory=list)
    'A property defines an additional slot through which additional information can be provided about a concept.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the code system.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate code system instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the code system from a consumer's perspective."
    supplements: Optional_['canonical'] = Field(default=None)
    'The canonical URL of the code system that this code system supplement is adding designations and properties to.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the code system is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    caseSensitive: Optional_['boolean'] = Field(default=None)
    'If code comparison is case sensitive when codes within this system are compared to each other.'
    compositional: Optional_['boolean'] = Field(default=None)
    'The code system defines a compositional (post-coordination) grammar.'
    versionNeeded: Optional_['boolean'] = Field(default=None)
    'This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the CodeSystem content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts.'
    hierarchyMeaning: Optional_['code'] = Field(default=None)
    'The meaning of the hierarchy of concepts as represented in this resource.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which CodeSystem is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which CodeSystem is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the code system was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.'


class CommunicationPayload(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Text, attachment(s), or resource(s) that was communicated to the recipient."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    contentAttachment: Optional_['Attachment'] = Field(default=None)
    'A communicated content (or for multi-part communications, one portion of the communication).'
    contentReference: Optional_['Reference'] = Field(default=None)
    'A communicated content (or for multi-part communications, one portion of the communication).'
    contentCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A communicated content (or for multi-part communications, one portion of the communication).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Communication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition."""
    resourceType: Literal_['Communication'] = Field(default=...)
    'A clinical or business level record of information being transmitted or shared'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    sent: Optional_['dateTime'] = Field(default=None)
    'The time when this communication was sent.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Additional notes or commentary about the communication by the sender, receiver or other interested parties.'
    topic: Optional_['CodeableConcept'] = Field(default=None)
    'Description of the purpose/content, similar to a subject line in an email.'
    about: Sequence_['Reference'] = Field(default_factory=list)
    'Other resources that pertain to this communication and to which this communication should be associated.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event (e.g. Communication, Procedure) of which this particular communication is a component or step.'
    status: 'code' = Field(default=...)
    'The status of the transmission.'
    medium: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A channel that was used for this communication (e.g. email, fax).'
    sender: Optional_['Reference'] = Field(default=None)
    'The entity (e.g. person, organization, clinical information system, or device) which is the source of the communication.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The reason or justification for the communication.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'An order, proposal or plan fulfilled in whole or in part by this Communication.'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient or group that was the focus of this communication.'
    payload: Sequence_['CommunicationPayload'] = Field(default_factory=list)
    'Text, attachment(s), or resource(s) that was communicated to the recipient.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The type of message conveyed such as alert, notification, reminder, instruction, etc.'
    priority: Optional_['code'] = Field(default=None)
    'Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine.'
    received: Optional_['dateTime'] = Field(default=None)
    'The time when this communication arrived at the destination.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter during which this Communication was created or to which the creation of this record is tightly associated.'
    recipient: Sequence_['Reference'] = Field(default_factory=list)
    'The entity (e.g. person, organization, clinical information system, care team or device) which is the target of the communication.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    inResponseTo: Sequence_['Reference'] = Field(default_factory=list)
    'Prior communication that this communication is in response to.'
    statusReason: Optional_['CodeableConcept'] = Field(default=None)
    'Captures the reason for the current state of the Communication.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.'


class CommunicationRequestPayload(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Text, attachment(s), or resource(s) to be communicated to the recipient."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    contentAttachment: Optional_['Attachment'] = Field(default=None)
    'The communicated content (or for multi-part communications, one portion of the communication).'
    contentReference: Optional_['Reference'] = Field(default=None)
    'The communicated content (or for multi-part communications, one portion of the communication).'
    contentCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The communicated content (or for multi-part communications, one portion of the communication).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CommunicationRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."""
    resourceType: Literal_['CommunicationRequest'] = Field(default=...)
    'A request for information to be sent to a receiver'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the request by the requester, sender, recipient, subject or other participants.'
    about: Sequence_['Reference'] = Field(default_factory=list)
    'Other resources that pertain to this communication request and to which this communication request should be associated.'
    status: 'code' = Field(default=...)
    'The status of the proposal or order.'
    intent: 'code' = Field(default=...)
    'Indicates the level of authority/intentionality associated with the CommunicationRequest and where the request fits into the workflow chain.'
    medium: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A channel that was used for this communication (e.g. email, fax).'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Describes why the request is being made in coded or textual form.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan or proposal that is fulfilled in whole or in part by this request.'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient or group that is the focus of this communication request.'
    payload: Sequence_['CommunicationRequestPayload'] = Field(default_factory=list)
    'Text, attachment(s), or resource(s) to be communicated to the recipient.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    replaces: Sequence_['Reference'] = Field(default_factory=list)
    'Completed or terminated request(s) whose function is taken by this new request.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The type of message to be sent such as alert, notification, reminder, instruction, etc.'
    priority: Optional_['code'] = Field(default=None)
    'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter during which this CommunicationRequest was created or to which the creation of this record is tightly associated.'
    requester: Optional_['Reference'] = Field(default=None)
    'The device, individual, or organization who asks for the information to be shared.'
    recipient: Sequence_['Reference'] = Field(default_factory=list)
    'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    authoredOn: Optional_['dateTime'] = Field(default=None)
    'For draft requests, indicates the date of initial creation.  For requests with other statuses, indicates the date of activation.'
    statusReason: Optional_['CodeableConcept'] = Field(default=None)
    'Captures the reason for the current state of the CommunicationRequest.'
    doNotPerform: Optional_['boolean'] = Field(default=None)
    'If true indicates that the CommunicationRequest is asking for the specified action to *not* occur.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'The time when this communication is to occur.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'The time when this communication is to occur.'
    groupIdentifier: Optional_['Identifier'] = Field(default=None)
    'A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    informationProvider: Sequence_['Reference'] = Field(default_factory=list)
    'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.'


class CompartmentDefinitionResource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about how a resource is related to the compartment."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    param: Sequence_['string'] = Field(default_factory=list)
    'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.'
    endParam: Optional_['uri'] = Field(default=None)
    'Search Parameter for mapping requests made with $everything.end (e.g. on [Patient.$everything](patient-operation-everything.html)).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    startParam: Optional_['uri'] = Field(default=None)
    'Search Parameter for mapping requests made with $everything.start (e.g. on [Patient.$everything](patient-operation-everything.html)).'
    documentation: Optional_['string'] = Field(default=None)
    'Additional documentation about the resource and compartment.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'The name of a resource supported by the server.'


class CompartmentDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A compartment definition that defines how resources are accessed on a server."""
    resourceType: Literal_['CompartmentDefinition'] = Field(default=...)
    'Compartment Definition for a resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: 'uri' = Field(default=...)
    'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the compartment definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the capability statement.'
    status: 'code' = Field(default=...)
    'The status of this compartment definition. Enables tracking the life-cycle of the content.'
    search: 'boolean' = Field(default=...)
    'Whether the search syntax is supported,.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this compartment definition is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    resource: Sequence_['CompartmentDefinitionResource'] = Field(default_factory=list)
    'Information about how a resource is related to the compartment.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the compartment definition.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the compartment definition from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    code: 'code' = Field(default=...)
    'Which compartment this definition describes.'


class CompositionAttester(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A participant who has attested to the accuracy of the composition/document."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    mode: 'CodeableConcept' = Field(default=...)
    'The type of attestation the authenticator offers.'
    time: Optional_['dateTime'] = Field(default=None)
    'When the composition was attested by the party.'
    party: Optional_['Reference'] = Field(default=None)
    'Who attested the composition in the specified way.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CompositionSection(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The root of the sections that make up the composition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code identifying the kind of content contained within the section. This must be consistent with the section title.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.'
    title: Optional_['string'] = Field(default=None)
    'The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.'
    focus: Optional_['Reference'] = Field(default=None)
    'The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).'
    entry: Sequence_['Reference'] = Field(default_factory=list)
    'A reference to the actual resource from which the narrative in the section is derived.'
    author: Sequence_['Reference'] = Field(default_factory=list)
    'Identifies who is responsible for the information in this section, not necessarily who typed it in.'
    section: Sequence_['CompositionSection'] = Field(default_factory=list)
    'A nested sub-section within this section.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    orderedBy: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies the order applied to the items in the section entries.'
    emptyReason: Optional_['CodeableConcept'] = Field(default=None)
    'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CompositionEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The clinical service, such as a colonoscopy or an appendectomy, being documented."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    period: Optional_['Period'] = Field(default=None)
    'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.'
    detail: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which case the procedure being documented is necessarily a "History and Physical" act. The events may be included as a code or as a reference to an other resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Composition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.)."""
    resourceType: Literal_['Composition'] = Field(default=...)
    'A set of resources composed into a single coherent clinical statement with clinical attestation'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'CodeableConcept' = Field(default=...)
    'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.'
    date: 'dateTime' = Field(default=...)
    'The composition editing time, when the composition was last logically changed by the author.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the {{title}}. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'For any additional notes.'
    title: 'string' = Field(default=...)
    'Official human-readable label for the composition.'
    event: Sequence_['CompositionEvent'] = Field(default_factory=list)
    'The clinical service, such as a colonoscopy or an appendectomy, being documented.'
    status: 'code' = Field(default=...)
    'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.'
    author: Sequence_['Reference'] = Field(default=...)
    'Identifies who is responsible for the information in the composition, not necessarily who typed it in.'
    version: Optional_['string'] = Field(default=None)
    'An explicitly assigned identifer of a variation of the content in the Composition.'
    subject: Sequence_['Reference'] = Field(default_factory=list)
    'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).'
    section: Sequence_['CompositionSection'] = Field(default_factory=list)
    'The root of the sections that make up the composition.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.'
    attester: Sequence_['CompositionAttester'] = Field(default_factory=list)
    'A participant who has attested to the accuracy of the composition/document.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'Describes the clinical encounter or type of care this documentation is associated with.'
    custodian: Optional_['Reference'] = Field(default=None)
    'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.'
    relatesTo: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Relationships that this composition has with other compositions or documents that already exist.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Composition instances.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConceptMapAdditionalAttribute(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An additionalAttribute defines an additional data element found in the source or target data model where the data will come from or be mapped to. Some mappings are based on data in addition to the source data element, where codes in multiple fields are combined to a single field (or vice versa)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of the source data contained in this concept map for this data element.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'A description of the additional attribute and/or the data element it refers to - why it is defined, and how the value might be used in mappings, and a discussion of issues associated with the use of the data element.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    uri: Optional_['uri'] = Field(default=None)
    'Reference to the formal definition of the source/target data element. For elements defined by the FHIR specification, or using a FHIR logical model, the correct format is {canonical-url}#{element-id}.'
    code: 'code' = Field(default=...)
    'A code that is used to identify this additional data attribute. The code is used internally in ConceptMap.group.element.target.dependsOn.attribute and ConceptMap.group.element.target.product.attribute.'


class ConceptMapProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A property defines a slot through which additional information can be provided about a map from source -> target."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of the property value.'
    system: Optional_['canonical'] = Field(default=None)
    'The CodeSystem that defines the codes from which values of type ```code``` in property values.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'A description of the property - why it is defined, and how its value might be used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    uri: Optional_['uri'] = Field(default=None)
    'Reference to the formal meaning of the property.'
    code: 'code' = Field(default=...)
    'A code that is used to identify the property. The code is used internally (in ConceptMap.group.element.target.property.code) and also in the $translate operation.'


class ConceptMapGroup(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A group of mappings that all have the same source and target system."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    source: Optional_['canonical'] = Field(default=None)
    'An absolute URI that identifies the source system where the concepts to be mapped are defined.'
    target: Optional_['canonical'] = Field(default=None)
    'An absolute URI that identifies the target system that the concepts will be mapped to.'
    element: Sequence_['ConceptMapGroupElement'] = Field(default=...)
    'Mappings for an individual concept in the source to one or more concepts in the target.'
    unmapped: Optional_['ConceptMapGroupUnmapped'] = Field(default=None)
    'What to do when there is no mapping to a target concept from the source concept and ConceptMap.group.element.noMap is not true. This provides the "default" to be applied when there is no target concept mapping specified or the expansion of ConceptMap.group.element.target.valueSet is empty.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConceptMapGroupUnmapped(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """What to do when there is no mapping to a target concept from the source concept and ConceptMap.group.element.noMap is not true. This provides the "default" to be applied when there is no target concept mapping specified or the expansion of ConceptMap.group.element.target.valueSet is empty."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    mode: 'code' = Field(default=...)
    'Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped source code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).'
    display: Optional_['string'] = Field(default=None)
    'The display for the code. The display is only provided to help editors when editing the concept map.'
    valueSet: Optional_['canonical'] = Field(default=None)
    "The set of fixed codes to use when the mode = 'fixed'  - all unmapped codes are mapped to each of the fixed codes."
    otherMap: Optional_['canonical'] = Field(default=None)
    'The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    relationship: Optional_['code'] = Field(default=None)
    "The default relationship value to apply between the source and target concepts when the source code is unmapped and the mode is 'fixed' or 'use-source-code'."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['code'] = Field(default=None)
    "The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code."


class ConceptMapGroupElement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Mappings for an individual concept in the source to one or more concepts in the target."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    noMap: Optional_['boolean'] = Field(default=None)
    'If noMap = true this indicates that no mapping to a target concept exists for this source concept.'
    target: Sequence_['ConceptMapGroupElementTarget'] = Field(default_factory=list)
    'A concept from the target value set that this concept maps to.'
    display: Optional_['string'] = Field(default=None)
    'The display for the code. The display is only provided to help editors when editing the concept map.'
    valueSet: Optional_['canonical'] = Field(default=None)
    'The set of concepts from the ConceptMap.group.source code system which are all being mapped to the target as part of this mapping rule.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['code'] = Field(default=None)
    'Identity (code or path) or the element/item being mapped.'


class ConceptMapGroupElementTarget(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A concept from the target value set that this concept maps to."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    display: Optional_['string'] = Field(default=None)
    'The display for the code. The display is only provided to help editors when editing the concept map.'
    comment: Optional_['string'] = Field(default=None)
    'A description of status/issues in mapping that conveys additional information not represented in  the structured data.'
    product: Sequence_['ConceptMapGroupElementTargetDependsOn'] = Field(default_factory=list)
    'Product is the output of a ConceptMap that provides additional values that go in other attributes / data elemnts of the target data.'
    valueSet: Optional_['canonical'] = Field(default=None)
    'The set of concepts from the ConceptMap.group.target code system which are all being mapped to as part of this mapping rule. The effect of using this data element is the same as having multiple ConceptMap.group.element.target elements with one for each concept in the ConceptMap.group.element.target.valueSet value set.'
    property: Sequence_['ConceptMapGroupElementTargetProperty'] = Field(default_factory=list)
    'A property value for this source -> target mapping.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    dependsOn: Sequence_['ConceptMapGroupElementTargetDependsOn'] = Field(default_factory=list)
    'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified data attribute can be resolved, and it has the specified value.'
    relationship: 'code' = Field(default=...)
    'The relationship between the source and target concepts. The relationship is read from source to target (e.g. source-is-narrower-than-target).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['code'] = Field(default=None)
    'Identity (code or path) or the element/item that the map refers to.'


class ConceptMapGroupElementTargetDependsOn(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified data attribute can be resolved, and it has the specified value."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueCode: Optional_['code'] = Field(default=None)
    'Data element value that the map depends on / produces.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'Data element value that the map depends on / produces.'
    valueString: Optional_['string'] = Field(default=None)
    'Data element value that the map depends on / produces.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Data element value that the map depends on / produces.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Data element value that the map depends on / produces.'
    valueSet: Optional_['canonical'] = Field(default=None)
    'This mapping applies if the data element value is a code from this value set.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    attribute: 'code' = Field(default=...)
    'A reference to the additional attribute that holds a value the map depends on.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConceptMapGroupElementTargetProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A property value for this source -> target mapping."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    "The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element."
    valueString: Optional_['string'] = Field(default=None)
    "The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element."
    valueInteger: Optional_['integer'] = Field(default=None)
    "The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element."
    valueBoolean: Optional_['boolean'] = Field(default=None)
    "The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element."
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    "The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element."
    valueDecimal: Optional_['decimal'] = Field(default=None)
    "The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element."
    valueCode: Optional_['code'] = Field(default=None)
    "The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'A reference to a mapping property defined in ConceptMap.property.'


class ConceptMap(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models."""
    resourceType: Literal_['ConceptMap'] = Field(default=...)
    'A map from one set of concepts to one or more other concepts'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the concept map.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptions related to the content of the ConceptMap. Topics provide a high-level categorization as well as keywords for the ConceptMap that can be useful for filtering and searching.'
    group: Sequence_['ConceptMapGroup'] = Field(default_factory=list)
    'A group of mappings that all have the same source and target system.'
    status: 'code' = Field(default=...)
    'The status of this concept map. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the ConceptMap.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the ConceptMap.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this concept map is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the ConceptMap.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the ConceptMap for use in some setting.'
    property: Sequence_['ConceptMapProperty'] = Field(default_factory=list)
    'A property defines a slot through which additional information can be provided about a map from source -> target.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the concept map.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate concept map instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the concept map from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the concept map is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    sourceScopeUri: Optional_['uri'] = Field(default=None)
    'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.  Limits the scope of the map to source codes (ConceptMap.group.element code or valueSet) that are members of this value set.'
    sourceScopeCanonical: Optional_['canonical'] = Field(default=None)
    'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.  Limits the scope of the map to source codes (ConceptMap.group.element code or valueSet) that are members of this value set.'
    targetScopeUri: Optional_['uri'] = Field(default=None)
    'Identifier for the target value set that provides important context about how the mapping choices are made.  Limits the scope of the map to target codes (ConceptMap.group.element.target code or valueSet) that are members of this value set.'
    targetScopeCanonical: Optional_['canonical'] = Field(default=None)
    'Identifier for the target value set that provides important context about how the mapping choices are made.  Limits the scope of the map to target codes (ConceptMap.group.element.target code or valueSet) that are members of this value set.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the ConceptMap content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which ConceptMap is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which ConceptMap is more current.'
    additionalAttribute: Sequence_['ConceptMapAdditionalAttribute'] = Field(default_factory=list)
    'An additionalAttribute defines an additional data element found in the source or target data model where the data will come from or be mapped to. Some mappings are based on data in addition to the source data element, where codes in multiple fields are combined to a single field (or vice versa).'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the concept map was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.'


class ConditionParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what participated in the activities related to the condition and how they were involved."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'Indicates who or what participated in the activities related to the condition.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of involvement of the actor in the activities related to the condition.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConditionStage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A simple summary of the stage such as "Stage 3" or "Early Onset". The determination of the stage is disease-specific, such as cancer, retinopathy of prematurity, kidney diseases, Alzheimer's, or Parkinson disease."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of staging, such as pathological or clinical staging.'
    summary: Optional_['CodeableConcept'] = Field(default=None)
    'A simple summary of the stage such as "Stage 3" or "Early Onset". The determination of the stage is disease-specific, such as cancer, retinopathy of prematurity, kidney diseases, Alzheimer\'s, or Parkinson disease.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    assessment: Sequence_['Reference'] = Field(default_factory=list)
    'Reference to a formal record of the evidence on which the staging assessment is based.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Condition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern."""
    resourceType: Literal_['Condition'] = Field(default=...)
    'Detailed information about conditions, problems or diagnoses'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Additional information about the Condition. This is a general notes/comments entry  for description of the Condition, its diagnosis and prognosis.'
    stage: Sequence_['ConditionStage'] = Field(default_factory=list)
    'A simple summary of the stage such as "Stage 3" or "Early Onset". The determination of the stage is disease-specific, such as cancer, retinopathy of prematurity, kidney diseases, Alzheimer\'s, or Parkinson disease.'
    subject: 'Reference' = Field(default=...)
    'Indicates the patient or group who the condition record is associated with.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A category assigned to the condition.'
    severity: Optional_['CodeableConcept'] = Field(default=None)
    'A subjective assessment of the severity of the condition as evaluated by the clinician.'
    bodySite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The anatomical location where this condition manifests itself.'
    onsetDateTime: Optional_['dateTime'] = Field(default=None)
    'Estimated or actual date or date-time  the condition began, in the opinion of the clinician.'
    onsetAge: Optional_['Age'] = Field(default=None)
    'Estimated or actual date or date-time  the condition began, in the opinion of the clinician.'
    onsetPeriod: Optional_['Period'] = Field(default=None)
    'Estimated or actual date or date-time  the condition began, in the opinion of the clinician.'
    onsetRange: Optional_['Range'] = Field(default=None)
    'Estimated or actual date or date-time  the condition began, in the opinion of the clinician.'
    onsetString: Optional_['string'] = Field(default=None)
    'Estimated or actual date or date-time  the condition began, in the opinion of the clinician.'
    evidence: Sequence_['CodeableReference'] = Field(default_factory=list)
    "Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition."
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter during which this Condition was created or to which the creation of this record is tightly associated.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    participant: Sequence_['ConditionParticipant'] = Field(default_factory=list)
    'Indicates who or what participated in the activities related to the condition and how they were involved.'
    abatementDateTime: Optional_['dateTime'] = Field(default=None)
    'The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Some conditions, such as chronic conditions, are never really resolved, but they can abate.'
    abatementAge: Optional_['Age'] = Field(default=None)
    'The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Some conditions, such as chronic conditions, are never really resolved, but they can abate.'
    abatementPeriod: Optional_['Period'] = Field(default=None)
    'The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Some conditions, such as chronic conditions, are never really resolved, but they can abate.'
    abatementRange: Optional_['Range'] = Field(default=None)
    'The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Some conditions, such as chronic conditions, are never really resolved, but they can abate.'
    abatementString: Optional_['string'] = Field(default=None)
    'The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Some conditions, such as chronic conditions, are never really resolved, but they can abate.'
    recordedDate: Optional_['dateTime'] = Field(default=None)
    'The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    clinicalStatus: 'CodeableConcept' = Field(default=...)
    'The clinical status of the condition.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    verificationStatus: Optional_['CodeableConcept'] = Field(default=None)
    'The verification status to support the clinical status of the condition.  The verification status pertains to the condition, itself, not to any specific condition attribute.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Identification of the condition, problem or diagnosis.'


class ConditionDefinitionQuestionnaire(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Questionnaire for this condition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    purpose: 'code' = Field(default=...)
    'Use of the questionnaire.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: 'Reference' = Field(default=...)
    'Specific Questionnaire.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConditionDefinitionPrecondition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An observation that suggests that this condition applies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'Kind of pre-condition.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Value of Observation.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Value of Observation.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'CodeableConcept' = Field(default=...)
    'Code for relevant Observation.'


class ConditionDefinitionObservation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Observations particularly relevant to this condition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Code for relevant Observation.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Category that is relevant.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConditionDefinitionMedication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Medications particularly relevant for this condition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Code for relevant Medication.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Category that is relevant.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConditionDefinitionPlan(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Plan that is appropriate."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'Use for the plan.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: 'Reference' = Field(default=...)
    'The actual plan.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConditionDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A definition of a condition and information relevant to managing it."""
    resourceType: Literal_['ConditionDefinition'] = Field(default=...)
    'A definition of a condition'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this condition definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this condition definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the condition definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the condition definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the condition definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the condition definition changes.'
    team: Sequence_['Reference'] = Field(default_factory=list)
    'Appropriate team for this condition.'
    plan: Sequence_['ConditionDefinitionPlan'] = Field(default_factory=list)
    'Plan that is appropriate.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the condition definition.'
    stage: Optional_['CodeableConcept'] = Field(default=None)
    'Clinical stage or grade of a condition. May include formal severity assessments.'
    status: 'code' = Field(default=...)
    'The status of this condition definition. Enables tracking the life-cycle of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the condition definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the condition definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    subtitle: Optional_['string'] = Field(default=None)
    'An explanatory or alternate title for the event definition giving additional information about its content.'
    severity: Optional_['CodeableConcept'] = Field(default=None)
    'A subjective assessment of the severity of the condition as evaluated by the clinician.'
    bodySite: Optional_['CodeableConcept'] = Field(default=None)
    'The anatomical location where this condition manifests itself.'
    hasStage: Optional_['boolean'] = Field(default=None)
    'Whether stage is appropriate to collect for this condition.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the condition definition.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this condition definition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate condition definition instances.'
    definition: Sequence_['uri'] = Field(default_factory=list)
    'Formal definitions of the condition. These may be references to ontologies, published clinical protocols or research papers.'
    medication: Sequence_['ConditionDefinitionMedication'] = Field(default_factory=list)
    'Medications particularly relevant for this condition.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the condition definition from a consumer's perspective."
    hasSeverity: Optional_['boolean'] = Field(default=None)
    'Whether Severity is appropriate to collect for this condition.'
    hasBodySite: Optional_['boolean'] = Field(default=None)
    'Whether bodySite is appropriate to collect for this condition.'
    observation: Sequence_['ConditionDefinitionObservation'] = Field(default_factory=list)
    'Observations particularly relevant to this condition.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this condition definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the condition definition is intended to be used.'
    precondition: Sequence_['ConditionDefinitionPrecondition'] = Field(default_factory=list)
    'An observation that suggests that this condition applies.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    questionnaire: Sequence_['ConditionDefinitionQuestionnaire'] = Field(default_factory=list)
    'Questionnaire for this condition.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    code: 'CodeableConcept' = Field(default=...)
    'Identification of the condition, problem or diagnosis.'


class ConsentVerification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Whether a treatment instruction (e.g. artificial respiration: yes or no) was verified with the patient, his/her family or another authorized person."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    verified: 'boolean' = Field(default=...)
    'Has the instruction been verified.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    verifiedBy: Optional_['Reference'] = Field(default=None)
    'The person who conducted the verification/validation of the Grantor decision.'
    verifiedWith: Optional_['Reference'] = Field(default=None)
    'Who verified the instruction (Patient, Relative or other Authorized Person).'
    verificationType: Optional_['CodeableConcept'] = Field(default=None)
    'Extensible list of verification type starting with verification and re-validation.'
    verificationDate: Sequence_['dateTime'] = Field(default_factory=list)
    'Date(s) verification was collected.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConsentPolicyBasis(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A Reference or URL used to uniquely identify the policy the organization will enforce for this Consent. This Reference or URL should be specific to the version of the policy and should be dereferencable to a computable policy of some form."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['Reference'] = Field(default=None)
    'A Reference that identifies the policy the organization will enforce for this Consent.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    url: Optional_['url'] = Field(default=None)
    'A URL that links to a computable version of the policy the organization will enforce for this Consent.'


class ConsentProvision(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An exception to the base policy of this consent. An exception can be an addition or removal of access permissions."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'If this code is found in an instance, then the provision applies.'
    data: Sequence_['ConsentProvisionData'] = Field(default_factory=list)
    'The resources controlled by this provision if specific resources are referenced.'
    actor: Sequence_['ConsentProvisionActor'] = Field(default_factory=list)
    "Who or what is controlled by this provision. Use group to identify a set of actors by some property they share (e.g. 'admitting officers')."
    period: Optional_['Period'] = Field(default=None)
    'Timeframe for this provision.'
    action: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Actions controlled by this provision.'
    purpose: Sequence_['Coding'] = Field(default_factory=list)
    'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this provision.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    provision: Sequence_['ConsentProvision'] = Field(default_factory=list)
    'Provisions which provide exceptions to the base provision or subprovisions.'
    dataPeriod: Optional_['Period'] = Field(default=None)
    'Clinical or Operational Relevant period of time that bounds the data controlled by this provision.'
    expression: Optional_['Expression'] = Field(default=None)
    'A computable (FHIRPath or other) definition of what is controlled by this consent.'
    documentType: Sequence_['Coding'] = Field(default_factory=list)
    'The documentType(s) covered by this provision. The type can be a CDA document, or some other type that indicates what sort of information the consent relates to.'
    resourceType: Sequence_['Coding'] = Field(default_factory=list)
    'The resourceType(s) covered by this provision. The type can be a FHIR resource type or a profile on a type that indicates what information the consent relates to.'
    securityLabel: Sequence_['Coding'] = Field(default_factory=list)
    'A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConsentProvisionActor(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Who or what is controlled by this provision. Use group to identify a set of actors by some property they share (e.g. 'admitting officers')."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'How the individual is involved in the resources content that is described in the exception.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['Reference'] = Field(default=None)
    "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ConsentProvisionData(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The resources controlled by this provision if specific resources are referenced."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    meaning: 'code' = Field(default=...)
    'How the resource reference is interpreted when testing consent restrictions.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: 'Reference' = Field(default=...)
    'A reference to a specific resource that defines which resources are covered by this consent.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Consent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time."""
    resourceType: Literal_['Consent'] = Field(default=...)
    "A healthcare consumer's  or third party's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time"
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: 'code' = Field(default=...)
    'Indicates the current state of this Consent resource.'
    period: Optional_['Period'] = Field(default=None)
    'Effective period for this Consent Resource and all provisions unless specified in that provision.'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient/healthcare practitioner or group of persons to whom this consent applies.'
    grantor: Sequence_['Reference'] = Field(default_factory=list)
    'The entity responsible for granting the rights listed in a Consent Directive.'
    grantee: Sequence_['Reference'] = Field(default_factory=list)
    'The entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.'
    manager: Sequence_['Reference'] = Field(default_factory=list)
    'The actor that manages the consent through its lifecycle.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.'
    decision: Optional_['code'] = Field(default=None)
    'Action to take - permit or deny - as default.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    provision: Sequence_['ConsentProvision'] = Field(default_factory=list)
    'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique identifier for this copy of the Consent Statement.'
    controller: Sequence_['Reference'] = Field(default_factory=list)
    'The actor that controls/enforces the access according to the consent.'
    policyText: Sequence_['Reference'] = Field(default_factory=list)
    'A Reference to the human readable policy explaining the basis for the Consent.'
    policyBasis: Optional_['ConsentPolicyBasis'] = Field(default=None)
    'A Reference or URL used to uniquely identify the policy the organization will enforce for this Consent. This Reference or URL should be specific to the version of the policy and should be dereferencable to a computable policy of some form.'
    verification: Sequence_['ConsentVerification'] = Field(default_factory=list)
    'Whether a treatment instruction (e.g. artificial respiration: yes or no) was verified with the patient, his/her family or another authorized person.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    sourceReference: Sequence_['Reference'] = Field(default_factory=list)
    'A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.'
    regulatoryBasis: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A set of codes that indicate the regulatory basis (if any) that this consent supports.'
    sourceAttachment: Sequence_['Attachment'] = Field(default_factory=list)
    'The source on which this consent statement is based. The source might be a scanned original paper form.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    date: Optional_['date'] = Field(default=None)
    'Date the consent instance was agreed to.'


class ContractContentDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.'
    subType: Optional_['CodeableConcept'] = Field(default=None)
    'Detailed Precusory content type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['Reference'] = Field(default=None)
    'The  individual or organization that published the Contract precursor content.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.'
    publicationDate: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the contract was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    publicationStatus: 'code' = Field(default=...)
    'amended | appended | cancelled | disputed | entered-in-error | executable +.'


class ContractFriendly(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    contentAttachment: Optional_['Attachment'] = Field(default=None)
    'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.'
    contentReference: Optional_['Reference'] = Field(default=None)
    'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractSigner(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'Coding' = Field(default=...)
    'Role of this Contract signer, e.g. notary, grantee.'
    party: 'Reference' = Field(default=...)
    'Party which is a signator to this Contract.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    signature: Sequence_['Signature'] = Field(default=...)
    'Legally binding Contract DSIG signature contents in Base64.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractLegal(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """List of Legal expressions or representations of this Contract."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    contentAttachment: Optional_['Attachment'] = Field(default=None)
    'Contract legal text in human renderable form.'
    contentReference: Optional_['Reference'] = Field(default=None)
    'Contract legal text in human renderable form.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractRule(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """List of Computable Policy Rule Language Representations of this Contract."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    contentAttachment: Optional_['Attachment'] = Field(default=None)
    'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).'
    contentReference: Optional_['Reference'] = Field(default=None)
    'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractTerm(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.'
    text: Optional_['string'] = Field(default=None)
    'Statement of a provision in a policy or a contract.'
    offer: 'ContractTermOffer' = Field(default=...)
    'The matter of concern in the context of this provision of the agrement.'
    asset: Sequence_['ContractTermAsset'] = Field(default_factory=list)
    'Contract Term Asset List.'
    group: Sequence_['ContractTerm'] = Field(default_factory=list)
    'Nested group of Contract Provisions.'
    issued: Optional_['dateTime'] = Field(default=None)
    'When this Contract Provision was issued.'
    action: Sequence_['ContractTermAction'] = Field(default_factory=list)
    'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.'
    applies: Optional_['Period'] = Field(default=None)
    'Relevant time or time-period when this Contract Provision is applicable.'
    subType: Optional_['CodeableConcept'] = Field(default=None)
    'A specialized legal clause or condition based on overarching contract type.'
    topicCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The entity that the term applies to.'
    topicReference: Optional_['Reference'] = Field(default=None)
    'The entity that the term applies to.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Unique identifier for this particular Contract Provision.'
    securityLabel: Sequence_['ContractTermSecurityLabel'] = Field(default_factory=list)
    'Security labels that protect the handling of information about the term and its elements, which may be specifically identified.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractTermSecurityLabel(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Security labels that protect the handling of information about the term and its elements, which may be specifically identified."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    number: Sequence_['unsignedInt'] = Field(default_factory=list)
    'Number used to link this term or term element to the applicable Security Label.'
    control: Sequence_['Coding'] = Field(default_factory=list)
    'Security label privacy tag that specifies the manner in which term and/or term elements are to be protected.'
    category: Sequence_['Coding'] = Field(default_factory=list)
    'Security label privacy tag that specifies the applicable privacy and security policies governing this term and/or term elements.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    classification: 'Coding' = Field(default=...)
    'Security label privacy tag that specifies the level of confidentiality protection required for this term and/or term elements.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractTermAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the term action made by the requester, performer, subject or other participants.'
    intent: 'CodeableConcept' = Field(default=...)
    'Reason or purpose for the action stipulated by this Contract Provision.'
    linkId: Sequence_['string'] = Field(default_factory=list)
    'Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.'
    status: 'CodeableConcept' = Field(default=...)
    'Current state of the term action.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited. Either a coded concept, or another resource whose existence justifies permitting or not permitting this action.'
    subject: Sequence_['ContractTermActionSubject'] = Field(default_factory=list)
    'Entity of the action.'
    context: Optional_['Reference'] = Field(default=None)
    'Encounter or Episode with primary association to the specified term activity.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requester: Sequence_['Reference'] = Field(default_factory=list)
    'Who or what initiated the action and has responsibility for its activation.'
    performer: Optional_['Reference'] = Field(default=None)
    'Indicates who or what is being asked to perform (or not perform) the ction.'
    doNotPerform: Optional_['boolean'] = Field(default=None)
    'True if the term prohibits the  action.'
    reasonLinkId: Sequence_['string'] = Field(default_factory=list)
    'Id [identifier??] of the clause or question text related to the reason type or reference of this  action in the referenced form or QuestionnaireResponse.'
    contextLinkId: Sequence_['string'] = Field(default_factory=list)
    'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'When action happens.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'When action happens.'
    occurrenceTiming: Optional_['Timing'] = Field(default=None)
    'When action happens.'
    performerType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The type of individual that is desired or required to perform or not perform the action.'
    performerRole: Optional_['CodeableConcept'] = Field(default=None)
    'The type of role or competency of an individual desired or required to perform or not perform the action.'
    requesterLinkId: Sequence_['string'] = Field(default_factory=list)
    'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.'
    performerLinkId: Sequence_['string'] = Field(default_factory=list)
    'Id [identifier??] of the clause or question text related to the reason type or reference of this  action in the referenced form or QuestionnaireResponse.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    securityLabelNumber: Sequence_['unsignedInt'] = Field(default_factory=list)
    'Security labels that protects the action.'


class ContractTermActionSubject(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Entity of the action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'Role type of agent assigned roles in this Contract.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Sequence_['Reference'] = Field(default=...)
    'The entity the action is performed or not performed on or for.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractTermAsset(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Contract Term Asset List."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Target entity type about which the term may be concerned.'
    text: Optional_['string'] = Field(default=None)
    'Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.'
    scope: Optional_['CodeableConcept'] = Field(default=None)
    'Differentiates the kind of the asset .'
    period: Sequence_['Period'] = Field(default_factory=list)
    'Asset relevant contractual time period.'
    linkId: Sequence_['string'] = Field(default_factory=list)
    'Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.'
    answer: Sequence_['ContractTermOfferAnswer'] = Field(default_factory=list)
    'Response to assets.'
    subtype: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'May be a subtype or part of an offered asset.'
    context: Sequence_['ContractTermAssetContext'] = Field(default_factory=list)
    'Circumstance of the asset.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Optional_['string'] = Field(default=None)
    'Description of the quality and completeness of the asset that may be a factor in its valuation.'
    usePeriod: Sequence_['Period'] = Field(default_factory=list)
    'Time period of asset use.'
    periodType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Type of Asset availability for use or ownership.'
    valuedItem: Sequence_['ContractTermAssetValuedItem'] = Field(default_factory=list)
    'Contract Valued Item List.'
    relationship: Optional_['Coding'] = Field(default=None)
    'Specifies the applicability of the term to an asset resource instance, and instances it refers to or instances that refer to it, and/or are owned by the offeree.'
    typeReference: Sequence_['Reference'] = Field(default_factory=list)
    'Associated entities.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    securityLabelNumber: Sequence_['unsignedInt'] = Field(default_factory=list)
    'Security labels that protects the asset.'


class ContractTermAssetValuedItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Contract Valued Item List."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    net: Optional_['Money'] = Field(default=None)
    'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    points: Optional_['decimal'] = Field(default=None)
    'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.'
    linkId: Sequence_['string'] = Field(default_factory=list)
    'Id  of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.'
    payment: Optional_['string'] = Field(default=None)
    'Terms of valuation.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    entityCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Specific type of Contract Valued Item that may be priced.'
    entityReference: Optional_['Reference'] = Field(default=None)
    'Specific type of Contract Valued Item that may be priced.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'A Contract Valued Item unit valuation measure.'
    recipient: Optional_['Reference'] = Field(default=None)
    'Who will receive payment.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Identifies a Contract Valued Item instance.'
    paymentDate: Optional_['dateTime'] = Field(default=None)
    'When payment is due.'
    responsible: Optional_['Reference'] = Field(default=None)
    'Who will make payment.'
    effectiveTime: Optional_['dateTime'] = Field(default=None)
    'Indicates the time during which this Contract ValuedItem information is effective.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    securityLabelNumber: Sequence_['unsignedInt'] = Field(default_factory=list)
    'A set of security labels that define which terms are controlled by this condition.'


class ContractTermAssetContext(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Circumstance of the asset."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.'
    text: Optional_['string'] = Field(default=None)
    'Context description.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['Reference'] = Field(default=None)
    'Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository),  location held, e.g., building,  jurisdiction.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractTermOffer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The matter of concern in the context of this provision of the agrement."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.'
    text: Optional_['string'] = Field(default=None)
    'Human readable form of this Contract Offer.'
    party: Sequence_['ContractTermOfferParty'] = Field(default_factory=list)
    'Offer Recipient.'
    topic: Optional_['Reference'] = Field(default=None)
    'The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).'
    answer: Sequence_['ContractTermOfferAnswer'] = Field(default_factory=list)
    'Response to offer text.'
    linkId: Sequence_['string'] = Field(default_factory=list)
    'The id of the clause or question text of the offer in the referenced questionnaire/response.'
    decision: Optional_['CodeableConcept'] = Field(default=None)
    'Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique identifier for this particular Contract Provision.'
    decisionMode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'How the decision about a Contract was conveyed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    securityLabelNumber: Sequence_['unsignedInt'] = Field(default_factory=list)
    'Security labels that protects the offer.'


class ContractTermOfferAnswer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Response to offer text."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueDate: Optional_['date'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueTime: Optional_['time'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueString: Optional_['string'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueUri: Optional_['uri'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warranty duration, or whether biospecimen may be used for further research.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ContractTermOfferParty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Offer Recipient."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: 'CodeableConcept' = Field(default=...)
    'How the party participates in the offer.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Sequence_['Reference'] = Field(default=...)
    'Participant in the offer.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Contract(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement."""
    resourceType: Literal_['Contract'] = Field(default=...)
    'Legal Agreement'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'Canonical identifier for this contract, represented as a URI (globally unique).'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    site: Sequence_['Reference'] = Field(default_factory=list)
    'Sites in which the contract is complied with,  exercised, or in force.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    "A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state.  Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract."
    term: Sequence_['ContractTerm'] = Field(default_factory=list)
    'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.'
    rule: Sequence_['ContractRule'] = Field(default_factory=list)
    'List of Computable Policy Rule Language Representations of this Contract.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.'
    alias: Sequence_['string'] = Field(default_factory=list)
    'Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.'
    scope: Optional_['CodeableConcept'] = Field(default=None)
    'A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.'
    legal: Sequence_['ContractLegal'] = Field(default_factory=list)
    'List of Legal expressions or representations of this Contract.'
    status: Optional_['code'] = Field(default=None)
    'The status of the resource instance.'
    issued: Optional_['dateTime'] = Field(default=None)
    'When this  Contract was issued.'
    domain: Sequence_['Reference'] = Field(default_factory=list)
    'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.'
    author: Optional_['Reference'] = Field(default=None)
    'The individual or organization that authored the Contract definition, derivative, or instance in any legal state.'
    signer: Sequence_['ContractSigner'] = Field(default_factory=list)
    'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.'
    version: Optional_['string'] = Field(default=None)
    'An edition identifier used for business purposes to label business significant variants.'
    applies: Optional_['Period'] = Field(default=None)
    'Relevant time or time-period when this Contract is applicable.'
    subject: Sequence_['Reference'] = Field(default_factory=list)
    'The target entity impacted by or of interest to parties to the agreement.'
    subType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    "Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope."
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    subtitle: Optional_['string'] = Field(default=None)
    'A more detailed or qualifying explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.'
    topicCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.'
    topicReference: Optional_['Reference'] = Field(default=None)
    'Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.'
    friendly: Sequence_['ContractFriendly'] = Field(default_factory=list)
    'The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    authority: Sequence_['Reference'] = Field(default_factory=list)
    'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique identifier for this Contract or a derivative that references a Source Contract.'
    legalState: Optional_['CodeableConcept'] = Field(default=None)
    'Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    expirationType: Optional_['CodeableConcept'] = Field(default=None)
    'Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.'
    supportingInfo: Sequence_['Reference'] = Field(default_factory=list)
    'Information that may be needed by/relevant to the performer in their execution of this term action.'
    instantiatesUri: Optional_['uri'] = Field(default=None)
    'The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.'
    relevantHistory: Sequence_['Reference'] = Field(default_factory=list)
    'Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract.  The Provenance.entity indicates the target that was changed in the update (see [Provenance.entity](provenance-definitions.html#Provenance.entity)).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    contentDerivative: Optional_['CodeableConcept'] = Field(default=None)
    'The minimal content derived from the basal information source at a specific stage in its lifecycle.'
    contentDefinition: Optional_['ContractContentDefinition'] = Field(default=None)
    'Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.'
    legallyBindingAttachment: Optional_['Attachment'] = Field(default=None)
    'Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.'
    legallyBindingReference: Optional_['Reference'] = Field(default=None)
    'Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.'
    instantiatesCanonical: Optional_['Reference'] = Field(default=None)
    'The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.'


class CoverageCostToBeneficiary(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been  included on the health card."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The category of patient centric costs associated with treatment.'
    unit: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates if the benefits apply to an individual or to the family.'
    term: Optional_['CodeableConcept'] = Field(default=None)
    "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'."
    network: Optional_['CodeableConcept'] = Field(default=None)
    'Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The amount due from the patient for the cost category.'
    valueMoney: Optional_['Money'] = Field(default=None)
    'The amount due from the patient for the cost category.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    exception: Sequence_['CoverageCostToBeneficiaryException'] = Field(default_factory=list)
    'A suite of codes indicating exceptions or reductions to patient costs and their effective periods.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageCostToBeneficiaryException(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A suite of codes indicating exceptions or reductions to patient costs and their effective periods."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The code for the specific exception.'
    period: Optional_['Period'] = Field(default=None)
    'The timeframe the exception is in force.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoveragePaymentBy(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Link to the paying party and optionally what specifically they will be responsible to pay."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    party: 'Reference' = Field(default=...)
    'The list of parties providing non-insurance payment for the treatment costs.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    responsibility: Optional_['string'] = Field(default=None)
    ' Description of the financial responsibility.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageClass(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A suite of underwriter specific classifiers."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The type of classification for which an insurer-specific class label or number and optional name is provided.  For example, type may be used to identify a class of coverage or employer group, policy, or plan.'
    name: Optional_['string'] = Field(default=None)
    'A short description for the class.'
    value: 'Identifier' = Field(default=...)
    'The alphanumeric identifier associated with the insurer issued label.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Coverage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment."""
    resourceType: Literal_['Coverage'] = Field(default=...)
    'Insurance or medical plan or a payment agreement'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    kind: 'code' = Field(default=...)
    'The nature of the coverage be it insurance, or cash payment such as self-pay.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.'
    class_: Sequence_['CoverageClass'] = Field(default_factory=list, alias='class')
    'A suite of underwriter specific classifiers.'
    order: Optional_['positiveInt'] = Field(default=None)
    "The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care. For example; a patient might have (0) auto insurance (1) their own health insurance and (2) spouse's health insurance. When claiming for treatments which were not the result of an auto accident then only coverages (1) and (2) above would be applicatble and would apply in the order specified in parenthesis."
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    period: Optional_['Period'] = Field(default=None)
    "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force."
    insurer: Optional_['Reference'] = Field(default=None)
    'The program or plan underwriter, payor, insurance company.'
    network: Optional_['string'] = Field(default=None)
    "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply."
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contract: Sequence_['Reference'] = Field(default_factory=list)
    'The policy(s) which constitute this insurance coverage.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    paymentBy: Sequence_['CoveragePaymentBy'] = Field(default_factory=list)
    'Link to the paying party and optionally what specifically they will be responsible to pay.'
    dependent: Optional_['string'] = Field(default=None)
    'A designator for a dependent under the coverage.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'The identifier of the coverage as issued by the insurer.'
    subscriber: Optional_['Reference'] = Field(default=None)
    "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due."
    beneficiary: 'Reference' = Field(default=...)
    'The party who benefits from the insurance coverage; the patient when products and/or services are provided.'
    subrogation: Optional_['boolean'] = Field(default=None)
    "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs."
    policyHolder: Optional_['Reference'] = Field(default=None)
    "The party who 'owns' the insurance policy."
    subscriberId: Sequence_['Identifier'] = Field(default_factory=list)
    'The insurer assigned ID for the Subscriber.'
    relationship: Optional_['CodeableConcept'] = Field(default=None)
    'The relationship of beneficiary (patient) to the subscriber.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    insurancePlan: Optional_['Reference'] = Field(default=None)
    'The insurance plan details, benefits and costs, which constitute this insurance coverage.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    costToBeneficiary: Sequence_['CoverageCostToBeneficiary'] = Field(default_factory=list)
    'A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been  included on the health card.'


class CoverageEligibilityRequestSupportingInfo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify supporting information entries.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    information: 'Reference' = Field(default=...)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    appliesToAll: Optional_['boolean'] = Field(default=None)
    'The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageEligibilityRequestInsurance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Financial instruments for reimbursement for the health care products and services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    focal: Optional_['boolean'] = Field(default=None)
    'A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.'
    coverage: 'Reference' = Field(default=...)
    "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    businessArrangement: Optional_['string'] = Field(default=None)
    'A business agreement number established between the provider and the insurer for special business processing purposes.'


class CoverageEligibilityRequestEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information code for an event with a corresponding date or period."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A coded event such as when a service is expected or a card printed.'
    whenDateTime: Optional_['dateTime'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    whenPeriod: Optional_['Period'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageEligibilityRequestItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    detail: Sequence_['Reference'] = Field(default_factory=list)
    'The plan/proposal/order describing the proposed service in detail.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    provider: Optional_['Reference'] = Field(default=None)
    'The practitioner who is responsible for the product or service to be rendered to the patient.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    facility: Optional_['Reference'] = Field(default=None)
    'Facility where the services will be provided.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'The amount charged to the patient by the provider for a single unit.'
    diagnosis: Sequence_['CoverageEligibilityRequestItemDiagnosis'] = Field(default_factory=list)
    'Patient diagnosis for which care is sought.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the product, service, drug or other billing code for the item.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    supportingInfoSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Exceptions, special conditions and supporting information applicable for this service or product line.'


class CoverageEligibilityRequestItemDiagnosis(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Patient diagnosis for which care is sought."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    diagnosisCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The nature of illness or problem in a coded form or as a reference to an external defined Condition.'
    diagnosisReference: Optional_['Reference'] = Field(default=None)
    'The nature of illness or problem in a coded form or as a reference to an external defined Condition.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageEligibilityRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy."""
    resourceType: Literal_['CoverageEligibilityRequest'] = Field(default=...)
    'CoverageEligibilityRequest resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    item: Sequence_['CoverageEligibilityRequestItem'] = Field(default_factory=list)
    'Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.'
    event: Sequence_['CoverageEligibilityRequestEvent'] = Field(default_factory=list)
    'Information code for an event with a corresponding date or period.'
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    purpose: Sequence_['code'] = Field(default=...)
    "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified."
    patient: 'Reference' = Field(default=...)
    'The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.'
    created: 'dateTime' = Field(default=...)
    'The date when this resource was created.'
    enterer: Optional_['Reference'] = Field(default=None)
    'Person who created the request.'
    insurer: 'Reference' = Field(default=...)
    'The Insurer who issued the coverage in question and is the recipient of the request.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    priority: Optional_['CodeableConcept'] = Field(default=None)
    'When the requestor expects the processor to complete processing.'
    provider: Optional_['Reference'] = Field(default=None)
    'The provider which is responsible for the request.'
    facility: Optional_['Reference'] = Field(default=None)
    'Facility where the services are intended to be provided.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    insurance: Sequence_['CoverageEligibilityRequestInsurance'] = Field(default_factory=list)
    'Financial instruments for reimbursement for the health care products and services.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this coverage eligiblity request.'
    servicedDate: Optional_['date'] = Field(default=None)
    'The date or dates when the enclosed suite of services were performed or completed.'
    servicedPeriod: Optional_['Period'] = Field(default=None)
    'The date or dates when the enclosed suite of services were performed or completed.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    supportingInfo: Sequence_['CoverageEligibilityRequestSupportingInfo'] = Field(default_factory=list)
    'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageEligibilityResponseInsurance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Financial instruments for reimbursement for the health care products and services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: Sequence_['CoverageEligibilityResponseInsuranceItem'] = Field(default_factory=list)
    'Benefits and optionally current balances, and authorization details by category or service.'
    inforce: Optional_['boolean'] = Field(default=None)
    'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.'
    coverage: 'Reference' = Field(default=...)
    "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    benefitPeriod: Optional_['Period'] = Field(default=None)
    'The term of the benefits documented in this response.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageEligibilityResponseInsuranceItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Benefits and optionally current balances, and authorization details by category or service."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'A short name or tag for the benefit.'
    unit: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates if the benefits apply to an individual or to the family.'
    term: Optional_['CodeableConcept'] = Field(default=None)
    "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'."
    network: Optional_['CodeableConcept'] = Field(default=None)
    'Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.'
    benefit: Sequence_['CoverageEligibilityResponseInsuranceItemBenefit'] = Field(default_factory=list)
    'Benefits used to date.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    provider: Optional_['Reference'] = Field(default=None)
    'The practitioner who is eligible for the provision of the product or service.'
    excluded: Optional_['boolean'] = Field(default=None)
    'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'A richer description of the benefit or services covered.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the product, service, drug or other billing code for the item.'
    authorizationUrl: Optional_['uri'] = Field(default=None)
    'A web location for obtaining requirements or descriptive information regarding the preauthorization.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    authorizationRequired: Optional_['boolean'] = Field(default=None)
    'A boolean flag indicating whether a preauthorization is required prior to actual service delivery.'
    authorizationSupporting: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Codes or comments regarding information or actions associated with the preauthorization.'


class CoverageEligibilityResponseInsuranceItemBenefit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Benefits used to date."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Classification of benefit being provided.'
    usedUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The quantity of the benefit which have been consumed to date.'
    usedString: Optional_['string'] = Field(default=None)
    'The quantity of the benefit which have been consumed to date.'
    usedMoney: Optional_['Money'] = Field(default=None)
    'The quantity of the benefit which have been consumed to date.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    allowedUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The quantity of the benefit which is permitted under the coverage.'
    allowedString: Optional_['string'] = Field(default=None)
    'The quantity of the benefit which is permitted under the coverage.'
    allowedMoney: Optional_['Money'] = Field(default=None)
    'The quantity of the benefit which is permitted under the coverage.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageEligibilityResponseError(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Errors encountered during the processing of the request."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'An error code,from a specified code system, which details why the eligibility check could not be performed.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Sequence_['string'] = Field(default_factory=list)
    'A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageEligibilityResponseEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information code for an event with a corresponding date or period."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A coded event such as when a service is expected or a card printed.'
    whenDateTime: Optional_['dateTime'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    whenPeriod: Optional_['Period'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class CoverageEligibilityResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource."""
    resourceType: Literal_['CoverageEligibilityResponse'] = Field(default=...)
    'CoverageEligibilityResponse resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    form: Optional_['CodeableConcept'] = Field(default=None)
    'A code for the form to be used for printing the content.'
    event: Sequence_['CoverageEligibilityResponseEvent'] = Field(default_factory=list)
    'Information code for an event with a corresponding date or period.'
    error: Sequence_['CoverageEligibilityResponseError'] = Field(default_factory=list)
    'Errors encountered during the processing of the request.'
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    purpose: Sequence_['code'] = Field(default=...)
    "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified."
    patient: 'Reference' = Field(default=...)
    'The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.'
    created: 'dateTime' = Field(default=...)
    'The date this resource was created.'
    request: 'Reference' = Field(default=...)
    'Reference to the original request resource.'
    outcome: 'code' = Field(default=...)
    'The outcome of the request processing.'
    insurer: 'Reference' = Field(default=...)
    'The Insurer who issued the coverage in question and is the author of the response.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requestor: Optional_['Reference'] = Field(default=None)
    'The provider which is responsible for the request.'
    insurance: Sequence_['CoverageEligibilityResponseInsurance'] = Field(default_factory=list)
    'Financial instruments for reimbursement for the health care products and services.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this coverage eligiblity request.'
    preAuthRef: Optional_['string'] = Field(default=None)
    'A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.'
    servicedDate: Optional_['date'] = Field(default=None)
    'The date or dates when the enclosed suite of services were performed or completed.'
    servicedPeriod: Optional_['Period'] = Field(default=None)
    'The date or dates when the enclosed suite of services were performed or completed.'
    disposition: Optional_['string'] = Field(default=None)
    'A human readable description of the status of the adjudication.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DetectedIssueMitigation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates an action that has been taken or is committed to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting.  Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    date: Optional_['dateTime'] = Field(default=None)
    'Indicates when the mitigating action was documented.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Clinicians may add additional notes or justifications about the mitigation action. For example, patient can have this drug because they have had it before without any issues. Multiple justifications may be provided.'
    action: 'CodeableConcept' = Field(default=...)
    'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.'
    author: Optional_['Reference'] = Field(default=None)
    'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DetectedIssueEvidence(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Supporting evidence or manifestations that provide the basis for identifying the detected issue such as a GuidanceResponse or MeasureReport."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A manifestation that led to the recording of this detected issue.'
    detail: Sequence_['Reference'] = Field(default_factory=list)
    'Links to resources that constitute evidence for the detected issue such as a GuidanceResponse or MeasureReport.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DetectedIssue(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, gaps in care, etc."""
    resourceType: Literal_['DetectedIssue'] = Field(default=...)
    'Clinical issue with action'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: 'code' = Field(default=...)
    'Indicates the status of the detected issue.'
    author: Optional_['Reference'] = Field(default=None)
    'Individual or device responsible for the issue being raised.  For example, a decision support application or a pharmacist conducting a medication review.'
    detail: Optional_['markdown'] = Field(default=None)
    'A textual explanation of the detected issue.'
    subject: Optional_['Reference'] = Field(default=None)
    'Indicates the subject whose record the detected issue is associated with.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that classifies the general type of detected issue.'
    severity: Optional_['code'] = Field(default=None)
    'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.'
    evidence: Sequence_['DetectedIssueEvidence'] = Field(default_factory=list)
    'Supporting evidence or manifestations that provide the basis for identifying the detected issue such as a GuidanceResponse or MeasureReport.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter during which this issue was detected.'
    reference: Optional_['uri'] = Field(default=None)
    'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier associated with the detected issue record.'
    implicated: Sequence_['Reference'] = Field(default_factory=list)
    'Indicates the resource representing the current activity or proposed activity that is potentially problematic.'
    mitigation: Sequence_['DetectedIssueMitigation'] = Field(default_factory=list)
    'Indicates an action that has been taken or is committed to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting.  Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    identifiedDateTime: Optional_['dateTime'] = Field(default=None)
    'The date or period when the detected issue was initially identified.'
    identifiedPeriod: Optional_['Period'] = Field(default=None)
    'The date or period when the detected issue was initially identified.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Identifies the specific type of issue identified.'


class DeviceConformsTo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    version: Optional_['string'] = Field(default=None)
    "Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label."
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the type of the standard, specification, or formal guidance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specification: 'CodeableConcept' = Field(default=...)
    'Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceUdiCarrier(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Unique device identifier (UDI) assigned to device label or package.  Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    issuer: 'uri' = Field(default=...)
    'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include: \n1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, \n2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-diI, \n3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, \n4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di # Informationsstelle für Arzneispezialitäten (IFA GmbH) (EU only): http://hl7.org/fhir/NamingSystem/ifa-gmbh-di.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    entryType: Optional_['code'] = Field(default=None)
    'A coded entry to indicate how the data was entered.'
    carrierHRF: Optional_['string'] = Field(default=None)
    'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.'
    carrierAIDC: Optional_['base64Binary'] = Field(default=None)
    'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID.   Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.'
    jurisdiction: Optional_['uri'] = Field(default=None)
    'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/us-fda-udi or in the European Union by the European Commission http://hl7.org/fhir/NamingSystem/eu-ec-udi.'
    deviceIdentifier: 'string' = Field(default=...)
    'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Static or essentially fixed characteristics or features of the device (e.g., time or timing attributes, resolution, accuracy, intended use or instructions for use, and physical attributes) that are not otherwise captured in more specific attributes."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Code that specifies the property, such as resolution, color, size, being represented.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceVersion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The actual design of the device or software version running on the device."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the device version, e.g. manufacturer, approved, internal.'
    value: 'string' = Field(default=...)
    'The version text.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    component: Optional_['Identifier'] = Field(default=None)
    'The hardware or software module of the device to which the version applies.'
    installDate: Optional_['dateTime'] = Field(default=None)
    'The date the version was installed on the device.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceName(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device.  This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'Indicates the kind of name. RegisteredName | UserFriendlyName | PatientReportedName.'
    value: 'string' = Field(default=...)
    'The actual name that identifies the device.'
    display: Optional_['boolean'] = Field(default=None)
    'Indicates the default or preferred name to be displayed.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Device(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device."""
    resourceType: Literal_['Device'] = Field(default=...)
    'Item used in healthcare'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'A network address on which the device may be contacted directly.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Sequence_['DeviceName'] = Field(default_factory=list)
    "This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device.  This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition."
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The kind or type of device. A device instance may have more than one type - in which case those are the types that apply to the specific instance of the device.'
    mode: Optional_['CodeableConcept'] = Field(default=None)
    'The designated condition for performing a task with the device.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Descriptive information, usage information or implantation information that is not captured in an existing element.'
    cycle: Optional_['Count'] = Field(default=None)
    'The series of occurrences that repeats during the operation of the device.'
    owner: Optional_['Reference'] = Field(default=None)
    'An organization that is responsible for the provision and ongoing maintenance of the device.'
    status: Optional_['code'] = Field(default=None)
    'The Device record status. This is not the status of the device like availability.'
    safety: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Provides additional safety characteristics about a medical device.  For example devices containing latex.'
    parent: Optional_['Reference'] = Field(default=None)
    'The higher level or encompassing device that this device is a logical part of.'
    version: Sequence_['DeviceVersion'] = Field(default_factory=list)
    'The actual design of the device or software version running on the device.'
    contact: Sequence_['ContactPoint'] = Field(default_factory=list)
    'Contact details for an organization or a particular human that is responsible for the device.'
    gateway: Sequence_['CodeableReference'] = Field(default_factory=list)
    "The linked device acting as a communication controller, data collector, translator, or concentrator for the current device (e.g., mobile phone application that relays a blood pressure device's data)."
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Devices may be associated with one or more categories.'
    property: Sequence_['DeviceProperty'] = Field(default_factory=list)
    'Static or essentially fixed characteristics or features of the device (e.g., time or timing attributes, resolution, accuracy, intended use or instructions for use, and physical attributes) that are not otherwise captured in more specific attributes.'
    duration: Optional_['Duration'] = Field(default=None)
    "A measurement of time during the device's operation (e.g., days, hours, mins, etc.)."
    location: Optional_['Reference'] = Field(default=None)
    'The place where the device can be found.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'Technical endpoints providing access to services provided by the device defined at this resource.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    lotNumber: Optional_['string'] = Field(default=None)
    'Lot number assigned by the manufacturer.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique instance identifiers assigned to a device by manufacturers other organizations or owners.'
    definition: Optional_['CodeableReference'] = Field(default=None)
    'The reference to the definition for the device.'
    udiCarrier: Sequence_['DeviceUdiCarrier'] = Field(default_factory=list)
    'Unique device identifier (UDI) assigned to device label or package.  Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.'
    partNumber: Optional_['string'] = Field(default=None)
    'The part number or catalog number of the device.'
    conformsTo: Sequence_['DeviceConformsTo'] = Field(default_factory=list)
    'Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards.'
    displayName: Optional_['string'] = Field(default=None)
    'The name used to display by default when the device is referenced. Based on intent of use by the resource creator, this may reflect one of the names in Device.name, or may be another simple name.'
    modelNumber: Optional_['string'] = Field(default=None)
    "The manufacturer's model number for the device."
    manufacturer: Optional_['string'] = Field(default=None)
    'A name of the manufacturer or entity legally responsible for the device.'
    serialNumber: Optional_['string'] = Field(default=None)
    'The serial number assigned by the organization when the device was manufactured.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    expirationDate: Optional_['dateTime'] = Field(default=None)
    'The date and time beyond which this device is no longer valid or should not be used (if applicable).'
    manufactureDate: Optional_['dateTime'] = Field(default=None)
    'The date and time when the device was manufactured.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    availabilityStatus: Optional_['CodeableConcept'] = Field(default=None)
    'The availability of the device.'
    biologicalSourceEvent: Optional_['Identifier'] = Field(default=None)
    'An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.'


class DeviceAssociationOperation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The details about the device when it is in use to describe its operation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    status: 'CodeableConcept' = Field(default=...)
    'Device operational condition corresponding to the association.'
    period: Optional_['Period'] = Field(default=None)
    "Begin and end dates and times for the device's operation."
    operator: Sequence_['Reference'] = Field(default_factory=list)
    'The individual performing the action enabled by the device.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceAssociation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of association or dissociation of a device with a patient."""
    resourceType: Literal_['DeviceAssociation'] = Field(default=...)
    'A record of association or dissociation of a device with a patient'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    device: 'Reference' = Field(default=...)
    'Reference to the devices associated with the patient or group.'
    status: 'CodeableConcept' = Field(default=...)
    'Indicates the state of the Device association.'
    period: Optional_['Period'] = Field(default=None)
    'Begin and end dates and times for the device association.'
    subject: Optional_['Reference'] = Field(default=None)
    'The individual, group of individuals or device that the device is on or associated with.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Describes the relationship between the device and subject.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Sequence_['DeviceAssociationOperation'] = Field(default_factory=list)
    'The details about the device when it is in use to describe its operation.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Instance identifier.'
    statusReason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The reasons given for the current association status.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    bodyStructure: Optional_['Reference'] = Field(default=None)
    'Current anatomical location of the device in/on subject.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionRegulatoryIdentifier(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifier associated with the regulatory documentation (certificates, technical documentation, post-market surveillance documentation and reports) of a set of device models sharing the same intended purpose, risk class and essential design and manufacturing characteristics. One example is the Basic UDI-DI in Europe."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of identifier itself.'
    issuer: 'uri' = Field(default=...)
    'The organization that issued this identifier.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    jurisdiction: 'uri' = Field(default=...)
    'The jurisdiction to which the deviceIdentifier applies.'
    deviceIdentifier: 'string' = Field(default=...)
    'The identifier itself.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionUdiDeviceIdentifier(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Unique device identifier (UDI) assigned to device label or package.  Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    issuer: 'uri' = Field(default=...)
    'The organization that assigns the identifier algorithm.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    jurisdiction: 'uri' = Field(default=...)
    'The jurisdiction to which the deviceIdentifier applies.'
    deviceIdentifier: 'string' = Field(default=...)
    'The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    marketDistribution: Sequence_['DeviceDefinitionUdiDeviceIdentifierMarketDistribution'] = Field(default_factory=list)
    'Indicates where and when the device is available on the market.'


class DeviceDefinitionUdiDeviceIdentifierMarketDistribution(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates where and when the device is available on the market."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    marketPeriod: 'Period' = Field(default=...)
    'Begin and end dates for the commercial distribution of the device.'
    subJurisdiction: 'uri' = Field(default=...)
    'National state or territory to which the marketDistribution recers, typically where the device is commercialized.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionCorrectiveAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Tracking of latest field safety corrective action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    scope: Optional_['code'] = Field(default=None)
    'The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name.'
    recall: 'boolean' = Field(default=...)
    'Whether the last corrective action known for this device was a recall.'
    period: 'Period' = Field(default=...)
    'Start and end dates of the  corrective action.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionClassification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """What kind of device or device system this is."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A classification or risk class of the device model.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    justification: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Further information qualifying this classification of the device model.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionChargeItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Billing code or reference associated with the device."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    count: 'Quantity' = Field(default=...)
    'Coefficient applicable to the billing code.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The context to which this charge item applies.'
    chargeItemCode: 'CodeableReference' = Field(default=...)
    'The code or reference for the charge item.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'A specific time period in which this charge item applies.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionConformsTo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    source: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Standard, regulation, certification, or guidance website, document, or other publication, or similar, supporting the conformance.'
    version: Sequence_['string'] = Field(default_factory=list)
    "Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label."
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the type of the standard, specification, or formal guidance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specification: 'CodeableConcept' = Field(default=...)
    'Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionDeviceName(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The name or names of the device as given by the manufacturer."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other.'
    type: 'code' = Field(default=...)
    'The type of deviceName.\nRegisteredName | UserFriendlyName | PatientReportedName.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionGuideline(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information aimed at providing directions for the usage of this model of device."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    warning: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Specific hazard alert information that a user needs to know before using the device.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The circumstances that form the setting for using the device.'
    indication: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A clinical condition for which the device was designed to be used.'
    intendedUse: Optional_['string'] = Field(default=None)
    'A description of the general purpose or medical use of the device or its function.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'A source of information or reference for this guideline.'
    usageInstruction: Optional_['markdown'] = Field(default=None)
    'Detailed written and visual directions for the user on how to use the device.'
    contraindication: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A specific situation when a device should not be used because it may cause harm.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionPackaging(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the packaging of the device, i.e. how the device is packaged."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'A code that defines the specific type of packaging.'
    count: Optional_['integer'] = Field(default=None)
    'The number of items contained in the package (devices or sub-packages).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    packaging: Sequence_['DeviceDefinitionPackaging'] = Field(default_factory=list)
    'Allows packages within packages.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'The business identifier of the packaged medication.'
    distributor: Sequence_['DeviceDefinitionPackagingDistributor'] = Field(default_factory=list)
    'An organization that distributes the packaged device.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    udiDeviceIdentifier: Sequence_['DeviceDefinitionUdiDeviceIdentifier'] = Field(default_factory=list)
    'Unique Device Identifier (UDI) Barcode string on the packaging.'


class DeviceDefinitionPackagingDistributor(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An organization that distributes the packaged device."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    "Distributor's human-readable name."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    organizationReference: Sequence_['Reference'] = Field(default_factory=list)
    'Distributor as an Organization resource.'


class DeviceDefinitionMaterial(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A substance used to create the material(s) of which the device is made."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    substance: 'CodeableConcept' = Field(default=...)
    'A substance that the device contains, may contain, or is made of - for example latex - to be used to determine patient compatibility. This is not intended to represent the composition of the device, only the clinically relevant materials.'
    alternate: Optional_['boolean'] = Field(default=None)
    'Indicates an alternative material of the device.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    allergenicIndicator: Optional_['boolean'] = Field(default=None)
    'Whether the substance is a known or suspected allergen.'


class DeviceDefinitionProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Static or essentially fixed characteristics or features of this kind of device that are otherwise not captured in more specific attributes, e.g., time or timing attributes, resolution, accuracy, and physical attributes."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Code that specifies the property such as a resolution or color being represented.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The value of the property specified by the associated property.type code.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionVersion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The version of the device or software."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the device version, e.g. manufacturer, approved, internal.'
    value: 'string' = Field(default=...)
    'The version text.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    component: Optional_['Identifier'] = Field(default=None)
    'The hardware or software module of the device to which the version applies.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionHasPart(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A device that is part (for example a component) of the present device."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    count: Optional_['integer'] = Field(default=None)
    'Number of instances of the component device in the current device.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: 'Reference' = Field(default=...)
    'Reference to the device that is part of the current device.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinitionLink(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    relation: 'Coding' = Field(default=...)
    'The type indicates the relationship of the related device to the device instance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    relatedDevice: 'CodeableReference' = Field(default=...)
    'A reference to the linked device.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The characteristics, operational status and capabilities of a medical-related component of a medical device."""
    resourceType: Literal_['DeviceDefinition'] = Field(default=...)
    'An instance of a medical-related component of a medical device'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    link: Sequence_['DeviceDefinitionLink'] = Field(default_factory=list)
    'An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Descriptive information, usage information or implantation information that is not captured in an existing element.'
    owner: Optional_['Reference'] = Field(default=None)
    'An organization that is responsible for the provision and ongoing maintenance of the device.'
    safety: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Safety characteristics of the device.'
    hasPart: Sequence_['DeviceDefinitionHasPart'] = Field(default_factory=list)
    'A device that is part (for example a component) of the present device.'
    version: Sequence_['DeviceDefinitionVersion'] = Field(default_factory=list)
    'The version of the device or software.'
    contact: Sequence_['ContactPoint'] = Field(default_factory=list)
    'Contact details for an organization or a particular human that is responsible for the device.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    property: Sequence_['DeviceDefinitionProperty'] = Field(default_factory=list)
    'Static or essentially fixed characteristics or features of this kind of device that are otherwise not captured in more specific attributes, e.g., time or timing attributes, resolution, accuracy, and physical attributes.'
    material: Sequence_['DeviceDefinitionMaterial'] = Field(default_factory=list)
    'A substance used to create the material(s) of which the device is made.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    packaging: Sequence_['DeviceDefinitionPackaging'] = Field(default_factory=list)
    'Information about the packaging of the device, i.e. how the device is packaged.'
    guideline: Optional_['DeviceDefinitionGuideline'] = Field(default=None)
    'Information aimed at providing directions for the usage of this model of device.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. The identifier is typically valued if the udiDeviceIdentifier, partNumber or modelNumber is not valued and represents a different type of identifier.  However, it is permissible to still include those identifiers in DeviceDefinition.identifier with the appropriate identifier.type.'
    partNumber: Optional_['string'] = Field(default=None)
    'The part number or catalog number of the device.'
    deviceName: Sequence_['DeviceDefinitionDeviceName'] = Field(default_factory=list)
    'The name or names of the device as given by the manufacturer.'
    conformsTo: Sequence_['DeviceDefinitionConformsTo'] = Field(default_factory=list)
    'Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards.'
    chargeItem: Sequence_['DeviceDefinitionChargeItem'] = Field(default_factory=list)
    'Billing code or reference associated with the device.'
    description: Optional_['markdown'] = Field(default=None)
    'Additional information to describe the device.'
    modelNumber: Optional_['string'] = Field(default=None)
    'The model number for the device for example as defined by the manufacturer or labeler, or other agency.'
    manufacturer: Optional_['Reference'] = Field(default=None)
    'A name of the manufacturer  or legal representative e.g. labeler. Whether this is the actual manufacturer or the labeler or responsible depends on implementation and jurisdiction.'
    languageCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Language code for the human-readable text strings produced by the device (all supported).'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    classification: Sequence_['DeviceDefinitionClassification'] = Field(default_factory=list)
    'What kind of device or device system this is.'
    shelfLifeStorage: Sequence_['ProductShelfLife'] = Field(default_factory=list)
    'Shelf Life and storage information.'
    correctiveAction: Optional_['DeviceDefinitionCorrectiveAction'] = Field(default=None)
    'Tracking of latest field safety corrective action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    udiDeviceIdentifier: Sequence_['DeviceDefinitionUdiDeviceIdentifier'] = Field(default_factory=list)
    'Unique device identifier (UDI) assigned to device label or package.  Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.'
    regulatoryIdentifier: Sequence_['DeviceDefinitionRegulatoryIdentifier'] = Field(default_factory=list)
    'Identifier associated with the regulatory documentation (certificates, technical documentation, post-market surveillance documentation and reports) of a set of device models sharing the same intended purpose, risk class and essential design and manufacturing characteristics. One example is the Basic UDI-DI in Europe.'
    productionIdentifierInUDI: Sequence_['code'] = Field(default_factory=list)
    'Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label.'


class DeviceDispensePerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what performed the event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'The device, practitioner, etc. who performed the action.  It should be assumed that the actor is the dispenser of the device.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of performer in the dispense.  For example, date enterer, packager, final checker.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceDispense(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of dispensation of a device - i.e., assigning a device to a patient, or to a professional for their use."""
    resourceType: Literal_['DeviceDispense'] = Field(default=...)
    'A record of dispensation of a device'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the type of dispensing event that is performed.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Extra information about the dispense that could not be conveyed in the other attributes.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'The bigger event that this dispense is a part of.'
    status: 'code' = Field(default=...)
    'A code specifying the state of the set of dispense events.'
    device: 'CodeableReference' = Field(default=...)
    'Identifies the device being dispensed. This is either a link to a resource representing the details of the device or a simple attribute carrying a code that identifies the device from a known list of devices.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'The order or request that this dispense is fulfilling.'
    subject: 'Reference' = Field(default=...)
    'A link to a resource representing the person to whom the device is intended.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Indicates the type of device dispense.'
    receiver: Optional_['Reference'] = Field(default=None)
    'Identifies the person who picked up the device or the person or location where the device was delivered.  This may be a patient or their caregiver, but some cases exist where it can be a healthcare professional or a location.'
    location: Optional_['Reference'] = Field(default=None)
    'The principal physical location where the dispense was performed.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of devices that have been dispensed.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter that establishes the context for this event.'
    performer: Sequence_['DeviceDispensePerformer'] = Field(default_factory=list)
    'Indicates who or what performed the event.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for this dispensation.'
    destination: Optional_['Reference'] = Field(default=None)
    'Identification of the facility/location where the device was /should be shipped to, as part of the dispense process.'
    statusReason: Optional_['CodeableReference'] = Field(default=None)
    'Indicates the reason why a dispense was or was not performed.'
    preparedDate: Optional_['dateTime'] = Field(default=None)
    'The time when the dispensed product was packaged and reviewed.'
    eventHistory: Sequence_['Reference'] = Field(default_factory=list)
    'A summary of the events of interest that have occurred, such as when the dispense was verified.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    whenHandedOver: Optional_['dateTime'] = Field(default=None)
    'The time the dispensed product was made available to the patient or their representative.'
    usageInstruction: Optional_['markdown'] = Field(default=None)
    'The full representation of the instructions.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    supportingInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Additional information that supports the device being dispensed.'


class DeviceMetricCalibration(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes the calibrations that have been performed or that are required to be performed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['code'] = Field(default=None)
    'Describes the type of the calibration method.'
    time: Optional_['instant'] = Field(default=None)
    'Describes the time last calibration has been performed.'
    state: Optional_['code'] = Field(default=None)
    'Describes the state of the calibration.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceMetric(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes a measurement, calculation or setting capability of a device."""
    resourceType: Literal_['DeviceMetric'] = Field(default=...)
    'Measurement, calculation or setting capability of a medical device'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'CodeableConcept' = Field(default=...)
    'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.'
    unit: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.'
    color: Optional_['code'] = Field(default=None)
    'The preferred color associated with the metric (e.g., display color). This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth; the metrics are displayed in different characteristic colors, such as HR in blue, BP in green, and PR and SpO2 in magenta.'
    device: 'Reference' = Field(default=...)
    'Describes the link to the Device.  This is also known as a channel device.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: 'code' = Field(default=...)
    'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Instance identifiers assigned to a device, by the device or gateway software, manufacturers, other organizations or owners. For example, handle ID.'
    calibration: Sequence_['DeviceMetricCalibration'] = Field(default_factory=list)
    'Describes the calibrations that have been performed or that are required to be performed.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    operationalStatus: Optional_['code'] = Field(default=None)
    'Indicates current operational state of the device. For example: On, Off, Standby, etc.'
    measurementFrequency: Optional_['Quantity'] = Field(default=None)
    'The frequency at which the metric is taken or recorded. Devices measure metrics at a wide range of frequencies; for example, an ECG might sample measurements in the millisecond range, while an NIBP might trigger only once an hour. Less often, the measurementFrequency may be based on a unit other than time, such as distance (e.g. for a measuring wheel). The update period may be different than the measurement frequency, if the device does not update the published observed value with the same frequency as it was measured.'


class DeviceRequestParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specific parameters for the ordered item.  For example, the prism value for lenses."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code or string that identifies the device detail being asserted.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the device detail.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the device detail.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the device detail.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the device detail.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker."""
    resourceType: Literal_['DeviceRequest'] = Field(default=...)
    'Medical device request'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.'
    status: Optional_['code'] = Field(default=None)
    'The status of the request.'
    intent: 'code' = Field(default=...)
    'Whether the request is a proposal, plan, an original order or a reflex order.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Reason or justification for the use of this device.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'Plan/proposal/order fulfilled by this request.'
    subject: 'Reference' = Field(default=...)
    'The patient who will use the device.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    replaces: Sequence_['Reference'] = Field(default_factory=list)
    'The request takes the place of the referenced completed or terminated request(s).'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the request should be addressed with respect to other requests.'
    quantity: Optional_['integer'] = Field(default=None)
    'The number of devices to be provided.'
    asNeeded: Optional_['boolean'] = Field(default=None)
    'This status is to indicate whether the request is a PRN or may be given as needed.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    parameter: Sequence_['DeviceRequestParameter'] = Field(default_factory=list)
    'Specific parameters for the ordered item.  For example, the prism value for lenses.'
    encounter: Optional_['Reference'] = Field(default=None)
    'An encounter that provides additional context in which this request is made.'
    requester: Optional_['Reference'] = Field(default=None)
    'The individual or entity who initiated the request and has responsibility for its activation.'
    performer: Optional_['CodeableReference'] = Field(default=None)
    'The desired individual or entity to provide the device to the subject of the request (e.g., patient, location).'
    insurance: Sequence_['Reference'] = Field(default_factory=list)
    'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers assigned to this order by the orderer or by the receiver.'
    authoredOn: Optional_['dateTime'] = Field(default=None)
    'When the request transitioned to being actionable.'
    asNeededFor: Optional_['CodeableConcept'] = Field(default=None)
    'The reason for using the device.'
    doNotPerform: Optional_['boolean'] = Field(default=None)
    'If true, indicates that the provider is asking for the patient to either stop using or to not start using the specified device or category of devices. For example, the patient has undergone surgery and the provider is indicating that the patient should not wear contact lenses.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".'
    occurrenceTiming: Optional_['Timing'] = Field(default=None)
    'The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. "Every 8 hours"; "Three times a day"; "1/2 an hour before breakfast for 10 days from 23-Dec 2011:"; "15 Oct 2013, 17 Oct 2013 and 1 Nov 2013".'
    supportingInfo: Sequence_['Reference'] = Field(default_factory=list)
    "Additional clinical information about the patient that may influence the request fulfilment.  For example, this may include where on the subject's body the device will be used (i.e. the target site)."
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.'
    groupIdentifier: Optional_['Identifier'] = Field(default=None)
    'A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.'
    relevantHistory: Sequence_['Reference'] = Field(default_factory=list)
    'Key events in the history of the request.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.'
    code: 'CodeableReference' = Field(default=...)
    'The details of the device to be used.'


class DeviceUsageAdherence(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This indicates how or if the device is being used."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Type of adherence.'
    reason: Sequence_['CodeableConcept'] = Field(default=...)
    'Reason for adherence type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DeviceUsage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of a device being used by a patient where the record is the result of a report from the patient or a clinician."""
    resourceType: Literal_['DeviceUsage'] = Field(default=...)
    'Record of use of a device'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.'
    status: 'code' = Field(default=...)
    "A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed."
    device: 'CodeableReference' = Field(default=...)
    'Code or Reference to device used.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Reason or justification for the use of the device. A coded concept, or another resource whose existence justifies this DeviceUsage.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan, proposal or order that is fulfilled in whole or in part by this DeviceUsage.'
    patient: 'Reference' = Field(default=...)
    'The patient who used the device.'
    context: Optional_['Reference'] = Field(default=None)
    'The encounter or episode of care that establishes the context for this device use statement.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'This attribute indicates a category for the statement - The device statement may be made in an inpatient or outpatient settting (inpatient | outpatient | community | patientspecified).'
    bodySite: Optional_['CodeableReference'] = Field(default=None)
    "Indicates the anotomic location on the subject's body where the device was used ( i.e. the target)."
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    timingTiming: Optional_['Timing'] = Field(default=None)
    'How often the device was used.'
    timingPeriod: Optional_['Period'] = Field(default=None)
    'How often the device was used.'
    timingDateTime: Optional_['dateTime'] = Field(default=None)
    'How often the device was used.'
    adherence: Optional_['DeviceUsageAdherence'] = Field(default=None)
    'This indicates how or if the device is being used.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'An external identifier for this statement such as an IRI.'
    derivedFrom: Sequence_['Reference'] = Field(default_factory=list)
    'Allows linking the DeviceUsage to the underlying Request, or to other information that supports or is used to derive the DeviceUsage.'
    usageStatus: Optional_['CodeableConcept'] = Field(default=None)
    'The status of the device usage, for example always, sometimes, never. This is not the same as the status of the statement.'
    usageReason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The reason for asserting the usage status - for example forgot, lost, stolen, broken.'
    dateAsserted: Optional_['dateTime'] = Field(default=None)
    'The time at which the statement was recorded by informationSource.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    informationSource: Optional_['Reference'] = Field(default=None)
    'Who reported the device was being used by the patient.'


class DiagnosticReportSupportingInfo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This backbone element contains supporting information that was used in the creation of the report not included in the results already included in the report."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The code value for the role of the supporting information in the diagnostic report.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: 'Reference' = Field(default=...)
    'The reference for the supporting information in the diagnostic report.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DiagnosticReportMedia(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A list of key images or data associated with this report. The images or data are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    link: 'Reference' = Field(default=...)
    'Reference to the image or data source.'
    comment: Optional_['string'] = Field(default=None)
    "A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DiagnosticReport(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances."""
    resourceType: Literal_['DiagnosticReport'] = Field(default=...)
    'A Diagnostic report - a combination of request information, atomic results, images, interpretation, as well as formatted reports'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments about the diagnostic report.'
    study: Sequence_['Reference'] = Field(default_factory=list)
    'One or more links to full details of any study performed during the diagnostic investigation. An ImagingStudy might comprise a set of radiologic images obtained via a procedure that are analyzed as a group. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. A GenomicStudy might comprise one or more analyses, each serving a specific purpose. These analyses may vary in method (e.g., karyotyping, CNV, or SNV detection), performer, software, devices used, or regions targeted.'
    media: Sequence_['DiagnosticReportMedia'] = Field(default_factory=list)
    'A list of key images or data associated with this report. The images or data are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).'
    status: 'code' = Field(default=...)
    'The status of the diagnostic report.'
    issued: Optional_['instant'] = Field(default=None)
    'The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.'
    result: Sequence_['Reference'] = Field(default_factory=list)
    '[Observations](observation.html)  that are part of this diagnostic report.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'Details concerning a service requested.'
    subject: Optional_['Reference'] = Field(default=None)
    'The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.'
    specimen: Sequence_['Reference'] = Field(default_factory=list)
    'Details about the specimens on which this diagnostic report is based.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The healthcare event  (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.'
    performer: Sequence_['Reference'] = Field(default_factory=list)
    'The diagnostic service that is responsible for issuing the report.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers assigned to this report by the performer or other systems.'
    conclusion: Optional_['markdown'] = Field(default=None)
    'Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.'
    composition: Optional_['Reference'] = Field(default=None)
    'Reference to a Composition resource instance that provides structure for organizing the contents of the DiagnosticReport.'
    effectiveDateTime: Optional_['dateTime'] = Field(default=None)
    'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    presentedForm: Sequence_['Attachment'] = Field(default_factory=list)
    'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.'
    supportingInfo: Sequence_['DiagnosticReportSupportingInfo'] = Field(default_factory=list)
    'This backbone element contains supporting information that was used in the creation of the report not included in the results already included in the report.'
    conclusionCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    resultsInterpreter: Sequence_['Reference'] = Field(default_factory=list)
    "The practitioner or organization that is responsible for the report's conclusions and interpretations."
    code: 'CodeableConcept' = Field(default=...)
    'A code or name that describes this diagnostic report.'


class DocumentReferenceRelatesTo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Relationships that this document has with other document references that already exist."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'The type of relationship that this document has with anther document.'
    target: 'Reference' = Field(default=...)
    'The target document of this relationship.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DocumentReferenceAttester(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A participant who has authenticated the accuracy of the document."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    mode: 'CodeableConcept' = Field(default=...)
    'The type of attestation the authenticator offers.'
    time: Optional_['dateTime'] = Field(default=None)
    'When the document was attested by the party.'
    party: Optional_['Reference'] = Field(default=None)
    'Who attested the document in the specified way.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DocumentReferenceContent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The document and format referenced.  If there are multiple content element repetitions, these must all represent the same document in different format, or attachment metadata."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    profile: Sequence_['DocumentReferenceContentProfile'] = Field(default_factory=list)
    'An identifier of the document constraints, encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    attachment: 'Attachment' = Field(default=...)
    'The document or URL of the document along with critical metadata to prove content has integrity.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DocumentReferenceContentProfile(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An identifier of the document constraints, encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'Code|uri|canonical.'
    valueUri: Optional_['uri'] = Field(default=None)
    'Code|uri|canonical.'
    valueCanonical: Optional_['canonical'] = Field(default=None)
    'Code|uri|canonical.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DocumentReference(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this "document" encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference."""
    resourceType: Literal_['DocumentReference'] = Field(default=...)
    'A reference to a document'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies the particular kind of document referenced  (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.'
    date: Optional_['instant'] = Field(default=None)
    'When the document reference was created.'
    event: Sequence_['CodeableReference'] = Field(default_factory=list)
    'This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.'
    status: 'code' = Field(default=...)
    'The status of this document reference.'
    period: Optional_['Period'] = Field(default=None)
    'The time period over which the service that is described by the document was provided.'
    author: Sequence_['Reference'] = Field(default_factory=list)
    'Identifies who is responsible for adding the information to the document.'
    version: Optional_['string'] = Field(default=None)
    'An explicitly assigned identifer of a variation of the content in the DocumentReference.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A procedure that is fulfilled in whole or in part by the creation of this media.'
    subject: Optional_['Reference'] = Field(default=None)
    'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).'
    context: Sequence_['Reference'] = Field(default_factory=list)
    'Describes the clinical encounter or type of care that the document content is associated with.'
    content: Sequence_['DocumentReferenceContent'] = Field(default=...)
    'The document and format referenced.  If there are multiple content element repetitions, these must all represent the same document in different format, or attachment metadata.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    modality: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Imaging modality used. This may include both acquisition and non-acquisition modalities.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.'
    bodySite: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The anatomic structures included in the document.'
    attester: Sequence_['DocumentReferenceAttester'] = Field(default_factory=list)
    'A participant who has authenticated the accuracy of the document.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    docStatus: Optional_['code'] = Field(default=None)
    'The status of the underlying document.'
    custodian: Optional_['Reference'] = Field(default=None)
    'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.'
    relatesTo: Sequence_['DocumentReferenceRelatesTo'] = Field(default_factory=list)
    'Relationships that this document has with other document references that already exist.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Other business identifiers associated with the document, including version independent identifiers.'
    description: Optional_['markdown'] = Field(default=None)
    'Human-readable description of the source document.'
    facilityType: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of facility where the patient was seen.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    securityLabel: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A set of Security-Tag codes specifying the level of privacy/security of the Document found at DocumentReference.content.attachment.url. Note that DocumentReference.meta.security contains the security labels of the data elements in DocumentReference, while DocumentReference.securityLabel contains the security labels for the document the reference refers to. The distinction recognizes that the document may contain sensitive information, while the DocumentReference is metadata about the document and thus might not be as sensitive as the document. For example: a psychotherapy episode may contain highly sensitive information, while the metadata may simply indicate that some episode happened.'
    practiceSetting: Optional_['CodeableConcept'] = Field(default=None)
    'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class DomainResource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A resource that includes narrative, extensions, and contained resources."""
    resourceType: Literal_['DomainResource'] = Field(default=...)
    'A resource with narrative, extensions, and contained resources'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EncounterParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The list of people responsible for providing the service."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Role of participant in encounter.'
    actor: Optional_['Reference'] = Field(default=None)
    'Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.'
    period: Optional_['Period'] = Field(default=None)
    "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EncounterAdmission(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    origin: Optional_['Reference'] = Field(default=None)
    'The location/organization from which the patient came before admission.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    admitSource: Optional_['CodeableConcept'] = Field(default=None)
    'From where patient was admitted (physician referral, transfer).'
    reAdmission: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.'
    destination: Optional_['Reference'] = Field(default=None)
    'Location/organization to which the patient is discharged.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    dischargeDisposition: Optional_['CodeableConcept'] = Field(default=None)
    'Category or kind of location after discharge.'
    preAdmissionIdentifier: Optional_['Identifier'] = Field(default=None)
    'Pre-admission identifier.'


class EncounterDiagnosis(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The list of diagnosis relevant to this encounter."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EncounterLocation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """List of locations where  the patient has been during this encounter."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    form: Optional_['CodeableConcept'] = Field(default=None)
    'This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.'
    status: Optional_['code'] = Field(default=None)
    "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time."
    period: Optional_['Period'] = Field(default=None)
    'Time period during which the patient was present at the location.'
    location: 'Reference' = Field(default=...)
    'The location where the encounter takes place.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EncounterReason(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The list of medical reasons that are expected to be addressed during the episode of care."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).'
    value: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Encounter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.  Encounter is primarily used to record information about the actual activities that occurred, where Appointment is used to record planned activities."""
    resourceType: Literal_['Encounter'] = Field(default=...)
    'An interaction during which services are provided to the patient'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).'
    class_: Sequence_['CodeableConcept'] = Field(default_factory=list, alias='class')
    'Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.'
    status: 'code' = Field(default=...)
    'The current state of the encounter (not the state of the patient within the encounter - that is subjectState).'
    partOf: Optional_['Reference'] = Field(default=None)
    'Another Encounter of which this encounter is a part of (administratively or in time).'
    length: Optional_['Duration'] = Field(default=None)
    'Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values.'
    reason: Sequence_['EncounterReason'] = Field(default_factory=list)
    'The list of medical reasons that are expected to be addressed during the episode of care.'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'The request this encounter satisfies (e.g. incoming referral or procedure request).'
    account: Sequence_['Reference'] = Field(default_factory=list)
    'The set of accounts that may be used for billing for this Encounter.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    priority: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the urgency of the encounter.'
    careTeam: Sequence_['Reference'] = Field(default_factory=list)
    'The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter.'
    location: Sequence_['EncounterLocation'] = Field(default_factory=list)
    'List of locations where  the patient has been during this encounter.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    diagnosis: Sequence_['EncounterDiagnosis'] = Field(default_factory=list)
    'The list of diagnosis relevant to this encounter.'
    admission: Optional_['EncounterAdmission'] = Field(default=None)
    'Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier(s) by which this encounter is known.'
    serviceType: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Broad categorization of the service that is to be provided (e.g. cardiology).'
    participant: Sequence_['EncounterParticipant'] = Field(default_factory=list)
    'The list of people responsible for providing the service.'
    appointment: Sequence_['Reference'] = Field(default_factory=list)
    'The appointment that scheduled this encounter.'
    actualPeriod: Optional_['Period'] = Field(default=None)
    'The actual start and end time of the encounter.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    subjectStatus: Optional_['CodeableConcept'] = Field(default=None)
    "The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status."
    episodeOfCare: Sequence_['Reference'] = Field(default_factory=list)
    'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem.  The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).'
    virtualService: Sequence_['VirtualServiceDetail'] = Field(default_factory=list)
    'Connection details of a virtual service (e.g. conference call).'
    plannedEndDate: Optional_['dateTime'] = Field(default=None)
    'The planned end date/time (or discharge date) of the encounter.'
    dietPreference: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Diet preferences reported by the patient.'
    serviceProvider: Optional_['Reference'] = Field(default=None)
    "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation.  Refer to the colonoscopy example on the Encounter examples tab."
    specialCourtesy: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy).'
    plannedStartDate: Optional_['dateTime'] = Field(default=None)
    'The planned start date/time (or admission date) of the encounter.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    specialArrangement: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Any special requests that have been made for this encounter, such as the provision of specific equipment or other things.'


class EncounterHistoryLocation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The location of the patient at this point in the encounter, the multiple cardinality permits de-normalizing the levels of the location hierarchy, such as site/ward/room/bed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    form: Optional_['CodeableConcept'] = Field(default=None)
    'This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.'
    location: 'Reference' = Field(default=...)
    'The location where the encounter takes place.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EncounterHistory(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of significant events/milestones key data throughout the history of an Encounter, often tracked for specific purposes such as billing."""
    resourceType: Literal_['EncounterHistory'] = Field(default=...)
    'A record of significant events/milestones key data throughout the history of an Encounter'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).'
    class_: 'CodeableConcept' = Field(default=..., alias='class')
    'Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.'
    status: 'code' = Field(default=...)
    'planned | in-progress | on-hold | discharged | completed | cancelled | discontinued | entered-in-error | unknown.'
    length: Optional_['Duration'] = Field(default=None)
    'Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values.'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    location: Sequence_['EncounterHistoryLocation'] = Field(default_factory=list)
    'The location of the patient at this point in the encounter, the multiple cardinality permits de-normalizing the levels of the location hierarchy, such as site/ward/room/bed.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter associated with this set of historic values.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier(s) by which this encounter is known.'
    serviceType: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Broad categorization of the service that is to be provided (e.g. cardiology).'
    actualPeriod: Optional_['Period'] = Field(default=None)
    'The start and end time associated with this set of values associated with the encounter, may be different to the planned times for various reasons.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    subjectStatus: Optional_['CodeableConcept'] = Field(default=None)
    "The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status."
    plannedEndDate: Optional_['dateTime'] = Field(default=None)
    'The planned end date/time (or discharge date) of the encounter.'
    plannedStartDate: Optional_['dateTime'] = Field(default=None)
    'The planned start date/time (or admission date) of the encounter.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EndpointPayload(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The set of payloads that are provided/available at this endpoint."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The payload type describes the acceptable content that can be communicated on the endpoint.'
    mimeType: Sequence_['code'] = Field(default_factory=list)
    'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Endpoint(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information."""
    resourceType: Literal_['Endpoint'] = Field(default=...)
    'The technical details of an endpoint that can be used for electronic services'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A friendly name that this endpoint can be referred to with.'
    status: 'code' = Field(default=...)
    'The endpoint status represents the general expected availability of an endpoint.'
    period: Optional_['Period'] = Field(default=None)
    'The interval during which the endpoint is expected to be operational.'
    header: Sequence_['string'] = Field(default_factory=list)
    'Additional headers / information to send as part of the notification.'
    contact: Sequence_['ContactPoint'] = Field(default_factory=list)
    'Contact details for a human to contact about the endpoint. The primary use of this for system administrator troubleshooting.'
    payload: Sequence_['EndpointPayload'] = Field(default_factory=list)
    'The set of payloads that are provided/available at this endpoint.'
    address: 'url' = Field(default=...)
    'The uri that describes the actual end-point to connect to.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier for the organization that is used to identify the endpoint across multiple disparate systems.'
    description: Optional_['string'] = Field(default=None)
    'The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose).'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    connectionType: Sequence_['CodeableConcept'] = Field(default=...)
    'A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).'
    environmentType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The type of environment(s) exposed at this endpoint (dev, prod, test, etc.).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    managingOrganization: Optional_['Reference'] = Field(default=None)
    'The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).'


class EnrollmentRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource provides the insurance enrollment details to the insurer regarding a specified coverage."""
    resourceType: Literal_['EnrollmentRequest'] = Field(default=...)
    'Enroll in coverage'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: Optional_['code'] = Field(default=None)
    'The status of the resource instance.'
    created: Optional_['dateTime'] = Field(default=None)
    'The date when this resource was created.'
    insurer: Optional_['Reference'] = Field(default=None)
    'The Insurer who is target  of the request.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    provider: Optional_['Reference'] = Field(default=None)
    'The practitioner who is responsible for the services rendered to the patient.'
    coverage: Optional_['Reference'] = Field(default=None)
    'Reference to the program or plan identification, underwriter or payor.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    candidate: Optional_['Reference'] = Field(default=None)
    'Patient Resource.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'The Response business identifier.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EnrollmentResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource."""
    resourceType: Literal_['EnrollmentResponse'] = Field(default=...)
    'EnrollmentResponse resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: Optional_['code'] = Field(default=None)
    'The status of the resource instance.'
    request: Optional_['Reference'] = Field(default=None)
    'Original request resource reference.'
    outcome: Optional_['code'] = Field(default=None)
    'Processing status: error, complete.'
    created: Optional_['dateTime'] = Field(default=None)
    'The date when the enclosed suite of services were performed or completed.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'The Response business identifier.'
    disposition: Optional_['string'] = Field(default=None)
    'A description of the status of the adjudication.'
    organization: Optional_['Reference'] = Field(default=None)
    'The Insurer who produced this adjudicated response.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    requestProvider: Optional_['Reference'] = Field(default=None)
    'The practitioner who is responsible for the services rendered to the patient.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EpisodeOfCareStatusHistory(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    status: 'code' = Field(default=...)
    'planned | waitlist | active | onhold | finished | cancelled.'
    period: 'Period' = Field(default=...)
    'The period during this EpisodeOfCare that the specific status applied.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EpisodeOfCareDiagnosis(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The list of medical conditions that were addressed during the episode of care."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Optional_['CodeableConcept'] = Field(default=None)
    'Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The medical condition that was addressed during the episode of care, expressed as a text, code or a reference to another resource.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EpisodeOfCareReason(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The list of medical reasons that are expected to be addressed during the episode of care."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Optional_['CodeableConcept'] = Field(default=None)
    'What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).'
    value: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The medical reason that is expected to be addressed during the episode of care, expressed as a text, code or a reference to another resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EpisodeOfCare(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."""
    resourceType: Literal_['EpisodeOfCare'] = Field(default=...)
    'An association of a Patient with an Organization and  Healthcare Provider(s) for a period of time that the Organization assumes some level of responsibility'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.'
    status: 'code' = Field(default=...)
    'planned | waitlist | active | onhold | finished | cancelled.'
    reason: Sequence_['EpisodeOfCareReason'] = Field(default_factory=list)
    'The list of medical reasons that are expected to be addressed during the episode of care.'
    period: Optional_['Period'] = Field(default=None)
    'The interval during which the managing organization assumes the defined responsibility.'
    patient: 'Reference' = Field(default=...)
    'The patient who is the focus of this episode of care.'
    account: Sequence_['Reference'] = Field(default_factory=list)
    'The set of accounts that may be used for billing for this EpisodeOfCare.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    careTeam: Sequence_['Reference'] = Field(default_factory=list)
    'The list of practitioners that may be facilitating this episode of care for specific purposes.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    diagnosis: Sequence_['EpisodeOfCareDiagnosis'] = Field(default_factory=list)
    'The list of medical conditions that were addressed during the episode of care.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.'
    careManager: Optional_['Reference'] = Field(default=None)
    'The practitioner that is the care manager/care coordinator for this patient.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    statusHistory: Sequence_['EpisodeOfCareStatusHistory'] = Field(default_factory=list)
    'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).'
    referralRequest: Sequence_['Reference'] = Field(default_factory=list)
    'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    managingOrganization: Optional_['Reference'] = Field(default=None)
    'The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration.'


class EventDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The EventDefinition resource provides a reusable description of when a particular event can occur."""
    resourceType: Literal_['EventDefinition'] = Field(default=...)
    'A description of when an event can occur'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the event definition.'
    usage: Optional_['markdown'] = Field(default=None)
    'A detailed description of how the event definition is used from a clinical perspective.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.'
    status: 'code' = Field(default=...)
    'The status of this event definition. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the content.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this event definition is needed and why it has been designed as it has.'
    trigger: Sequence_['TriggerDefinition'] = Field(default=...)
    'The trigger element defines when the event occurs. If more than one trigger condition is specified, the event fires whenever any one of the trigger conditions is met.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    subtitle: Optional_['string'] = Field(default=None)
    'An explanatory or alternate title for the event definition giving additional information about its content.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the event definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the event definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the event definition.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this event definition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A code or group definition that describes the intended subject of the event definition.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'A code or group definition that describes the intended subject of the event definition.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate event definition instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the event definition from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the event definition is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the event definition content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related resources such as additional documentation, justification, or bibliographic references.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the event definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes.'


class EvidenceVariableDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Evidence variable such as population, exposure, or outcome."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Footnotes and/or explanatory notes.'
    observed: Optional_['Reference'] = Field(default=None)
    'Definition of the actual variable related to the statistic(s).'
    intended: Optional_['Reference'] = Field(default=None)
    'Definition of the intended variable related to the Evidence.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'A text description or summary of the variable.'
    variableRole: 'CodeableConcept' = Field(default=...)
    'population | subpopulation | exposure | referenceExposure | measuredVariable | confounder.'
    directnessMatch: Optional_['CodeableConcept'] = Field(default=None)
    'Indication of quality of match between intended variable to actual variable.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EvidenceCertainty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Assessment of certainty, confidence in the estimates, or quality of the evidence."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Footnotes and/or explanatory notes.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Aspect of certainty being rated.'
    rater: Optional_['string'] = Field(default=None)
    'Individual or group who did the rating.'
    rating: Optional_['CodeableConcept'] = Field(default=None)
    'Assessment or judgement of the aspect.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'Textual description of certainty.'
    subcomponent: Sequence_['EvidenceCertainty'] = Field(default_factory=list)
    'A domain or subdomain of certainty.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EvidenceStatistic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Values and parameters for a single statistic."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Footnotes and/or explanatory notes.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'When the measured variable is handled categorically, the category element is used to define which category the statistic is reporting.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'Statistic value.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sampleSize: Optional_['EvidenceStatisticSampleSize'] = Field(default=None)
    'Number of samples in the statistic.'
    description: Optional_['markdown'] = Field(default=None)
    'A description of the content value of the statistic.'
    statisticType: Optional_['CodeableConcept'] = Field(default=None)
    'Type of statistic, e.g., relative risk.'
    numberOfEvents: Optional_['unsignedInt'] = Field(default=None)
    'The number of events associated with the statistic, where the unit of analysis is different from numberAffected, sampleSize.knownDataCount and sampleSize.numberOfParticipants.'
    numberAffected: Optional_['unsignedInt'] = Field(default=None)
    'The number of participants affected where the unit of analysis is the same as sampleSize.knownDataCount and sampleSize.numberOfParticipants.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    attributeEstimate: Sequence_['EvidenceStatisticAttributeEstimate'] = Field(default_factory=list)
    'A statistical attribute of the statistic such as a measure of heterogeneity.'
    modelCharacteristic: Sequence_['EvidenceStatisticModelCharacteristic'] = Field(default_factory=list)
    'A component of the method to generate the statistic.'


class EvidenceStatisticModelCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A component of the method to generate the statistic."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Description of a component of the method to generate the statistic.'
    value: Optional_['Quantity'] = Field(default=None)
    'Further specification of the quantified value of the component of the method to generate the statistic.'
    variable: Sequence_['EvidenceStatisticModelCharacteristicVariable'] = Field(default_factory=list)
    'A variable adjusted for in the adjusted analysis.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    attributeEstimate: Sequence_['EvidenceStatisticAttributeEstimate'] = Field(default_factory=list)
    'An attribute of the statistic used as a model characteristic.'


class EvidenceStatisticModelCharacteristicVariable(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A variable adjusted for in the adjusted analysis."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    handling: Optional_['code'] = Field(default=None)
    'How the variable is classified for use in adjusted analysis.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    valueRange: Sequence_['Range'] = Field(default_factory=list)
    'Range of values for grouping of ordinal or polychotomous variables.'
    valueCategory: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Description for grouping of ordinal or polychotomous variables.'
    valueQuantity: Sequence_['Quantity'] = Field(default_factory=list)
    'Discrete value for grouping of ordinal or polychotomous variables.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    variableDefinition: 'Reference' = Field(default=...)
    'Description of the variable.'


class EvidenceStatisticAttributeEstimate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A statistical attribute of the statistic such as a measure of heterogeneity."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Footnote or explanatory note about the estimate.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of attribute estimate, e.g., confidence interval or p value.'
    level: Optional_['decimal'] = Field(default=None)
    'Use 95 for a 95% confidence interval.'
    range: Optional_['Range'] = Field(default=None)
    'Lower bound of confidence interval.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The singular quantity of the attribute estimate, for attribute estimates represented as single values; also used to report unit of measure.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'Human-readable summary of the estimate.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    attributeEstimate: Sequence_['EvidenceStatisticAttributeEstimate'] = Field(default_factory=list)
    'A nested attribute estimate; which is the attribute estimate of an attribute estimate.'


class EvidenceStatisticSampleSize(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Number of samples in the statistic."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Footnote or explanatory note about the sample size.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'Human-readable summary of population sample size.'
    knownDataCount: Optional_['unsignedInt'] = Field(default=None)
    'Number of participants with known results for measured variables.'
    numberOfStudies: Optional_['unsignedInt'] = Field(default=None)
    'Number of participants in the population.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    numberOfParticipants: Optional_['unsignedInt'] = Field(default=None)
    'A human-readable string to clarify or explain concepts about the sample size.'


class Evidence(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence."""
    resourceType: Literal_['Evidence'] = Field(default=...)
    'Single evidence bit'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Footnotes and/or explanatory notes.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the summary.'
    status: 'code' = Field(default=...)
    'The status of this summary. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual, organization, or device primarily involved in the creation and maintenance of the content.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual, organization, or device primarily responsible for internal coherence of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the summary when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the summary author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this Evidence is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual, organization, or device primarily responsible for review of some aspect of the content.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual, organization, or device responsible for officially endorsing the content for use in some setting.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    citeAsReference: Optional_['Reference'] = Field(default=None)
    'Citation Resource or display of suggested citation for this evidence.'
    citeAsMarkdown: Optional_['markdown'] = Field(default=None)
    'Citation Resource or display of suggested citation for this evidence.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the evidence.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the Evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Evidence.'
    assertion: Optional_['markdown'] = Field(default=None)
    'Declarative description of the Evidence.'
    statistic: Sequence_['EvidenceStatistic'] = Field(default_factory=list)
    'Values and parameters for a single statistic.'
    certainty: Sequence_['EvidenceCertainty'] = Field(default_factory=list)
    'Assessment of certainty, confidence in the estimates, or quality of the evidence.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this summary when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the evidence from a consumer's perspective."
    studyDesign: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The design of the study that produced this evidence. The design is described with any number of study design characteristics.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    synthesisType: Optional_['CodeableConcept'] = Field(default=None)
    'The method to combine studies.'
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Link or citation to artifact associated with the summary.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    variableDefinition: Sequence_['EvidenceVariableDefinition'] = Field(default=...)
    'Evidence variable such as population, exposure, or outcome.'
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the summary was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the summary changes.'


class EvidenceReportRelatesTo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Relationships that this composition has with other compositions or documents that already exist."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    target: 'EvidenceReportRelatesToTarget' = Field(default=...)
    'The target composition/document of this relationship.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'The type of relationship that this composition has with anther composition or document.'


class EvidenceReportRelatesToTarget(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The target composition/document of this relationship."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    url: Optional_['uri'] = Field(default=None)
    'Target of the relationship URL.'
    display: Optional_['markdown'] = Field(default=None)
    'Target of the relationship Display.'
    resource: Optional_['Reference'] = Field(default=None)
    'Target of the relationship Resource reference.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Target of the relationship Identifier.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EvidenceReportSection(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The root of the sections that make up the composition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is peferred to contain sufficient detail to make it acceptable for a human to just read the narrative.'
    mode: Optional_['code'] = Field(default=None)
    'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.'
    title: Optional_['string'] = Field(default=None)
    'The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.'
    focus: Optional_['CodeableConcept'] = Field(default=None)
    'A code identifying the kind of content contained within the section. This should be consistent with the section title.'
    author: Sequence_['Reference'] = Field(default_factory=list)
    'Identifies who is responsible for the information in this section, not necessarily who typed it in.'
    section: Sequence_['EvidenceReportSection'] = Field(default_factory=list)
    'A nested sub-section within this section.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    orderedBy: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies the order applied to the items in the section entries.'
    emptyReason: Optional_['CodeableConcept'] = Field(default=None)
    'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.'
    entryQuantity: Sequence_['Quantity'] = Field(default_factory=list)
    'Quantity as content.'
    focusReference: Optional_['Reference'] = Field(default=None)
    'A definitional Resource identifying the kind of content contained within the section. This should be consistent with the section title.'
    entryReference: Sequence_['Reference'] = Field(default_factory=list)
    'A reference to the actual resource from which the narrative in the section is derived.'
    entryClassifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Specifies any type of classification of the evidence report.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EvidenceReportSubject(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies the subject or focus of the report. Answers "What is this report about?"."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Used for general notes and annotations not coded elsewhere.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    characteristic: Sequence_['EvidenceReportSubjectCharacteristic'] = Field(default_factory=list)
    'Characteristic.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EvidenceReportSubjectCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Characteristic."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Characteristic code.'
    period: Optional_['Period'] = Field(default=None)
    'Timeframe for the characteristic.'
    exclude: Optional_['boolean'] = Field(default=None)
    'Is used to express not the characteristic.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'Characteristic value.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Characteristic value.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Characteristic value.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Characteristic value.'
    valueRange: Optional_['Range'] = Field(default=None)
    'Characteristic value.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EvidenceReport(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts."""
    resourceType: Literal_['EvidenceReport'] = Field(default=...)
    'A EvidenceReport'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies the kind of report, such as grouping of classifiers, search results, or human-compiled expression.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Used for footnotes and annotations.'
    status: 'code' = Field(default=...)
    'The status of this summary. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual, organization, or device primarily involved in the creation and maintenance of the content.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual, organization, or device primarily responsible for internal coherence of the content.'
    subject: 'EvidenceReportSubject' = Field(default=...)
    'Specifies the subject or focus of the report. Answers "What is this report about?".'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    section: Sequence_['EvidenceReportSection'] = Field(default_factory=list)
    'The root of the sections that make up the composition.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual, organization, or device primarily responsible for review of some aspect of the content.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual, organization, or device responsible for officially endorsing the content for use in some setting.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    citeAsReference: Optional_['Reference'] = Field(default=None)
    'Citation Resource or display of suggested citation for this report.'
    citeAsMarkdown: Optional_['markdown'] = Field(default=None)
    'Citation Resource or display of suggested citation for this report.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the evidence report.'
    relatesTo: Sequence_['EvidenceReportRelatesTo'] = Field(default_factory=list)
    'Relationships that this composition has with other compositions or documents that already exist.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence report instances.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this EvidenceReport when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Link, description or reference to artifact associated with the report.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    relatedIdentifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify things closely related to this EvidenceReport.'


class EvidenceVariableCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A defining factor of the EvidenceVariable. Multiple characteristics are applied with "and" semantics."""
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'A human-readable string to clarify or explain concepts about the characteristic.'
    linkId: Optional_['id'] = Field(default=None)
    'Label used for when a characteristic refers to another characteristic.'
    exclude: Optional_['boolean'] = Field(default=None)
    'When true, this characteristic is an exclusion criterion. In other words, not matching this characteristic definition is equivalent to meeting this criterion.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.'
    durationQuantity: Optional_['Quantity'] = Field(default=None)
    'Length of time in which the characteristic is met.'
    durationRange: Optional_['Range'] = Field(default=None)
    'Length of time in which the characteristic is met.'
    definitionId: Optional_['id'] = Field(default=None)
    'Defines the characteristic using id.'
    instancesQuantity: Optional_['Quantity'] = Field(default=None)
    'Number of occurrences meeting the characteristic.'
    instancesRange: Optional_['Range'] = Field(default=None)
    'Number of occurrences meeting the characteristic.'
    timeFromEvent: Sequence_['EvidenceVariableCharacteristicTimeFromEvent'] = Field(default_factory=list)
    'Timing in which the characteristic is determined.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    definitionReference: Optional_['Reference'] = Field(default=None)
    'Defines the characteristic using a Reference.'
    definitionCanonical: Optional_['canonical'] = Field(default=None)
    'Defines the characteristic using Canonical.'
    definitionExpression: Optional_['Expression'] = Field(default=None)
    'Defines the characteristic using Expression.'
    definitionByCombination: Optional_['EvidenceVariableCharacteristicDefinitionByCombination'] = Field(default=None)
    'Defines the characteristic as a combination of two or more characteristics.'
    definitionByTypeAndValue: Optional_['EvidenceVariableCharacteristicDefinitionByTypeAndValue'] = Field(default=None)
    'Defines the characteristic using both a type and value[x] elements.'
    definitionCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Defines the characteristic using CodeableConcept.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class EvidenceVariableCharacteristicDefinitionByTypeAndValue(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines the characteristic using both a type and value[x] elements."""
    type: 'CodeableConcept' = Field(default=...)
    'Used to express the type of characteristic.'
    method: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Method for how the characteristic value was determined.'
    device: Optional_['Reference'] = Field(default=None)
    'Device used for determining characteristic.'
    offset: Optional_['CodeableConcept'] = Field(default=None)
    'Defines the reference point for comparison when valueQuantity or valueRange is not compared to zero.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Defines the characteristic when paired with characteristic.type.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Defines the characteristic when paired with characteristic.type.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Defines the characteristic when paired with characteristic.type.'
    valueRange: Optional_['Range'] = Field(default=None)
    'Defines the characteristic when paired with characteristic.type.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'Defines the characteristic when paired with characteristic.type.'
    valueId: Optional_['id'] = Field(default=None)
    'Defines the characteristic when paired with characteristic.type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class EvidenceVariableCharacteristicDefinitionByCombination(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines the characteristic as a combination of two or more characteristics."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    threshold: Optional_['positiveInt'] = Field(default=None)
    'Provides the value of "n" when "at-least" or "at-most" codes are used.'
    characteristic: Sequence_['EvidenceVariableCharacteristic'] = Field(default=...)
    'A defining factor of the characteristic.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'Used to specify if two or more characteristics are combined with OR or AND.'


class EvidenceVariableCharacteristicTimeFromEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Timing in which the characteristic is determined."""
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'A human-readable string to clarify or explain concepts about the timeFromEvent.'
    range: Optional_['Range'] = Field(default=None)
    'Used to express the observation within a period before and/or after the event.'
    eventCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The event used as a base point (reference point) in time.'
    eventReference: Optional_['Reference'] = Field(default=None)
    'The event used as a base point (reference point) in time.'
    eventDateTime: Optional_['dateTime'] = Field(default=None)
    'The event used as a base point (reference point) in time.'
    eventId: Optional_['id'] = Field(default=None)
    'The event used as a base point (reference point) in time.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'Used to express the observation at a defined amount of time before or after the event.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'Human readable description.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class EvidenceVariableCategory(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A grouping for ordinal or polychotomous variables."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'Description of the grouping.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Definition of the grouping.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Definition of the grouping.'
    valueRange: Optional_['Range'] = Field(default=None)
    'Definition of the grouping.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class EvidenceVariable(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The EvidenceVariable resource describes an element that knowledge (Evidence) is about."""
    resourceType: Literal_['EvidenceVariable'] = Field(default=...)
    'A definition of an exposure, outcome, or other variable'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'A human-readable string to clarify or explain concepts about the resource.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the evidence variable.'
    status: 'code' = Field(default=...)
    'The status of this evidence variable. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the content.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the content.'
    actual: Optional_['boolean'] = Field(default=None)
    'True if the actual variable measured, false if a conceptual representation of the intended variable.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this EvidenceVariable is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.'
    handling: Optional_['code'] = Field(default=None)
    'The method of handling in statistical analysis.'
    category: Sequence_['EvidenceVariableCategory'] = Field(default_factory=list)
    'A grouping for ordinal or polychotomous variables.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the evidence variable.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the resource and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the resource.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    shortTitle: Optional_['string'] = Field(default=None)
    'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the evidence variable from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.\n\nSee guidance around (not) making local changes to elements [here](canonicalresource.html#localization).'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    characteristic: Sequence_['EvidenceVariableCharacteristic'] = Field(default_factory=list)
    'A defining factor of the EvidenceVariable. Multiple characteristics are applied with "and" semantics.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the resource content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, or bibliographic references.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the evidence variable was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes.'


class ExampleScenarioInstance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A single data collection that is shared as part of the scenario."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    key: 'string' = Field(default=...)
    'A unique string within the scenario that is used to reference the instance.'
    title: 'string' = Field(default=...)
    'A short descriptive label the instance to be used in tables or diagrams.'
    content: Optional_['Reference'] = Field(default=None)
    'Points to an instance (typically an example) that shows the data that would corespond to this instance.'
    version: Sequence_['ExampleScenarioInstanceVersion'] = Field(default_factory=list)
    'Represents the instance as it was at a specific time-point.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    "An explanation of what the instance contains and what it's for."
    structureType: 'Coding' = Field(default=...)
    'A code indicating the kind of data structure (FHIR resource or some other standard) this is an instance of.'
    structureVersion: Optional_['string'] = Field(default=None)
    'Conveys the version of the data structure instantiated.  I.e. what release of FHIR, X12, OpenEHR, etc. is instance compliant with.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    containedInstance: Sequence_['ExampleScenarioInstanceContainedInstance'] = Field(default_factory=list)
    'References to other instances that can be found within this instance (e.g. the observations contained in a bundle).'
    structureProfileCanonical: Optional_['canonical'] = Field(default=None)
    'Refers to a profile, template or other ruleset the instance adheres to.'
    structureProfileUri: Optional_['uri'] = Field(default=None)
    'Refers to a profile, template or other ruleset the instance adheres to.'


class ExampleScenarioInstanceContainedInstance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """References to other instances that can be found within this instance (e.g. the observations contained in a bundle)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    versionReference: Optional_['string'] = Field(default=None)
    'A reference to the key of a specific version of an instance in this instance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instanceReference: 'string' = Field(default=...)
    'A reference to the key of an instance found within this one.'


class ExampleScenarioInstanceVersion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Represents the instance as it was at a specific time-point."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    key: 'string' = Field(default=...)
    'A unique string within the instance that is used to reference the version of the instance.'
    title: 'string' = Field(default=...)
    'A short descriptive label the version to be used in tables or diagrams.'
    content: Optional_['Reference'] = Field(default=None)
    'Points to an instance (typically an example) that shows the data that would flow at this point in the scenario.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'An explanation of what this specific version of the instance contains and represents.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExampleScenarioProcess(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A group of operations that represents a significant step within a scenario."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    step: Sequence_['ExampleScenarioProcessStep'] = Field(default_factory=list)
    'A significant action that occurs as part of the process.'
    title: 'string' = Field(default=...)
    'A short descriptive label the process to be used in tables or diagrams.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'An explanation of what the process represents and what it does.'
    preConditions: Optional_['markdown'] = Field(default=None)
    'Description of the initial state of the actors, environment and data before the process starts.'
    postConditions: Optional_['markdown'] = Field(default=None)
    'Description of the final state of the actors, environment and data after the process has been successfully completed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExampleScenarioProcessStep(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A significant action that occurs as part of the process."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    pause: Optional_['boolean'] = Field(default=None)
    'If true, indicates that, following this step, there is a pause in the flow and the subsequent step will occur at some later time (triggered by some event).'
    number: Optional_['string'] = Field(default=None)
    'The sequential number of the step, e.g. 1.2.5.'
    process: Optional_['ExampleScenarioProcess'] = Field(default=None)
    'Indicates that the step is a complex sub-process with its own steps.'
    workflow: Optional_['canonical'] = Field(default=None)
    'Indicates that the step is defined by a seaparate scenario instance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Optional_['ExampleScenarioProcessStepOperation'] = Field(default=None)
    'The step represents a single operation invoked on receiver by sender.'
    alternative: Sequence_['ExampleScenarioProcessStepAlternative'] = Field(default_factory=list)
    'Indicates an alternative step that can be taken instead of the sub-process, scenario or operation.  E.g. to represent non-happy-path/exceptional/atypical circumstances.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExampleScenarioProcessStepAlternative(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates an alternative step that can be taken instead of the sub-process, scenario or operation.  E.g. to represent non-happy-path/exceptional/atypical circumstances."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    step: Sequence_['ExampleScenarioProcessStep'] = Field(default_factory=list)
    'Indicates the operation, sub-process or scenario that happens if the alternative option is selected.'
    title: 'string' = Field(default=...)
    'The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'A human-readable description of the alternative explaining when the alternative should occur rather than the base step.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExampleScenarioProcessStepOperation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The step represents a single operation invoked on receiver by sender."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['Coding'] = Field(default=None)
    'The standardized type of action (FHIR or otherwise).'
    title: 'string' = Field(default=...)
    'A short descriptive label the step to be used in tables or diagrams.'
    request: Optional_['ExampleScenarioInstanceContainedInstance'] = Field(default=None)
    'A reference to the instance that is transmitted from requester to receiver as part of the invocation of the operation.'
    receiver: Optional_['string'] = Field(default=None)
    'The system on which the action is invoked/receives the data.'
    response: Optional_['ExampleScenarioInstanceContainedInstance'] = Field(default=None)
    "A reference to the instance that is transmitted from receiver to requester as part of the operation's synchronous response (if any)."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    initiator: Optional_['string'] = Field(default=None)
    'The system that invokes the action/transmits the data.'
    description: Optional_['markdown'] = Field(default=None)
    'An explanation of what the operation represents and what it does.'
    receiverActive: Optional_['boolean'] = Field(default=None)
    'If false, the receiver is deactivated right after the operation.'
    initiatorActive: Optional_['boolean'] = Field(default=None)
    'If false, the initiator is deactivated right after the operation.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExampleScenarioActor(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A system or person who shares or receives an instance within the scenario."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    key: 'string' = Field(default=...)
    'A unique string within the scenario that is used to reference the actor.'
    type: 'code' = Field(default=...)
    'The category of actor - person or system.'
    title: 'string' = Field(default=...)
    'The human-readable name for the actor used when rendering the scenario.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'An explanation of who/what the actor is and its role in the scenario.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExampleScenario(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Example of workflow instance."""
    resourceType: Literal_['ExampleScenario'] = Field(default=...)
    'Example of workflow instance'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'Temporarily retained for tooling purposes.'
    date: Optional_['dateTime'] = Field(default=None)
    "The date  (and optionally time) when the example scenario was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition')."
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the ExampleScenario.'
    actor: Sequence_['ExampleScenarioActor'] = Field(default_factory=list)
    'A system or person who shares or receives an instance within the scenario.'
    status: 'code' = Field(default=...)
    'The status of this example scenario. Enables tracking the life-cycle of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.'
    process: Sequence_['ExampleScenarioProcess'] = Field(default_factory=list)
    'A group of operations that represents a significant step within a scenario.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    instance: Sequence_['ExampleScenarioInstance'] = Field(default_factory=list)
    'A single data collection that is shared as part of the scenario.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the example scenario.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the ExampleScenario from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the example scenario is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'


class ExplanationOfBenefitBenefitBalance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Balance by Benefit Category."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'A short name or tag for the benefit.'
    unit: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates if the benefits apply to an individual or to the family.'
    term: Optional_['CodeableConcept'] = Field(default=None)
    "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'."
    network: Optional_['CodeableConcept'] = Field(default=None)
    'Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.'
    category: 'CodeableConcept' = Field(default=...)
    'Code to identify the general type of benefits under which products and services are provided.'
    excluded: Optional_['boolean'] = Field(default=None)
    'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    financial: Sequence_['ExplanationOfBenefitBenefitBalanceFinancial'] = Field(default_factory=list)
    'Benefits Used to date.'
    description: Optional_['string'] = Field(default=None)
    'A richer description of the benefit or services covered.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitBenefitBalanceFinancial(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Benefits Used to date."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Classification of benefit being provided.'
    usedUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The quantity of the benefit which have been consumed to date.'
    usedMoney: Optional_['Money'] = Field(default=None)
    'The quantity of the benefit which have been consumed to date.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    allowedUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The quantity of the benefit which is permitted under the coverage.'
    allowedString: Optional_['string'] = Field(default=None)
    'The quantity of the benefit which is permitted under the coverage.'
    allowedMoney: Optional_['Money'] = Field(default=None)
    'The quantity of the benefit which is permitted under the coverage.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitSupportingInfo(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.'
    reason: Optional_['Coding'] = Field(default=None)
    'Provides the reason in the situation where a reason code is required in addition to the content.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify supporting information entries.'
    category: 'CodeableConcept' = Field(default=...)
    'The general class of the information supplied: information; exception; accident, employment; onset, etc.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueString: Optional_['string'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    timingDate: Optional_['date'] = Field(default=None)
    'The date when or period to which this information refers.'
    timingPeriod: Optional_['Period'] = Field(default=None)
    'The date when or period to which this information refers.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitProcessNote(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A note that describes or explains adjudication results in a human readable form."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The business purpose of the note text.'
    text: Optional_['string'] = Field(default=None)
    'The explanation or description associated with the processing.'
    number: Optional_['positiveInt'] = Field(default=None)
    'A number to uniquely identify a note entry.'
    language: Optional_['CodeableConcept'] = Field(default=None)
    'A code to define the language used in the text of the note.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitInsurance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Financial instruments for reimbursement for the health care products and services specified on the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    focal: 'boolean' = Field(default=...)
    'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.'
    coverage: 'Reference' = Field(default=...)
    "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preAuthRef: Sequence_['string'] = Field(default_factory=list)
    'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitProcedure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Procedures performed on the patient relevant to the billing items with the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    udi: Sequence_['Reference'] = Field(default_factory=list)
    'Unique Device Identifiers associated with this line item.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'When the condition was observed or the relative ranking.'
    date: Optional_['dateTime'] = Field(default=None)
    'Date and optionally time the procedure was performed.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify procedure entries.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    procedureCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The code or reference to a Procedure resource which identifies the clinical intervention performed.'
    procedureReference: Optional_['Reference'] = Field(default=None)
    'The code or reference to a Procedure resource which identifies the clinical intervention performed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitDiagnosis(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about diagnoses relevant to the claim items."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'When the condition was observed or the relative ranking.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify diagnosis entries.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    onAdmission: Optional_['CodeableConcept'] = Field(default=None)
    'Indication of whether the diagnosis was present on admission to a facility.'
    diagnosisCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The nature of illness or problem in a coded form or as a reference to an external defined Condition.'
    diagnosisReference: Optional_['Reference'] = Field(default=None)
    'The nature of illness or problem in a coded form or as a reference to an external defined Condition.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitAccident(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details of a accident which resulted in injuries which required the products and services listed in the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    locationAddress: Optional_['Address'] = Field(default=None)
    'The physical location of the accident event.'
    locationReference: Optional_['Reference'] = Field(default=None)
    'The physical location of the accident event.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    date: Optional_['date'] = Field(default=None)
    'Date of an accident event  related to the products and services contained in the claim.'


class ExplanationOfBenefitCareTeam(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The members of the team who provided the products and services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify care team entries.'
    provider: 'Reference' = Field(default=...)
    'Member of the team who provided the product or service.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specialty: Optional_['CodeableConcept'] = Field(default=None)
    'The specialization of the practitioner or provider which is applicable for this service.'
    responsible: Optional_['boolean'] = Field(default=None)
    'The party who is billing and/or responsible for the claimed products or services.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitPayment(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Payment details for the adjudication of the claim."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Whether this represents partial or complete payment of the benefits payable.'
    amount: Optional_['Money'] = Field(default=None)
    'Benefits payable less any payment adjustment.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    adjustment: Optional_['Money'] = Field(default=None)
    "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication."
    identifier: Optional_['Identifier'] = Field(default=None)
    "Issuer's unique identifier for the payment instrument."
    adjustmentReason: Optional_['CodeableConcept'] = Field(default=None)
    'Reason for the payment adjustment.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    date: Optional_['date'] = Field(default=None)
    'Estimated date the payment will be issued or the actual issue date of payment.'


class ExplanationOfBenefitAddItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The first-tier service adjudications for payor added product or service lines."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    detail: Sequence_['ExplanationOfBenefitAddItemDetail'] = Field(default_factory=list)
    'The second-tier service adjudications for payor added services.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    request: Sequence_['Reference'] = Field(default_factory=list)
    'Request or Referral for Goods or Service to be rendered.'
    provider: Sequence_['Reference'] = Field(default_factory=list)
    'The providers who are authorized for the services rendered to the patient.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    bodySite: Sequence_['ExplanationOfBenefitAddItemBodySite'] = Field(default_factory=list)
    'Physical location where the service is performed or applies.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    programCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the program under which this may be recovered.'
    servicedDate: Optional_['date'] = Field(default=None)
    'The date or dates when the service or product was supplied, performed or completed.'
    servicedPeriod: Optional_['Period'] = Field(default=None)
    'The date or dates when the service or product was supplied, performed or completed.'
    locationCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Where the product or service was provided.'
    locationAddress: Optional_['Address'] = Field(default=None)
    'Where the product or service was provided.'
    locationReference: Optional_['Reference'] = Field(default=None)
    'Where the product or service was provided.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    itemSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Claim items which this service line is intended to replace.'
    adjudication: Sequence_['ExplanationOfBenefitItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ExplanationOfBenefitItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    detailSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'The sequence number of the details within the claim item which this line is intended to replace.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    subDetailSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.'
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ExplanationOfBenefitAddItemBodySite(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Physical location where the service is performed or applies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    site: Sequence_['CodeableReference'] = Field(default=...)
    'Physical service site on the patient (limb, tooth, etc.).'
    subSite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A region or surface of the bodySite, e.g. limb region or tooth surface(s).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitAddItemDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The second-tier service adjudications for payor added services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    subDetail: Sequence_['ExplanationOfBenefitAddItemDetailSubDetail'] = Field(default_factory=list)
    'The third-tier service adjudications for payor added services.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    adjudication: Sequence_['ExplanationOfBenefitItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ExplanationOfBenefitItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ExplanationOfBenefitAddItemDetailSubDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The third-tier service adjudications for payor added services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    adjudication: Sequence_['ExplanationOfBenefitItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ExplanationOfBenefitItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ExplanationOfBenefitRelated(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Other claims which are related to this claim such as prior submissions or claims for related services or for the same event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    claim: Optional_['Reference'] = Field(default=None)
    'Reference to a related claim.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['Identifier'] = Field(default=None)
    'An alternate organizational reference to the case or file to which this particular claim pertains.'
    relationship: Optional_['CodeableConcept'] = Field(default=None)
    'A code to convey how the claims are related.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitTotal(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Categorized monetary totals for the adjudication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    amount: 'Money' = Field(default=...)
    'Monetary total amount associated with the category.'
    category: 'CodeableConcept' = Field(default=...)
    'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitPayee(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The party to be reimbursed for cost of the products and services according to the terms of the policy."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of Party to be reimbursed: Subscriber, provider, other.'
    party: Optional_['Reference'] = Field(default=None)
    'Reference to the individual or organization to whom any payment will be made.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information code for an event with a corresponding date or period."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A coded event such as when a service is expected or a card printed.'
    whenDateTime: Optional_['dateTime'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    whenPeriod: Optional_['Period'] = Field(default=None)
    'A date or period in the past or future indicating when the event occurred or is expectd to occur.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.'
    udi: Sequence_['Reference'] = Field(default_factory=list)
    'Unique Device Identifiers associated with this line item.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    detail: Sequence_['ExplanationOfBenefitItemDetail'] = Field(default_factory=list)
    'Second-tier of goods and services.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    request: Sequence_['Reference'] = Field(default_factory=list)
    'Request or Referral for Goods or Service to be rendered.'
    sequence: 'positiveInt' = Field(default=...)
    'A number to uniquely identify item entries.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    bodySite: Sequence_['ExplanationOfBenefitItemBodySite'] = Field(default_factory=list)
    'Physical location where the service is performed or applies.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    encounter: Sequence_['Reference'] = Field(default_factory=list)
    'Healthcare encounters related to this claim.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    programCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the program under which this may be recovered.'
    servicedDate: Optional_['date'] = Field(default=None)
    'The date or dates when the service or product was supplied, performed or completed.'
    servicedPeriod: Optional_['Period'] = Field(default=None)
    'The date or dates when the service or product was supplied, performed or completed.'
    locationCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Where the product or service was provided.'
    locationAddress: Optional_['Address'] = Field(default=None)
    'Where the product or service was provided.'
    locationReference: Optional_['Reference'] = Field(default=None)
    'Where the product or service was provided.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    adjudication: Sequence_['ExplanationOfBenefitItemAdjudication'] = Field(default_factory=list)
    'If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.'
    reviewOutcome: Optional_['ExplanationOfBenefitItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    careTeamSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Care team members related to this service or product.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    diagnosisSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Diagnoses applicable for this service or product.'
    procedureSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Procedures applicable for this service or product.'
    informationSequence: Sequence_['positiveInt'] = Field(default_factory=list)
    'Exceptions, special conditions and supporting information applicable for this service or product.'
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ExplanationOfBenefitItemReviewOutcome(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The high-level results of the adjudication if adjudication has been performed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    reason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The reasons for the result of the claim, predetermination, or preauthorization adjudication.'
    decision: Optional_['CodeableConcept'] = Field(default=None)
    'The result of the claim, predetermination, or preauthorization adjudication.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preAuthRef: Optional_['string'] = Field(default=None)
    'Reference from the Insurer which is used in later communications which refers to this adjudication.'
    preAuthPeriod: Optional_['Period'] = Field(default=None)
    'The time frame during which this authorization is effective.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitItemAdjudication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    reason: Optional_['CodeableConcept'] = Field(default=None)
    'A code supporting the understanding of the adjudication result and explaining variance from expected amount.'
    amount: Optional_['Money'] = Field(default=None)
    'Monetary amount associated with the category.'
    category: 'CodeableConcept' = Field(default=...)
    'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'A non-monetary value associated with the category. Mutually exclusive to the amount element above.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitItemBodySite(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Physical location where the service is performed or applies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    site: Sequence_['CodeableReference'] = Field(default=...)
    'Physical service site on the patient (limb, tooth, etc.).'
    subSite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A region or surface of the bodySite, e.g. limb region or tooth surface(s).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ExplanationOfBenefitItemDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Second-tier of goods and services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.'
    udi: Sequence_['Reference'] = Field(default_factory=list)
    'Unique Device Identifiers associated with this line item.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    sequence: 'positiveInt' = Field(default=...)
    "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items."
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    subDetail: Sequence_['ExplanationOfBenefitItemDetailSubDetail'] = Field(default_factory=list)
    'Third-tier of goods and services.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    programCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the program under which this may be recovered.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    adjudication: Sequence_['ExplanationOfBenefitItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ExplanationOfBenefitItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ExplanationOfBenefitItemDetailSubDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Third-tier of goods and services."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    tax: Optional_['Money'] = Field(default=None)
    'The total of taxes applicable for this product or service.'
    net: Optional_['Money'] = Field(default=None)
    'The total amount claimed for the line item.detail.subDetail. Net = unit price * quantity * factor.'
    udi: Sequence_['Reference'] = Field(default_factory=list)
    'Unique Device Identifiers associated with this line item.'
    factor: Optional_['decimal'] = Field(default=None)
    'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.'
    revenue: Optional_['CodeableConcept'] = Field(default=None)
    'The type of revenue or cost center providing the product and/or service.'
    sequence: 'positiveInt' = Field(default=...)
    "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items."
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Code to identify the general type of benefits under which products and services are provided.'
    modifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Item typification or modifiers codes to convey additional context for the product or service.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The number of repetitions of a service or product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    unitPrice: Optional_['Money'] = Field(default=None)
    'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.'
    noteNumber: Sequence_['positiveInt'] = Field(default_factory=list)
    'The numbers associated with notes below which apply to the adjudication of this item.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    programCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the program under which this may be recovered.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    adjudication: Sequence_['ExplanationOfBenefitItemAdjudication'] = Field(default_factory=list)
    'The adjudication results.'
    reviewOutcome: Optional_['ExplanationOfBenefitItemReviewOutcome'] = Field(default=None)
    'The high-level results of the adjudication if adjudication has been performed.'
    productOrService: Optional_['CodeableConcept'] = Field(default=None)
    'When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    productOrServiceEnd: Optional_['CodeableConcept'] = Field(default=None)
    'This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.'


class ExplanationOfBenefit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."""
    resourceType: Literal_['ExplanationOfBenefit'] = Field(default=...)
    'Explanation of Benefit resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    use: 'code' = Field(default=...)
    "A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided."
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'CodeableConcept' = Field(default=...)
    'The category of claim, e.g. oral, pharmacy, vision, institutional, professional.'
    item: Sequence_['ExplanationOfBenefitItem'] = Field(default_factory=list)
    "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details."
    form: Optional_['Attachment'] = Field(default=None)
    'The actual form, by reference or inclusion, for printing the content or an EOB.'
    event: Sequence_['ExplanationOfBenefitEvent'] = Field(default_factory=list)
    'Information code for an event with a corresponding date or period.'
    payee: Optional_['ExplanationOfBenefitPayee'] = Field(default=None)
    'The party to be reimbursed for cost of the products and services according to the terms of the policy.'
    claim: Optional_['Reference'] = Field(default=None)
    'The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.'
    total: Sequence_['ExplanationOfBenefitTotal'] = Field(default_factory=list)
    'Categorized monetary totals for the adjudication.'
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    subType: Optional_['CodeableConcept'] = Field(default=None)
    'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.'
    patient: 'Reference' = Field(default=...)
    'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.'
    created: 'dateTime' = Field(default=...)
    'The date this resource was created.'
    enterer: Optional_['Reference'] = Field(default=None)
    'Individual who created the claim, predetermination or preauthorization.'
    insurer: Optional_['Reference'] = Field(default=None)
    'The party responsible for authorization, adjudication and reimbursement.'
    related: Sequence_['ExplanationOfBenefitRelated'] = Field(default_factory=list)
    'Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.'
    outcome: 'code' = Field(default=...)
    'The outcome of the claim, predetermination, or preauthorization processing.'
    addItem: Sequence_['ExplanationOfBenefitAddItem'] = Field(default_factory=list)
    'The first-tier service adjudications for payor added product or service lines.'
    payment: Optional_['ExplanationOfBenefitPayment'] = Field(default=None)
    'Payment details for the adjudication of the claim.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    provider: Optional_['Reference'] = Field(default=None)
    'The provider which is responsible for the claim, predetermination or preauthorization.'
    priority: Optional_['CodeableConcept'] = Field(default=None)
    'The provider-required urgency of processing the request. Typical values include: stat, normal deferred.'
    referral: Optional_['Reference'] = Field(default=None)
    'The referral information received by the claim author, it is not to be used when the author generates a referral for a patient. A copy of that referral may be provided as supporting information. Some insurers require proof of referral to pay for services or to pay specialist rates for services.'
    facility: Optional_['Reference'] = Field(default=None)
    'Facility where the services were provided.'
    decision: Optional_['CodeableConcept'] = Field(default=None)
    'The result of the claim, predetermination, or preauthorization adjudication.'
    careTeam: Sequence_['ExplanationOfBenefitCareTeam'] = Field(default_factory=list)
    'The members of the team who provided the products and services.'
    accident: Optional_['ExplanationOfBenefitAccident'] = Field(default=None)
    'Details of a accident which resulted in injuries which required the products and services listed in the claim.'
    formCode: Optional_['CodeableConcept'] = Field(default=None)
    'A code for the form to be used for printing the content.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Sequence_['Reference'] = Field(default_factory=list)
    'Healthcare encounters related to this claim.'
    diagnosis: Sequence_['ExplanationOfBenefitDiagnosis'] = Field(default_factory=list)
    'Information about diagnoses relevant to the claim items.'
    procedure: Sequence_['ExplanationOfBenefitProcedure'] = Field(default_factory=list)
    'Procedures performed on the patient relevant to the billing items with the claim.'
    insurance: Sequence_['ExplanationOfBenefitInsurance'] = Field(default_factory=list)
    'Financial instruments for reimbursement for the health care products and services specified on the claim.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this explanation of benefit.'
    preAuthRef: Sequence_['string'] = Field(default_factory=list)
    'Reference from the Insurer which is used in later communications which refers to this adjudication.'
    precedence: Optional_['positiveInt'] = Field(default=None)
    'This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.'
    traceNumber: Sequence_['Identifier'] = Field(default_factory=list)
    'Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.'
    disposition: Optional_['string'] = Field(default=None)
    'A human readable description of the status of the adjudication.'
    patientPaid: Optional_['Money'] = Field(default=None)
    'The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.'
    processNote: Sequence_['ExplanationOfBenefitProcessNote'] = Field(default_factory=list)
    'A note that describes or explains adjudication results in a human readable form.'
    fundsReserve: Optional_['CodeableConcept'] = Field(default=None)
    'A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.'
    prescription: Optional_['Reference'] = Field(default=None)
    "Prescription is the document/authorization given to the claim author for them to provide products and services for which consideration (reimbursement) is sought. Could be a RX for medications, an 'order' for oxygen or wheelchair or physiotherapy treatments."
    adjudication: Sequence_['ExplanationOfBenefitItemAdjudication'] = Field(default_factory=list)
    'The adjudication results which are presented at the header level rather than at the line-item or add-item levels.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    claimResponse: Optional_['Reference'] = Field(default=None)
    'The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.'
    benefitPeriod: Optional_['Period'] = Field(default=None)
    'The term of the benefits documented in this response.'
    billablePeriod: Optional_['Period'] = Field(default=None)
    'The period for which charges are being submitted.'
    supportingInfo: Sequence_['ExplanationOfBenefitSupportingInfo'] = Field(default_factory=list)
    'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.'
    benefitBalance: Sequence_['ExplanationOfBenefitBenefitBalance'] = Field(default_factory=list)
    'Balance by Benefit Category.'
    preAuthRefPeriod: Sequence_['Period'] = Field(default_factory=list)
    'The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    originalPrescription: Optional_['Reference'] = Field(default=None)
    'Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.'
    fundsReserveRequested: Optional_['CodeableConcept'] = Field(default=None)
    'A code to indicate whether and for whom funds are to be reserved for future claims.'
    diagnosisRelatedGroup: Optional_['CodeableConcept'] = Field(default=None)
    'A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.'


class FamilyMemberHistoryParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what participated in the activities related to the family member history and how they were involved."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'Indicates who or what participated in the activities related to the family member history.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of involvement of the actor in the activities related to the family member history.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class FamilyMemberHistoryProcedure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The significant Procedures (or procedure) that the family member had. This is a repeating section to allow a system to represent more than one procedure per resource, though there is nothing stopping multiple resources - one per procedure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'The actual procedure specified. Could be a coded procedure or a less specific string depending on how much is known about the procedure and the capabilities of the creating system.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'An area where general notes can be placed about this specific procedure.'
    outcome: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates what happened following the procedure. If the procedure resulted in death, deceased date is captured on the relation.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    performedAge: Optional_['Age'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    performedRange: Optional_['Range'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    performedPeriod: Optional_['Period'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    performedString: Optional_['string'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    performedDateTime: Optional_['dateTime'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    contributedToDeath: Optional_['boolean'] = Field(default=None)
    'This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.'


class FamilyMemberHistoryCondition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system."
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'An area where general notes can be placed about this specific condition.'
    outcome: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation.'
    onsetAge: Optional_['Age'] = Field(default=None)
    'Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.'
    onsetRange: Optional_['Range'] = Field(default=None)
    'Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.'
    onsetPeriod: Optional_['Period'] = Field(default=None)
    'Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.'
    onsetString: Optional_['string'] = Field(default=None)
    'Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    contributedToDeath: Optional_['boolean'] = Field(default=None)
    'This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.'


class FamilyMemberHistory(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Significant health conditions for a person related to the patient relevant in the context of care for the patient."""
    resourceType: Literal_['FamilyMemberHistory'] = Field(default=...)
    "Information about patient's relatives, relevant for patient"
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    sex: Optional_['CodeableConcept'] = Field(default=None)
    'The birth sex of the family member.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.'
    status: 'code' = Field(default=...)
    'A code specifying the status of the record of the family history of a specific family member.'
    ageAge: Optional_['Age'] = Field(default=None)
    'The age of the relative at the time the family member history is recorded.'
    ageRange: Optional_['Range'] = Field(default=None)
    'The age of the relative at the time the family member history is recorded.'
    ageString: Optional_['string'] = Field(default=None)
    'The age of the relative at the time the family member history is recorded.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Describes why the family member history occurred in coded or textual form, or Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.'
    patient: 'Reference' = Field(default=...)
    'The person who this history concerns.'
    bornPeriod: Optional_['Period'] = Field(default=None)
    'The actual or approximate date of birth of the relative.'
    bornDate: Optional_['date'] = Field(default=None)
    'The actual or approximate date of birth of the relative.'
    bornString: Optional_['string'] = Field(default=None)
    'The actual or approximate date of birth of the relative.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Sequence_['FamilyMemberHistoryCondition'] = Field(default_factory=list)
    'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.'
    procedure: Sequence_['FamilyMemberHistoryProcedure'] = Field(default_factory=list)
    'The significant Procedures (or procedure) that the family member had. This is a repeating section to allow a system to represent more than one procedure per resource, though there is nothing stopping multiple resources - one per procedure.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    participant: Sequence_['FamilyMemberHistoryParticipant'] = Field(default_factory=list)
    'Indicates who or what participated in the activities related to the family member history and how they were involved.'
    deceasedBoolean: Optional_['boolean'] = Field(default=None)
    'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.'
    deceasedAge: Optional_['Age'] = Field(default=None)
    'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.'
    deceasedRange: Optional_['Range'] = Field(default=None)
    'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.'
    deceasedDate: Optional_['date'] = Field(default=None)
    'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.'
    deceasedString: Optional_['string'] = Field(default=None)
    'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.'
    relationship: 'CodeableConcept' = Field(default=...)
    'The type of relationship this person has to the patient (father, mother, brother etc.).'
    estimatedAge: Optional_['boolean'] = Field(default=None)
    'If true, indicates that the age value specified is an estimated value.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.'
    dataAbsentReason: Optional_['CodeableConcept'] = Field(default=None)
    "Describes why the family member's history is not available."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and possibly time) when the family member history was recorded or last updated.'


class Flag(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Prospective warnings of potential issues when providing care to the patient."""
    resourceType: Literal_['Flag'] = Field(default=...)
    'Key information to flag to healthcare providers'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: 'code' = Field(default=...)
    'Supports basic workflow.'
    period: Optional_['Period'] = Field(default=None)
    'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.'
    author: Optional_['Reference'] = Field(default=None)
    'The person, organization or device that created the flag.'
    subject: 'Reference' = Field(default=...)
    'The patient, related person, location, group, organization, or practitioner etc. this is about record this flag is associated with.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Allows a flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'This alert is only relevant during the encounter.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'CodeableConcept' = Field(default=...)
    'The coded value or textual component of the flag to display to the user.'


class FormularyItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource describes a product or service that is available through a program and includes the conditions and constraints of availability.  All of the information in this resource is specific to the inclusion of the item in the formulary and is not inherent to the item itself."""
    resourceType: Literal_['FormularyItem'] = Field(default=...)
    'Definition of a FormularyItem'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: Optional_['code'] = Field(default=None)
    'The validity about the information of the formulary item and not of the underlying product or service itself.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for this formulary item.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code (or set of codes) that specify the product or service that is identified by this formulary item.'


class GenomicStudyAnalysis(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The details about a specific analysis that was performed in this GenomicStudy."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date of the analysis event.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Any notes capture with the analysis event.'
    title: Optional_['string'] = Field(default=None)
    'Name of the analysis event (human friendly).'
    focus: Sequence_['Reference'] = Field(default_factory=list)
    'The focus of a genomic analysis when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, child, or sibling. For example, in trio testing, the GenomicStudy.subject would be the child (proband) and the GenomicStudy.analysis.focus of a specific analysis would be the parent.'
    input: Sequence_['GenomicStudyAnalysisInput'] = Field(default_factory=list)
    'Inputs for the analysis event.'
    output: Sequence_['GenomicStudyAnalysisOutput'] = Field(default_factory=list)
    'Outputs for the analysis event.'
    device: Sequence_['GenomicStudyAnalysisDevice'] = Field(default_factory=list)
    'Devices used for the analysis (e.g., instruments, software), with settings and parameters.'
    specimen: Sequence_['Reference'] = Field(default_factory=list)
    'The specimen used in the analysis event.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    performer: Sequence_['GenomicStudyAnalysisPerformer'] = Field(default_factory=list)
    'Performer for the analysis event.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers for the analysis event.'
    methodType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Type of the methods used in the analysis, e.g., Fluorescence in situ hybridization (FISH), Karyotyping, or Microsatellite instability testing (MSI).'
    changeType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Type of the genomic changes studied in the analysis, e.g., DNA, RNA, or amino acid change.'
    genomeBuild: Optional_['CodeableConcept'] = Field(default=None)
    'The reference genome build that is used in this analysis.'
    regionsCalled: Sequence_['Reference'] = Field(default_factory=list)
    'Genomic regions actually called in the analysis event (BED file).'
    regionsStudied: Sequence_['Reference'] = Field(default_factory=list)
    'The genomic regions to be studied in the analysis (BED file).'
    instantiatesUri: Optional_['uri'] = Field(default=None)
    'The URL pointing to an externally maintained protocol that describes the analysis.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    protocolPerformed: Optional_['Reference'] = Field(default=None)
    'The protocol that was performed for the analysis event.'
    instantiatesCanonical: Optional_['canonical'] = Field(default=None)
    'The defined protocol that describes the analysis.'


class GenomicStudyAnalysisPerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Performer for the analysis event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'Role of the actor for this analysis.'
    actor: Optional_['Reference'] = Field(default=None)
    'The organization, healthcare professional, or others who participated in performing this analysis.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class GenomicStudyAnalysisDevice(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Devices used for the analysis (e.g., instruments, software), with settings and parameters."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    device: Optional_['Reference'] = Field(default=None)
    'Device used for the analysis.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Specific function for the device used for the analysis.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class GenomicStudyAnalysisOutput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Outputs for the analysis event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    file: Optional_['Reference'] = Field(default=None)
    'File containing output data.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of output data, e.g., VCF, MAF, or BAM.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class GenomicStudyAnalysisInput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Inputs for the analysis event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    file: Optional_['Reference'] = Field(default=None)
    'File containing input data.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of input data, e.g., BAM, CRAM, or FASTA.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    generatedByIdentifier: Optional_['Identifier'] = Field(default=None)
    'The analysis event or other GenomicStudy that generated this input file.'
    generatedByReference: Optional_['Reference'] = Field(default=None)
    'The analysis event or other GenomicStudy that generated this input file.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class GenomicStudy(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A GenomicStudy is a set of analyses performed to analyze and generate genomic data."""
    resourceType: Literal_['GenomicStudy'] = Field(default=...)
    'Genomic Study'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The type of the study, e.g., Familial variant segregation, Functional variation detection, or Gene expression profiling.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments related to the genomic study.'
    status: 'code' = Field(default=...)
    'The status of the genomic study.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Why the genomic study was performed.'
    subject: 'Reference' = Field(default=...)
    'The primary subject of the genomic study.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'Event resources that the genomic study is based on.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    referrer: Optional_['Reference'] = Field(default=None)
    'Healthcare professional who requested or referred the genomic study.'
    analysis: Sequence_['GenomicStudyAnalysis'] = Field(default_factory=list)
    'The details about a specific analysis that was performed in this GenomicStudy.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The healthcare event with which this genomics study is associated.'
    startDate: Optional_['dateTime'] = Field(default=None)
    'When the genomic study was started.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers for this genomic study.'
    interpreter: Sequence_['Reference'] = Field(default_factory=list)
    'Healthcare professionals who interpreted the genomic study.'
    description: Optional_['markdown'] = Field(default=None)
    'Description of the genomic study.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    instantiatesUri: Optional_['uri'] = Field(default=None)
    'The URL pointing to an externally maintained protocol that describes the study.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instantiatesCanonical: Optional_['canonical'] = Field(default=None)
    'The defined protocol that describes the study.'


class GoalTarget(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates what should be done by when."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    dueDate: Optional_['date'] = Field(default=None)
    'Indicates either the date or the duration after start by which the goal should be met.'
    dueDuration: Optional_['Duration'] = Field(default=None)
    'Indicates either the date or the duration after start by which the goal should be met.'
    measure: Optional_['CodeableConcept'] = Field(default=None)
    'The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    detailQuantity: Optional_['Quantity'] = Field(default=None)
    'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.'
    detailRange: Optional_['Range'] = Field(default=None)
    'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.'
    detailCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.'
    detailString: Optional_['string'] = Field(default=None)
    'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.'
    detailBoolean: Optional_['boolean'] = Field(default=None)
    'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.'
    detailInteger: Optional_['integer'] = Field(default=None)
    'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.'
    detailRatio: Optional_['Ratio'] = Field(default=None)
    'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Goal(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."""
    resourceType: Literal_['Goal'] = Field(default=...)
    'Describes the intended objective(s) for a patient, group or organization'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Any comments related to the goal.'
    target: Sequence_['GoalTarget'] = Field(default_factory=list)
    'Indicates what should be done by when.'
    source: Optional_['Reference'] = Field(default=None)
    'Indicates whose goal this is - patient goal, practitioner goal, etc.'
    subject: 'Reference' = Field(default=...)
    'Identifies the patient, group or organization for whom the goal is being established.'
    outcome: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Identifies the change (or lack of change) at the point when the status of the goal is assessed.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Indicates a category the goal falls within.'
    priority: Optional_['CodeableConcept'] = Field(default=None)
    'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.'
    startDate: Optional_['date'] = Field(default=None)
    'The date or event after which the goal should begin being pursued.'
    startCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The date or event after which the goal should begin being pursued.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    addresses: Sequence_['Reference'] = Field(default_factory=list)
    'The identified conditions and other health record elements that are intended to be addressed by the goal.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.'
    continuous: Optional_['boolean'] = Field(default=None)
    'After meeting the goal, ongoing activity is needed to sustain the goal objective.'
    statusDate: Optional_['date'] = Field(default=None)
    'Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc.'
    description: 'CodeableConcept' = Field(default=...)
    'Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".'
    statusReason: Optional_['string'] = Field(default=None)
    'Captures the reason for the current status.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    lifecycleStatus: 'code' = Field(default=...)
    'The state of the goal throughout its lifecycle.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    achievementStatus: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the progression, or lack thereof, towards the goal against the target.'


class GraphDefinitionLink(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Links this graph makes rules about."""
    min: Optional_['integer'] = Field(default=None)
    'Minimum occurrences for this link.'
    max: Optional_['string'] = Field(default=None)
    'Maximum occurrences for this link.'
    path: Optional_['string'] = Field(default=None)
    'A FHIRPath expression that identifies one of FHIR References to other resources.'
    params: Optional_['string'] = Field(default=None)
    'A set of parameters to look up.'
    sourceId: 'id' = Field(default=...)
    'The source node for this link.'
    targetId: 'id' = Field(default=...)
    'The target node for this link.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sliceName: Optional_['string'] = Field(default=None)
    'Which slice (if profiled).'
    description: Optional_['string'] = Field(default=None)
    'Information about why this link is of interest in this graph definition.'
    compartment: Sequence_['GraphDefinitionLinkCompartment'] = Field(default_factory=list)
    'Compartment Consistency Rules.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class GraphDefinitionLinkCompartment(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Compartment Consistency Rules."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: 'code' = Field(default=...)
    'Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.'
    rule: 'code' = Field(default=...)
    'identical | matching | different | no-rule | custom.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Optional_['string'] = Field(default=None)
    'Custom rule, as a FHIRPath expression.'
    description: Optional_['string'] = Field(default=None)
    'Documentation for FHIRPath expression.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'Identifies the compartment.'


class GraphDefinitionNode(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Potential target for the link."""
    type: 'code' = Field(default=...)
    'Type of resource this link refers to.'
    nodeId: 'id' = Field(default=...)
    'Internal ID of node - target for link references.'
    profile: Optional_['canonical'] = Field(default=None)
    'Profile for the target resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'Information about why this node is of interest in this graph definition.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class GraphDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set."""
    resourceType: Literal_['GraphDefinition'] = Field(default=...)
    'Definition of a graph of resources'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the graph definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.'
    node: Sequence_['GraphDefinitionNode'] = Field(default_factory=list)
    'Potential target for the link.'
    link: Sequence_['GraphDefinitionLink'] = Field(default_factory=list)
    'Links this graph makes rules about.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the capability statement.'
    start: Optional_['id'] = Field(default=None)
    'The Node at which instances of this graph start. If there is no nominated start, the graph can start at any of the nodes.'
    status: 'code' = Field(default=...)
    'The status of this graph definition. Enables tracking the life-cycle of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this graph definition is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the graph definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the graph definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the graph definition.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this GraphDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate graph definition instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the graph definition from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the graph definition is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'


class GroupCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies traits whose presence r absence is shared by members of the group."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'A code that identifies the kind of trait being asserted.'
    period: Optional_['Period'] = Field(default=None)
    'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.'
    exclude: 'boolean' = Field(default=...)
    'If true, indicates the characteristic is one that is NOT held by members of the group.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    "The value of the trait that holds (or does not hold - see 'exclude') for members of the group."
    valueBoolean: Optional_['boolean'] = Field(default=None)
    "The value of the trait that holds (or does not hold - see 'exclude') for members of the group."
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    "The value of the trait that holds (or does not hold - see 'exclude') for members of the group."
    valueRange: Optional_['Range'] = Field(default=None)
    "The value of the trait that holds (or does not hold - see 'exclude') for members of the group."
    valueReference: Optional_['Reference'] = Field(default=None)
    "The value of the trait that holds (or does not hold - see 'exclude') for members of the group."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class GroupMember(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies the resource instances that are members of the group."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    entity: 'Reference' = Field(default=...)
    'A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.'
    period: Optional_['Period'] = Field(default=None)
    'The period that the member was in the group, if known.'
    inactive: Optional_['boolean'] = Field(default=None)
    'A flag to indicate that the member is no longer in the group, but previously may have been a member.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Group(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."""
    resourceType: Literal_['Group'] = Field(default=...)
    'Group of multiple entities'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'code' = Field(default=...)
    'Identifies the broad classification of the kind of resources the group includes.'
    name: Optional_['string'] = Field(default=None)
    'A label assigned to the group for human identification and communication.'
    active: Optional_['boolean'] = Field(default=None)
    'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.'
    member: Sequence_['GroupMember'] = Field(default_factory=list)
    'Identifies the resource instances that are members of the group.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    quantity: Optional_['unsignedInt'] = Field(default=None)
    'A count of the number of resource instances that are part of the group.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this participant by one of the applications involved.  These identifiers remain constant as the resource is updated and propagates from server to server.'
    membership: 'code' = Field(default=...)
    "Basis for membership in the Group:\n\n* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.\n* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member."
    description: Optional_['markdown'] = Field(default=None)
    'Explanation of what the group represents and how it is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    managingEntity: Optional_['Reference'] = Field(default=None)
    'Entity responsible for defining and maintaining Group characteristics and/or registered members.'
    characteristic: Sequence_['GroupCharacteristic'] = Field(default_factory=list)
    'Identifies traits whose presence r absence is shared by members of the group.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.'


class GuidanceResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken."""
    resourceType: Literal_['GuidanceResponse'] = Field(default=...)
    'The formal response to a guidance request'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Provides a mechanism to communicate additional information about the response.'
    status: 'code' = Field(default=...)
    'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Describes the reason for the guidance response in coded or textual form, or Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.'
    result: Sequence_['Reference'] = Field(default_factory=list)
    'The actions, if any, produced by the evaluation of the artifact.'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient for which the request was processed.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    moduleUri: Optional_['uri'] = Field(default=None)
    'An identifier, CodeableConcept or canonical reference to the guidance that was requested.'
    moduleCanonical: Optional_['canonical'] = Field(default=None)
    'An identifier, CodeableConcept or canonical reference to the guidance that was requested.'
    moduleCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'An identifier, CodeableConcept or canonical reference to the guidance that was requested.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter during which this response was created or to which the creation of this record is tightly associated.'
    performer: Optional_['Reference'] = Field(default=None)
    'Provides a reference to the device that performed the guidance.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Allows a service to provide  unique, business identifiers for the response.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    dataRequirement: Sequence_['DataRequirement'] = Field(default_factory=list)
    'If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.'
    outputParameters: Optional_['Reference'] = Field(default=None)
    'The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    requestIdentifier: Optional_['Identifier'] = Field(default=None)
    'The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.'
    evaluationMessage: Optional_['Reference'] = Field(default=None)
    'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'Indicates when the guidance response was processed.'


class HealthcareServiceEligibility(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Does this service have specific eligibility requirements that need to be met in order to use the service?"""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Coded value for the eligibility.'
    comment: Optional_['markdown'] = Field(default=None)
    'Describes the eligibility conditions for the service.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class HealthcareService(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The details of a healthcare service available at a location."""
    resourceType: Literal_['HealthcareService'] = Field(default=...)
    'The details of a healthcare service available at a location'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The specific type of service that may be delivered or performed.'
    name: Optional_['string'] = Field(default=None)
    'Further description of the service as it would be presented to a consumer while searching.'
    photo: Optional_['Attachment'] = Field(default=None)
    'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.'
    active: Optional_['boolean'] = Field(default=None)
    'This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.'
    comment: Optional_['markdown'] = Field(default=None)
    'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.'
    contact: Sequence_['ExtendedContactDetail'] = Field(default_factory=list)
    'The contact details of communication devices available relevant to the specific HealthcareService. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.'
    program: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Programs that this service is applicable to.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies the broad category of service being performed or delivered.'
    location: Sequence_['Reference'] = Field(default_factory=list)
    'The location(s) where this healthcare service may be provided.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    offeredIn: Sequence_['Reference'] = Field(default_factory=list)
    'When the HealthcareService is representing a specific, schedulable service, the availableIn property can refer to a generic service.'
    specialty: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Collection of specialties handled by the Healthcare service. This is more of a medical term.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'External identifiers for this item.'
    providedBy: Optional_['Reference'] = Field(default=None)
    'The organization that provides this healthcare service.'
    eligibility: Sequence_['HealthcareServiceEligibility'] = Field(default_factory=list)
    'Does this service have specific eligibility requirements that need to be met in order to use the service?'
    extraDetails: Optional_['markdown'] = Field(default=None)
    "Extra details about the service that can't be placed in the other fields."
    coverageArea: Sequence_['Reference'] = Field(default_factory=list)
    'The location(s) that this service is available to (not where the service is provided).'
    availability: Sequence_['Availability'] = Field(default_factory=list)
    'A collection of times that the healthcare service is available.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    communication: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.'
    characteristic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Collection of characteristics (attributes).'
    referralMethod: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    appointmentRequired: Optional_['boolean'] = Field(default=None)
    'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.'
    serviceProvisionCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The code(s) that detail the conditions under which the healthcare service is available/offered.'


class ImagingSelectionPerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Selector of the instances – human or machine."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: Optional_['Reference'] = Field(default=None)
    'Author – human or machine.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of involvement of the performer.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImagingSelectionInstance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Each imaging selection includes one or more selected DICOM SOP instances."""
    uid: 'id' = Field(default=...)
    'The SOP Instance UID for the selected DICOM instance.'
    number: Optional_['unsignedInt'] = Field(default=None)
    'The Instance Number for the selected DICOM instance.'
    subset: Sequence_['string'] = Field(default_factory=list)
    'Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance.\n       May be one of:\n       - A list of frame numbers selected from a multiframe SOP Instance.\n       - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance.\n       - A list of segment numbers selected from a segmentation SOP Instance.\n       - A list of Region of Interest (ROI) numbers selected from a radiotherapy structure set SOP Instance.'
    sopClass: Optional_['Coding'] = Field(default=None)
    'The SOP Class UID for the selected DICOM instance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    imageRegion2D: Sequence_['ImagingSelectionInstanceImageRegion2D'] = Field(default_factory=list)
    'Each imaging selection instance or frame list might includes an image region, specified by a region type and a set of 2D coordinates.\n       If the parent imagingSelection.instance contains a subset element of type frame, the image region applies to all frames in the subset list.'
    imageRegion3D: Sequence_['ImagingSelectionInstanceImageRegion3D'] = Field(default_factory=list)
    'Each imaging selection might includes a 3D image region, specified by a region type and a set of 3D coordinates.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ImagingSelectionInstanceImageRegion3D(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Each imaging selection might includes a 3D image region, specified by a region type and a set of 3D coordinates."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    regionType: 'code' = Field(default=...)
    'Specifies the type of image region.'
    coordinate: Sequence_['decimal'] = Field(default=...)
    'The coordinates describing the image region. Encoded as an ordered set of (x,y,z) triplets (in mm and may be negative) that define a region of interest in the patient-relative Reference Coordinate System defined by ImagingSelection.frameOfReferenceUid element.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImagingSelectionInstanceImageRegion2D(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Each imaging selection instance or frame list might includes an image region, specified by a region type and a set of 2D coordinates.
       If the parent imagingSelection.instance contains a subset element of type frame, the image region applies to all frames in the subset list."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    regionType: 'code' = Field(default=...)
    'Specifies the type of image region.'
    coordinate: Sequence_['decimal'] = Field(default=...)
    'The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution.\n       The origin at the TLHC of the TLHC pixel is 0.0\\0.0, the BRHC of the TLHC pixel is 1.0\\1.0, and the BRHC of the BRHC pixel is the number of columns\\rows in the image / frames. The values must be within the range 0\\0 to the number of columns\\rows in the image / frames.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImagingSelection(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A selection of DICOM SOP instances and/or frames within a single Study and Series. This might include additional specifics such as an image region, an Observation UID or a Segmentation Number, allowing linkage to an Observation Resource or transferring this information along with the ImagingStudy Resource."""
    resourceType: Literal_['ImagingSelection'] = Field(default=...)
    'A selection of DICOM SOP instances and/or frames'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    focus: Sequence_['Reference'] = Field(default_factory=list)
    "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus."
    status: 'code' = Field(default=...)
    'The current state of the ImagingSelection resource. This is not the status of any ImagingStudy, ServiceRequest, or Task resources associated with the ImagingSelection.'
    issued: Optional_['instant'] = Field(default=None)
    'The date and time this imaging selection was created.'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient, or group of patients, location, device, organization, procedure or practitioner this imaging selection is about and into whose or what record the imaging selection is placed.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A list of the diagnostic requests that resulted in this imaging selection being performed.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Classifies the imaging selection.'
    studyUid: Optional_['id'] = Field(default=None)
    'The Study Instance UID for the DICOM Study from which the images were selected.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'The network service providing retrieval access to the selected images, frames, etc. See implementation notes for information about using DICOM endpoints.'
    bodySite: Optional_['CodeableReference'] = Field(default=None)
    'The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings.'
    instance: Sequence_['ImagingSelectionInstance'] = Field(default_factory=list)
    'Each imaging selection includes one or more selected DICOM SOP instances.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    performer: Sequence_['ImagingSelectionPerformer'] = Field(default_factory=list)
    'Selector of the instances – human or machine.'
    seriesUid: Optional_['id'] = Field(default=None)
    'The Series Instance UID for the DICOM Series from which the images were selected.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this imaging selection.'
    derivedFrom: Sequence_['Reference'] = Field(default_factory=list)
    'The imaging study from which the imaging selection is made.'
    seriesNumber: Optional_['unsignedInt'] = Field(default=None)
    'The Series Number for the DICOM Series from which the images were selected.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    frameOfReferenceUid: Optional_['id'] = Field(default=None)
    'The Frame of Reference UID identifying the coordinate system that conveys spatial and/or temporal information for the selected images or frames.'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    code: 'CodeableConcept' = Field(default=...)
    'Reason for referencing the selected content.'


class ImagingStudySeries(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Each study has one or more series of images or other content."""
    uid: 'id' = Field(default=...)
    'The DICOM Series Instance UID for the series.'
    number: Optional_['unsignedInt'] = Field(default=None)
    'The numeric identifier of this series in the study.'
    started: Optional_['dateTime'] = Field(default=None)
    'The date and time the series was started.'
    modality: 'CodeableConcept' = Field(default=...)
    'The distinct modality for this series. This may include both acquisition and non-acquisition modalities.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.'
    bodySite: Optional_['CodeableReference'] = Field(default=None)
    'The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.'
    specimen: Sequence_['Reference'] = Field(default_factory=list)
    'The specimen imaged, e.g., for whole slide imaging of a biopsy.'
    instance: Sequence_['ImagingStudySeriesInstance'] = Field(default_factory=list)
    'A single SOP instance within the series, e.g. an image, or presentation state.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    performer: Sequence_['ImagingStudySeriesPerformer'] = Field(default_factory=list)
    'Indicates who or what performed the series and how they were involved.'
    laterality: Optional_['CodeableConcept'] = Field(default=None)
    'The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.'
    description: Optional_['string'] = Field(default=None)
    'A description of the series.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    numberOfInstances: Optional_['unsignedInt'] = Field(default=None)
    'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ImagingStudySeriesPerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what performed the series and how they were involved."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'Indicates who or what performed the series.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of involvement of the performer in the series.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImagingStudySeriesInstance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A single SOP instance within the series, e.g. an image, or presentation state."""
    uid: 'id' = Field(default=...)
    'The DICOM SOP Instance UID for this image or other DICOM content.'
    title: Optional_['string'] = Field(default=None)
    'The description of the instance.'
    number: Optional_['unsignedInt'] = Field(default=None)
    'The number of instance in the series.'
    sopClass: 'Coding' = Field(default=...)
    'DICOM instance  type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ImagingStudy(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities."""
    resourceType: Literal_['ImagingStudy'] = Field(default=...)
    'A set of images produced in single study (one or more series of references images)'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element.'
    status: 'code' = Field(default=...)
    'The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular ImagingStudy is a component or step.  For example,  an ImagingStudy as part of a procedure.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Description of clinical condition indicating why the ImagingStudy was requested, and/or Indicates another resource whose existence justifies this Study.'
    series: Sequence_['ImagingStudySeries'] = Field(default_factory=list)
    'Each study has one or more series of images or other content.'
    subject: 'Reference' = Field(default=...)
    'The subject, typically a patient, of the imaging study.'
    started: Optional_['dateTime'] = Field(default=None)
    'Date and time the study started.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A list of the diagnostic requests that resulted in this imaging study being performed.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    modality: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A list of all the distinct values of series.modality. This may include both acquisition and non-acquisition modalities.'
    referrer: Optional_['Reference'] = Field(default=None)
    'The requesting/referring physician.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.'
    location: Optional_['Reference'] = Field(default=None)
    'The principal physical location where the ImagingStudy was performed.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.'
    procedure: Sequence_['CodeableReference'] = Field(default_factory=list)
    'This field corresponds to the DICOM Procedure Code Sequence (0008,1032). This is different from the FHIR Procedure resource that may include the ImagingStudy.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers for the ImagingStudy such as DICOM Study Instance UID.'
    description: Optional_['string'] = Field(default=None)
    'The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    numberOfSeries: Optional_['unsignedInt'] = Field(default=None)
    'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    numberOfInstances: Optional_['unsignedInt'] = Field(default=None)
    'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.'


class ImmunizationProgramEligibility(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates a patient's eligibility for a funding program."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    program: 'CodeableConcept' = Field(default=...)
    'Indicates which program the patient had their eligility evaluated for.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    programStatus: 'CodeableConcept' = Field(default=...)
    "Indicates the patient's eligility status for for a specific payment program."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImmunizationProtocolApplied(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The protocol (set of recommendations) being followed by the provider who administered the dose."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    series: Optional_['string'] = Field(default=None)
    'One possible path to achieve presumed immunity against a disease - within the context of an authority.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    authority: Optional_['Reference'] = Field(default=None)
    'Indicates the authority who published the protocol (e.g. ACIP) that is being followed.'
    doseNumber: 'string' = Field(default=...)
    'Nominal position in a series as intended by the practitioner administering the dose.'
    seriesDoses: Optional_['string'] = Field(default=None)
    'The recommended number of doses to achieve immunity as intended by the practitioner administering the dose.'
    targetDisease: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The vaccine preventable disease the dose is being administered against.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImmunizationPerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who performed the immunization event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'The practitioner or organization who performed the action.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the type of performance (e.g. ordering provider, administering provider, etc.).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImmunizationReaction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Categorical data indicating that an adverse event is associated in time to an immunization."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    date: Optional_['dateTime'] = Field(default=None)
    'Date of reaction to the immunization.'
    reported: Optional_['boolean'] = Field(default=None)
    'Self-reported indicator.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    manifestation: Optional_['CodeableReference'] = Field(default=None)
    'Details of the reaction.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Immunization(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party."""
    resourceType: Literal_['Immunization'] = Field(default=...)
    'Immunization event information'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    site: Optional_['CodeableConcept'] = Field(default=None)
    'Body site where vaccine was administered.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Extra information about the immunization that is not conveyed by the other attributes.'
    route: Optional_['CodeableConcept'] = Field(default=None)
    'The path by which the vaccine product is taken into the body.'
    status: 'code' = Field(default=...)
    'Indicates the current status of the immunization event.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Describes why the immunization occurred in coded or textual form, or Indicates another resource (Condition, Observation or DiagnosticReport) whose existence justifies this immunization.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan, order or recommendation fulfilled in whole or in part by this immunization.'
    patient: 'Reference' = Field(default=...)
    'The patient who either received or did not receive the immunization.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    location: Optional_['Reference'] = Field(default=None)
    'The service delivery location where the vaccine administration occurred.'
    reaction: Sequence_['ImmunizationReaction'] = Field(default_factory=list)
    'Categorical data indicating that an adverse event is associated in time to an immunization.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    lotNumber: Optional_['string'] = Field(default=None)
    'Lot number of the  vaccine product.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.'
    performer: Sequence_['ImmunizationPerformer'] = Field(default_factory=list)
    'Indicates who performed the immunization event.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this immunization record.'
    vaccineCode: 'CodeableConcept' = Field(default=...)
    'Vaccine that was administered or was to be administered.'
    isSubpotent: Optional_['boolean'] = Field(default=None)
    'Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.'
    statusReason: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the reason the immunization event was not performed.'
    manufacturer: Optional_['CodeableReference'] = Field(default=None)
    'Name of vaccine manufacturer.'
    doseQuantity: Optional_['Quantity'] = Field(default=None)
    'The quantity of vaccine product that was administered.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'Date vaccine administered or was to be administered.'
    occurrenceString: Optional_['string'] = Field(default=None)
    'Date vaccine administered or was to be administered.'
    primarySource: Optional_['boolean'] = Field(default=None)
    "Indicates whether the data contained in the resource was captured by the individual/organization which was responsible for the administration of the vaccine rather than as 'secondary reported' data documented by a third party. A value of 'true' means this data originated with the individual/organization which was responsible for the administration of the vaccine."
    fundingSource: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).'
    expirationDate: Optional_['date'] = Field(default=None)
    'Date vaccine batch expires.'
    subpotentReason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Reason why a dose is considered to be subpotent.'
    protocolApplied: Sequence_['ImmunizationProtocolApplied'] = Field(default_factory=list)
    'The protocol (set of recommendations) being followed by the provider who administered the dose.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    informationSource: Optional_['CodeableReference'] = Field(default=None)
    'Typically the source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.'
    programEligibility: Sequence_['ImmunizationProgramEligibility'] = Field(default_factory=list)
    "Indicates a patient's eligibility for a funding program."
    administeredProduct: Optional_['CodeableReference'] = Field(default=None)
    'An indication of which product was administered to the patient. This is typically a more detailed representation of the concept conveyed by the vaccineCode data element. If a Medication resource is referenced, it may be to a stand-alone resource or a contained resource within the Immunization resource.'
    supportingInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Additional information that is relevant to the immunization (e.g. for a vaccine recipient who is pregnant, the gestational age of the fetus). The reason why a vaccine was given (e.g. occupation, underlying medical condition) should be conveyed in Immunization.reason, not as supporting information. The reason why a vaccine was not given (e.g. contraindication) should be conveyed in Immunization.statusReason, not as supporting information.'


class ImmunizationEvaluation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations."""
    resourceType: Literal_['ImmunizationEvaluation'] = Field(default=...)
    'Immunization evaluation information'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date the evaluation of the vaccine administration event was performed.'
    status: 'code' = Field(default=...)
    'Indicates the current status of the evaluation of the vaccination administration event.'
    series: Optional_['string'] = Field(default=None)
    'One possible path to achieve presumed immunity against a disease - within the context of an authority.'
    patient: 'Reference' = Field(default=...)
    'The individual for whom the evaluation is being done.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    authority: Optional_['Reference'] = Field(default=None)
    'Indicates the authority who published the protocol (e.g. ACIP).'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this immunization evaluation record.'
    doseStatus: 'CodeableConcept' = Field(default=...)
    'Indicates if the dose is valid or not valid with respect to the published recommendations.'
    doseNumber: Optional_['string'] = Field(default=None)
    'Nominal position in a series as determined by the outcome of the evaluation process.'
    description: Optional_['markdown'] = Field(default=None)
    'Additional information about the evaluation.'
    seriesDoses: Optional_['string'] = Field(default=None)
    'The recommended number of doses to achieve immunity as determined by the outcome of the evaluation process.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    targetDisease: 'CodeableConcept' = Field(default=...)
    'The vaccine preventable disease the dose is being evaluated against.'
    doseStatusReason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    immunizationEvent: 'Reference' = Field(default=...)
    'The vaccine administration event being evaluated.'


class ImmunizationRecommendationRecommendation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Vaccine administration recommendations."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    series: Optional_['string'] = Field(default=None)
    'One possible path to achieve presumed immunity against a disease - within the context of an authority.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    doseNumber: Optional_['string'] = Field(default=None)
    'Nominal position of the recommended dose in a series as determined by the evaluation and forecasting process (e.g. dose 2 is the next recommended dose).'
    vaccineCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Vaccine(s) or vaccine group that pertain to the recommendation.'
    description: Optional_['markdown'] = Field(default=None)
    'Contains the description about the protocol under which the vaccine was administered.'
    seriesDoses: Optional_['string'] = Field(default=None)
    'The recommended number of doses to achieve immunity as determined by the evaluation and forecasting process.'
    targetDisease: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The targeted disease for the recommendation.'
    dateCriterion: Sequence_['ImmunizationRecommendationRecommendationDateCriterion'] = Field(default_factory=list)
    'Vaccine date recommendations.  For example, earliest date to administer, latest date to administer, etc.'
    forecastStatus: 'CodeableConcept' = Field(default=...)
    'Indicates the patient status with respect to the path to immunity for the target disease.'
    forecastReason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The reason for the assigned forecast status.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    supportingImmunization: Sequence_['Reference'] = Field(default_factory=list)
    'Immunization event history and/or evaluation that supports the status and recommendation.'
    contraindicatedVaccineCode: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Vaccine(s) which should not be used to fulfill the recommendation.'
    supportingPatientInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Patient Information that supports the status and recommendation.  This includes patient observations, adverse reactions and allergy/intolerance information.'


class ImmunizationRecommendationRecommendationDateCriterion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Vaccine date recommendations.  For example, earliest date to administer, latest date to administer, etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Date classification of recommendation.  For example, earliest date to give, latest date to give, etc.'
    value: 'dateTime' = Field(default=...)
    'The date whose meaning is specified by dateCriterion.code.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImmunizationRecommendation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification."""
    resourceType: Literal_['ImmunizationRecommendation'] = Field(default=...)
    'Guidance or advice relating to an immunization'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    date: 'dateTime' = Field(default=...)
    'The date the immunization recommendation(s) were created.'
    patient: 'Reference' = Field(default=...)
    'The patient the recommendation(s) are for.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    authority: Optional_['Reference'] = Field(default=None)
    'Indicates the authority who published the protocol (e.g. ACIP).'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this particular recommendation record.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    recommendation: Sequence_['ImmunizationRecommendationRecommendation'] = Field(default=...)
    'Vaccine administration recommendations.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuideDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The information needed by an IG publisher tool to publish the whole implementation guide."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    page: Optional_['ImplementationGuideDefinitionPage'] = Field(default=None)
    'A page / section in the implementation guide. The root page is the implementation guide home page.'
    grouping: Sequence_['ImplementationGuideDefinitionGrouping'] = Field(default_factory=list)
    'A logical group of resources. Logical groups can be used when building pages.'
    resource: Sequence_['ImplementationGuideDefinitionResource'] = Field(default_factory=list)
    'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.'
    template: Sequence_['ImplementationGuideDefinitionTemplate'] = Field(default_factory=list)
    'A template for building resources.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    parameter: Sequence_['ImplementationGuideDefinitionParameter'] = Field(default_factory=list)
    'A set of parameters that defines how the implementation guide is built. The parameters are defined by the relevant tools that build the implementation guides.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuideDefinitionParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of parameters that defines how the implementation guide is built. The parameters are defined by the relevant tools that build the implementation guides."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'Coding' = Field(default=...)
    'A tool-specific code that defines the parameter.'
    value: 'string' = Field(default=...)
    'Value for named type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuideDefinitionTemplate(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A template for building resources."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    scope: Optional_['string'] = Field(default=None)
    'The scope in which the template applies.'
    source: 'string' = Field(default=...)
    'The source location for the template.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'Type of template specified.'


class ImplementationGuideDefinitionResource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource."""
    name: Optional_['string'] = Field(default=None)
    'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).'
    profile: Sequence_['canonical'] = Field(default_factory=list)
    'If present, indicates profile(s) the instance is valid against.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: 'Reference' = Field(default=...)
    'Where this resource is found.'
    isExample: Optional_['boolean'] = Field(default=None)
    'If true, indicates the resource is an example instance.'
    groupingId: Optional_['id'] = Field(default=None)
    'Reference to the id of the grouping this resource appears in.'
    fhirVersion: Sequence_['code'] = Field(default_factory=list)
    'Indicates the FHIR Version(s) this artifact is intended to apply to. If no versions are specified, the resource is assumed to apply to all the versions stated in ImplementationGuide.fhirVersion.'
    description: Optional_['markdown'] = Field(default=None)
    'A description of the reason that a resource has been included in the implementation guide.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ImplementationGuideDefinitionGrouping(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A logical group of resources. Logical groups can be used when building pages."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'The human-readable title to display for the package of resources when rendering the implementation guide.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'Human readable text describing the package.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuideDefinitionPage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A page / section in the implementation guide. The root page is the implementation guide home page."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'url' = Field(default=...)
    'The url by which the page should be known when published.'
    page: Sequence_['ImplementationGuideDefinitionPage'] = Field(default_factory=list)
    'Nested Pages/Sections under this page.'
    title: 'string' = Field(default=...)
    'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sourceUrl: Optional_['url'] = Field(default=None)
    'Indicates the URL or the actual content to provide for the page.'
    sourceString: Optional_['string'] = Field(default=None)
    'Indicates the URL or the actual content to provide for the page.'
    sourceMarkdown: Optional_['markdown'] = Field(default=None)
    'Indicates the URL or the actual content to provide for the page.'
    generation: 'code' = Field(default=...)
    'A code that indicates how the page is generated.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuideDependsOn(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides."""
    uri: 'canonical' = Field(default=...)
    'A canonical reference to the Implementation guide for the dependency.'
    reason: Optional_['markdown'] = Field(default=None)
    'A description explaining the nature of the dependency on the listed IG.'
    version: Optional_['string'] = Field(default=None)
    'The version of the IG that is depended on, when the correct version is required to understand the IG correctly.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    packageId: Optional_['id'] = Field(default=None)
    'The NPM package name for the Implementation Guide that this IG depends on.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ImplementationGuideManifest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about an assembled implementation guide, created by the publication tooling."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    page: Sequence_['ImplementationGuideManifestPage'] = Field(default_factory=list)
    'Information about a page within the IG.'
    image: Sequence_['string'] = Field(default_factory=list)
    'Indicates a relative path to an image that exists within the IG.'
    other: Sequence_['string'] = Field(default_factory=list)
    'Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.'
    resource: Sequence_['ImplementationGuideManifestResource'] = Field(default=...)
    'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    rendering: Optional_['url'] = Field(default=None)
    'A pointer to official web page, PDF or other rendering of the implementation guide.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuideManifestResource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    profile: Sequence_['canonical'] = Field(default_factory=list)
    'If present, indicates profile(s) the instance is valid against.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: 'Reference' = Field(default=...)
    'Where this resource is found.'
    isExample: Optional_['boolean'] = Field(default=None)
    'If true, indicates the resource is an example instance.'
    relativePath: Optional_['url'] = Field(default=None)
    'The relative path for primary page for this resource within the IG.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuideManifestPage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about a page within the IG."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'Relative path to the page.'
    title: Optional_['string'] = Field(default=None)
    'Label for the page intended for human display.'
    anchor: Sequence_['string'] = Field(default_factory=list)
    'The name of an anchor available on the page.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuideGlobal(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of profiles that all resources covered by this implementation guide must conform to."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of resource that all instances must conform to.'
    profile: 'canonical' = Field(default=...)
    'A reference to the profile that all instances must conform to.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ImplementationGuide(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts."""
    resourceType: Literal_['ImplementationGuide'] = Field(default=...)
    'A set of rules about how FHIR is used'
    url: 'uri' = Field(default=...)
    'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the implementation guide was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the implementation guide.'
    status: 'code' = Field(default=...)
    'The status of this implementation guide. Enables tracking the life-cycle of the content.'
    global_: Sequence_['ImplementationGuideGlobal'] = Field(default_factory=list, alias='global')
    'A set of profiles that all resources covered by this implementation guide must conform to.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this implementation guide is needed and why it has been designed as it has.'
    license: Optional_['code'] = Field(default=None)
    "The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'."
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    manifest: Optional_['ImplementationGuideManifest'] = Field(default=None)
    'Information about an assembled implementation guide, created by the publication tooling.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the implementation guide.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.'
    packageId: 'id' = Field(default=...)
    'The NPM package name for this Implementation Guide, used in the NPM package distribution, which is the primary mechanism by which FHIR based tooling manages IG dependencies. This value must be globally unique, and should be assigned with care.'
    dependsOn: Sequence_['ImplementationGuideDependsOn'] = Field(default_factory=list)
    'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this implementation guide when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate implementation guide instances.'
    definition: Optional_['ImplementationGuideDefinition'] = Field(default=None)
    'The information needed by an IG publisher tool to publish the whole implementation guide.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the implementation guide from a consumer's perspective."
    fhirVersion: Sequence_['code'] = Field(default=...)
    'The version(s) of the FHIR specification that this ImplementationGuide targets - e.g. describes how to use. The value of this element is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.6.0. for this version.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the implementation guide is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'


class IngredientManufacturer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The organization(s) that manufacture this ingredient. Can be used to indicate:         1) Organizations we are aware of that manufacture this ingredient         2) Specific Manufacturer(s) currently being used         3) Set of organisations allowed to manufacture this ingredient for this product         Users must be clear on the application of context relevant to their use case."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['code'] = Field(default=None)
    'The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    manufacturer: 'Reference' = Field(default=...)
    'An organization that manufactures this ingredient.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class IngredientSubstance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The substance that comprises this ingredient."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableReference' = Field(default=...)
    "A code or full resource that represents the ingredient's substance."
    strength: Sequence_['IngredientSubstanceStrength'] = Field(default_factory=list)
    'The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. The allowed repetitions do not represent different strengths, but are different representations - mathematically equivalent - of a single strength.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class IngredientSubstanceStrength(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. The allowed repetitions do not represent different strengths, but are different representations - mathematically equivalent - of a single strength."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    basis: Optional_['CodeableConcept'] = Field(default=None)
    'A code that indicates if the strength is, for example, based on the ingredient substance as stated or on the substance base (when the ingredient is a salt).'
    country: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The country or countries for which the strength range applies.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    presentationRatio: Optional_['Ratio'] = Field(default=None)
    "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. Unit of presentation refers to the quantity that the item occurs in e.g. a strength per tablet size, perhaps 'per 20mg' (the size of the tablet). It is not generally normalized as a unitary unit, which would be 'per mg')."
    presentationRatioRange: Optional_['RatioRange'] = Field(default=None)
    "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. Unit of presentation refers to the quantity that the item occurs in e.g. a strength per tablet size, perhaps 'per 20mg' (the size of the tablet). It is not generally normalized as a unitary unit, which would be 'per mg')."
    presentationCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. Unit of presentation refers to the quantity that the item occurs in e.g. a strength per tablet size, perhaps 'per 20mg' (the size of the tablet). It is not generally normalized as a unitary unit, which would be 'per mg')."
    presentationQuantity: Optional_['Quantity'] = Field(default=None)
    "The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item. Unit of presentation refers to the quantity that the item occurs in e.g. a strength per tablet size, perhaps 'per 20mg' (the size of the tablet). It is not generally normalized as a unitary unit, which would be 'per mg')."
    textPresentation: Optional_['string'] = Field(default=None)
    'A textual represention of either the whole of the presentation strength or a part of it - with the rest being in Strength.presentation as a ratio.'
    concentrationRatio: Optional_['Ratio'] = Field(default=None)
    'The strength per unitary volume (or mass).'
    concentrationRatioRange: Optional_['RatioRange'] = Field(default=None)
    'The strength per unitary volume (or mass).'
    concentrationCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The strength per unitary volume (or mass).'
    concentrationQuantity: Optional_['Quantity'] = Field(default=None)
    'The strength per unitary volume (or mass).'
    measurementPoint: Optional_['string'] = Field(default=None)
    'For when strength is measured at a particular point or distance. There are products where strength is measured at a particular point. For example, the strength of the ingredient in some inhalers is measured at a particular position relative to the point of aerosolization.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    textConcentration: Optional_['string'] = Field(default=None)
    'A textual represention of either the whole of the concentration strength or a part of it - with the rest being in Strength.concentration as a ratio.'
    referenceStrength: Sequence_['IngredientSubstanceStrengthReferenceStrength'] = Field(default_factory=list)
    'Strength expressed in terms of a reference substance. For when the ingredient strength is additionally expressed as equivalent to the strength of some other closely related substance (e.g. salt vs. base). Reference strength represents the strength (quantitative composition) of the active moiety of the active substance. There are situations when the active substance and active moiety are different, therefore both a strength and a reference strength are needed.'


class IngredientSubstanceStrengthReferenceStrength(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Strength expressed in terms of a reference substance. For when the ingredient strength is additionally expressed as equivalent to the strength of some other closely related substance (e.g. salt vs. base). Reference strength represents the strength (quantitative composition) of the active moiety of the active substance. There are situations when the active substance and active moiety are different, therefore both a strength and a reference strength are needed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    country: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The country or countries for which the strength range applies.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    substance: 'CodeableReference' = Field(default=...)
    'Relevant reference substance.'
    strengthRatio: Optional_['Ratio'] = Field(default=None)
    'Strength expressed in terms of a reference substance.'
    strengthRatioRange: Optional_['RatioRange'] = Field(default=None)
    'Strength expressed in terms of a reference substance.'
    strengthQuantity: Optional_['Quantity'] = Field(default=None)
    'Strength expressed in terms of a reference substance.'
    measurementPoint: Optional_['string'] = Field(default=None)
    'For when strength is measured at a particular point or distance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Ingredient(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An ingredient of a manufactured item or pharmaceutical product."""
    resourceType: Literal_['Ingredient'] = Field(default=...)
    'An ingredient of a manufactured item or pharmaceutical product'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    for_: Sequence_['Reference'] = Field(default_factory=list, alias='for')
    'The product which this ingredient is a constituent part of.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    role: 'CodeableConcept' = Field(default=...)
    'A classification of the ingredient identifying its purpose within the product, e.g. active, inactive.'
    group: Optional_['CodeableConcept'] = Field(default=None)
    'A classification of the ingredient according to where in the physical item it tends to be used, such the outer shell of a tablet, inner body or ink.'
    status: 'code' = Field(default=...)
    'The status of this ingredient. Enables tracking the life-cycle of the content.'
    comment: Optional_['markdown'] = Field(default=None)
    'A place for providing any notes that are relevant to the component, e.g. removed during process, adjusted for loss on drying.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    function: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A classification of the ingredient identifying its precise purpose(s) in the drug product. This extends the Ingredient.role to add more detail. Example: antioxidant, alkalizing agent.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    substance: 'IngredientSubstance' = Field(default=...)
    'The substance that comprises this ingredient.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.'
    manufacturer: Sequence_['IngredientManufacturer'] = Field(default_factory=list)
    'The organization(s) that manufacture this ingredient. Can be used to indicate:         1) Organizations we are aware of that manufacture this ingredient         2) Specific Manufacturer(s) currently being used         3) Set of organisations allowed to manufacture this ingredient for this product         Users must be clear on the application of context relevant to their use case.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    allergenicIndicator: Optional_['boolean'] = Field(default=None)
    'If the ingredient is a known or suspected allergen. Note that this is a property of the substance, so if a reference to a SubstanceDefinition is used to decribe that (rather than just a code), the allergen information should go there, not here.'


class InsurancePlanCoverage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details about the coverage offered by the insurance product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Type of coverage  (Medical; Dental; Mental Health; Substance Abuse; Vision; Drug; Short Term; Long Term Care; Hospice; Home Health).'
    network: Sequence_['Reference'] = Field(default_factory=list)
    'Reference to the network that providing the type of coverage.'
    benefit: Sequence_['InsurancePlanCoverageBenefit'] = Field(default=...)
    'Specific benefits under this type of coverage.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InsurancePlanCoverageBenefit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specific benefits under this type of coverage."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Type of benefit (primary care; speciality care; inpatient; outpatient).'
    limit: Sequence_['InsurancePlanCoverageBenefitLimit'] = Field(default_factory=list)
    'The specific limits on the benefit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requirement: Optional_['string'] = Field(default=None)
    'The referral requirements to have access/coverage for this benefit.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InsurancePlanCoverageBenefitLimit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The specific limits on the benefit."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The specific limit on the benefit.'
    value: Optional_['Quantity'] = Field(default=None)
    'The maximum amount of a service item a plan will pay for a covered benefit.  For examples. wellness visits, or eyeglasses.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InsurancePlanPlan(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details about an insurance plan."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of plan. For example, "Platinum" or "High Deductable".'
    network: Sequence_['Reference'] = Field(default_factory=list)
    'Reference to the network that providing the type of coverage.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this health insurance plan which remain constant as the resource is updated and propagates from server to server.'
    generalCost: Sequence_['InsurancePlanPlanGeneralCost'] = Field(default_factory=list)
    'Overall costs associated with the plan.'
    coverageArea: Sequence_['Reference'] = Field(default_factory=list)
    "The geographic region in which a health insurance plan's benefits apply."
    specificCost: Sequence_['InsurancePlanPlanSpecificCost'] = Field(default_factory=list)
    'Costs associated with the coverage provided by the product.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InsurancePlanPlanSpecificCost(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Costs associated with the coverage provided by the product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    benefit: Sequence_['InsurancePlanPlanSpecificCostBenefit'] = Field(default_factory=list)
    'List of the specific benefits under this category of benefit.'
    category: 'CodeableConcept' = Field(default=...)
    'General category of benefit (Medical; Dental; Vision; Drug; Mental Health; Substance Abuse; Hospice, Home Health).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InsurancePlanPlanSpecificCostBenefit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """List of the specific benefits under this category of benefit."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Type of specific benefit (preventative; primary care office visit; speciality office visit; hospitalization; emergency room; urgent care).'
    cost: Sequence_['InsurancePlanPlanSpecificCostBenefitCost'] = Field(default_factory=list)
    'List of the costs associated with a specific benefit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InsurancePlanPlanSpecificCostBenefitCost(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """List of the costs associated with a specific benefit."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Type of cost (copay; individual cap; family cap; coinsurance; deductible).'
    value: Optional_['Quantity'] = Field(default=None)
    'The actual cost value. (some of the costs may be represented as percentages rather than currency, e.g. 10% coinsurance).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    qualifiers: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Additional information about the cost, such as information about funding sources (e.g. HSA, HRA, FSA, RRA).'
    applicability: Optional_['CodeableConcept'] = Field(default=None)
    'Whether the cost applies to in-network or out-of-network providers (in-network; out-of-network; other).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InsurancePlanPlanGeneralCost(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Overall costs associated with the plan."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of cost.'
    cost: Optional_['Money'] = Field(default=None)
    'Value of the cost.'
    comment: Optional_['string'] = Field(default=None)
    'Additional information about the general costs associated with this plan.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    groupSize: Optional_['positiveInt'] = Field(default=None)
    'Number of participants enrolled in the plan.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InsurancePlan(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details of a Health Insurance product/plan provided by an organization."""
    resourceType: Literal_['InsurancePlan'] = Field(default=...)
    'Details of a Health Insurance product/plan provided by an organization'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The kind of health insurance product.'
    name: Optional_['string'] = Field(default=None)
    'Official name of the health insurance product as designated by the owner.'
    plan: Sequence_['InsurancePlanPlan'] = Field(default_factory=list)
    'Details about an insurance plan.'
    alias: Sequence_['string'] = Field(default_factory=list)
    'A list of alternate names that the product is known as, or was known as in the past.'
    status: Optional_['code'] = Field(default=None)
    'The current state of the health insurance product.'
    period: Optional_['Period'] = Field(default=None)
    'The period of time that the health insurance product is available.'
    ownedBy: Optional_['Reference'] = Field(default=None)
    "The entity that is providing  the health insurance product and underwriting the risk.  This is typically an insurance carriers, other third-party payers, or health plan sponsors comonly referred to as 'payers'."
    contact: Sequence_['ExtendedContactDetail'] = Field(default_factory=list)
    'The contact details of communication devices available relevant to the specific Insurance Plan/Product. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.'
    network: Sequence_['Reference'] = Field(default_factory=list)
    'Reference to the network included in the health insurance product.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'The technical endpoints providing access to services operated for the health insurance product.'
    coverage: Sequence_['InsurancePlanCoverage'] = Field(default_factory=list)
    'Details about the coverage offered by the insurance product.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this health insurance product which remain constant as the resource is updated and propagates from server to server.'
    coverageArea: Sequence_['Reference'] = Field(default_factory=list)
    "The geographic region in which a health insurance product's benefits apply."
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    administeredBy: Optional_['Reference'] = Field(default=None)
    'An organization which administer other services such as underwriting, customer service and/or claims processing on behalf of the health insurance product owner.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InventoryItemResponsibleOrganization(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Organization(s) responsible for the product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: 'CodeableConcept' = Field(default=...)
    'The role of the organization e.g. manufacturer, distributor, etc.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    organization: 'Reference' = Field(default=...)
    'An organization that has an association with the item, e.g. manufacturer, distributor, responsible, etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InventoryItemCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The descriptive or identifying characteristics of the item."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of the attribute.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of the attribute.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of the attribute.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the attribute.'
    valueUrl: Optional_['url'] = Field(default=None)
    'The value of the attribute.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of the attribute.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the attribute.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the attribute.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The value of the attribute.'
    valueAnnotation: Optional_['Annotation'] = Field(default=None)
    'The value of the attribute.'
    valueAddress: Optional_['Address'] = Field(default=None)
    'The value of the attribute.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'The value of the attribute.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the attribute.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    characteristicType: 'CodeableConcept' = Field(default=...)
    'The type of characteristic that is being defined.'


class InventoryItemAssociation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Association with other items or products."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    quantity: 'Ratio' = Field(default=...)
    'The quantity of the related product in this product - Numerator is the quantity of the related product. Denominator is the quantity of the present product. For example a value of 20 means that this product contains 20 units of the related product; a value of 1:20 means the inverse - that the contained product contains 20 units of the present product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    relatedItem: 'Reference' = Field(default=...)
    'The related item or product.'
    associationType: 'CodeableConcept' = Field(default=...)
    "This attribute defined the type of association when establishing associations or relations between items, e.g. 'packaged within' or 'used with' or 'to be mixed with."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InventoryItemDescription(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The descriptive characteristics of the inventory item."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    language: Optional_['code'] = Field(default=None)
    "The language for the item description, when an item must be described in different languages and those languages may be authoritative and not translations of a 'main' language."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'Textual description of the item.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InventoryItemInstance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Instances or occurrences of the product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    expiry: Optional_['dateTime'] = Field(default=None)
    'The expiry date or date and time for the product.'
    subject: Optional_['Reference'] = Field(default=None)
    'The subject that the item is associated with.'
    location: Optional_['Reference'] = Field(default=None)
    'The location that the item is associated with.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    lotNumber: Optional_['string'] = Field(default=None)
    'The lot or batch number of the item.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'The identifier for the physical instance, typically a serial number.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InventoryItemName(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The item name(s) - the brand name, or common name, functional name, generic name."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'The name or designation that the item is given.'
    nameType: 'Coding' = Field(default=...)
    "The type of name e.g. 'brand-name', 'functional-name', 'common-name'."
    language: 'code' = Field(default=...)
    'The language that the item name is expressed in.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InventoryItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A functional description of an inventory item used in inventory and supply-related workflows."""
    resourceType: Literal_['InventoryItem'] = Field(default=...)
    'A functional description of an inventory item used in inventory and supply-related workflows'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Sequence_['InventoryItemName'] = Field(default_factory=list)
    'The item name(s) - the brand name, or common name, functional name, generic name.'
    status: 'code' = Field(default=...)
    'Status of the item entry.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Category or class of the item.'
    baseUnit: Optional_['CodeableConcept'] = Field(default=None)
    'The base unit of measure - the unit in which the product is used or counted.'
    instance: Optional_['InventoryItemInstance'] = Field(default=None)
    'Instances or occurrences of the product.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for the inventory item.'
    netContent: Optional_['Quantity'] = Field(default=None)
    'Net content or amount present in the item.'
    description: Optional_['InventoryItemDescription'] = Field(default=None)
    'The descriptive characteristics of the inventory item.'
    association: Sequence_['InventoryItemAssociation'] = Field(default_factory=list)
    'Association with other items or products.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    characteristic: Sequence_['InventoryItemCharacteristic'] = Field(default_factory=list)
    'The descriptive or identifying characteristics of the item.'
    inventoryStatus: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The usage status e.g. recalled, in use, discarded... This can be used to indicate that the items have been taken out of inventory, or are in use, etc.'
    productReference: Optional_['Reference'] = Field(default=None)
    'Link to a product resource used in clinical workflows.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    responsibleOrganization: Sequence_['InventoryItemResponsibleOrganization'] = Field(default_factory=list)
    'Organization(s) responsible for the product.'
    code: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Code designating the specific type of item.'


class InventoryReportInventoryListing(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An inventory listing section (grouped by any of the attributes)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: Sequence_['InventoryReportInventoryListingItem'] = Field(default_factory=list)
    'The item or items in this listing.'
    location: Optional_['Reference'] = Field(default=None)
    'Location of the inventory items.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    itemStatus: Optional_['CodeableConcept'] = Field(default=None)
    'The status of the items.'
    countingDateTime: Optional_['dateTime'] = Field(default=None)
    'The date and time when the items were counted.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InventoryReportInventoryListingItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The item or items in this listing."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: 'CodeableReference' = Field(default=...)
    'The code or reference to the item type.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    "The inventory category or classification of the items being reported. This is meant not for defining the product, but for inventory categories e.g. 'pending recount' or 'damaged'."
    quantity: 'Quantity' = Field(default=...)
    'The quantity of the item or items being reported.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InventoryReport(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A report of inventory or stock items."""
    resourceType: Literal_['InventoryReport'] = Field(default=...)
    'A report of inventory or stock items'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'A note associated with the InventoryReport.'
    status: 'code' = Field(default=...)
    'The status of the inventory check or notification - whether this is draft (e.g. the report is still pending some updates) or active.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reporter: Optional_['Reference'] = Field(default=None)
    'Who submits the report.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    countType: 'code' = Field(default=...)
    'Whether the report is about the current inventory count (snapshot) or a differential change in inventory (change).'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for the InventoryReport.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    operationType: Optional_['CodeableConcept'] = Field(default=None)
    'What type of operation is being performed - addition or subtraction.'
    reportingPeriod: Optional_['Period'] = Field(default=None)
    'The period the report refers to.'
    reportedDateTime: 'dateTime' = Field(default=...)
    'When the report has been submitted.'
    inventoryListing: Sequence_['InventoryReportInventoryListing'] = Field(default_factory=list)
    'An inventory listing section (grouped by any of the attributes).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    operationTypeReason: Optional_['CodeableConcept'] = Field(default=None)
    'The reason for this count - regular count, ad-hoc count, new arrivals, etc.'


class InvoiceParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what performed or participated in the charged service."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.'
    actor: 'Reference' = Field(default=...)
    'The device, practitioner, etc. who performed or participated in the service.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class InvoiceLineItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Each line item represents one charge for goods and services rendered. Details such.ofType(date), code and amount are found in the referenced ChargeItem resource."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    sequence: Optional_['positiveInt'] = Field(default=None)
    'Sequence in which the items appear on the invoice.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    servicedDate: Optional_['date'] = Field(default=None)
    'Date/time(s) range when this service was delivered or completed.'
    servicedPeriod: Optional_['Period'] = Field(default=None)
    'Date/time(s) range when this service was delivered or completed.'
    chargeItemReference: Optional_['Reference'] = Field(default=None)
    'The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.'
    chargeItemCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.'
    priceComponent: Sequence_['MonetaryComponent'] = Field(default_factory=list)
    'The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Invoice(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose."""
    resourceType: Literal_['Invoice'] = Field(default=...)
    'Invoice containing ChargeItems from an Account'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the invoice by the issuer, subject, or other participants.'
    status: 'code' = Field(default=...)
    'The current state of the Invoice.'
    issuer: Optional_['Reference'] = Field(default=None)
    'The organizationissuing the Invoice.'
    subject: Optional_['Reference'] = Field(default=None)
    'The individual or set of individuals receiving the goods and services billed in this invoice.'
    account: Optional_['Reference'] = Field(default=None)
    'Account which is supposed to be balanced with this Invoice.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    creation: Optional_['dateTime'] = Field(default=None)
    'Date/time(s) of when this Invoice was posted.'
    lineItem: Sequence_['InvoiceLineItem'] = Field(default_factory=list)
    'Each line item represents one charge for goods and services rendered. Details such.ofType(date), code and amount are found in the referenced ChargeItem resource.'
    totalNet: Optional_['Money'] = Field(default=None)
    'Invoice total , taxes excluded.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    recipient: Optional_['Reference'] = Field(default=None)
    'The individual or Organization responsible for balancing of this invoice.'
    periodDate: Optional_['date'] = Field(default=None)
    'Date/time(s) range of services included in this invoice.'
    periodPeriod: Optional_['Period'] = Field(default=None)
    'Date/time(s) range of services included in this invoice.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.'
    totalGross: Optional_['Money'] = Field(default=None)
    'Invoice total, tax included.'
    participant: Sequence_['InvoiceParticipant'] = Field(default_factory=list)
    'Indicates who or what performed or participated in the charged service.'
    paymentTerms: Optional_['markdown'] = Field(default=None)
    'Payment details such as banking details, period of payment, deductibles, methods of payment.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    cancelledReason: Optional_['string'] = Field(default=None)
    'In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    totalPriceComponent: Sequence_['MonetaryComponent'] = Field(default_factory=list)
    'The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions.  The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.'
    date: Optional_['dateTime'] = Field(default=None)
    'Depricared by the element below.'


class Library(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets."""
    resourceType: Literal_['Library'] = Field(default=...)
    'Represents a library of quality improvement components'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    type: 'CodeableConcept' = Field(default=...)
    'Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the library.'
    usage: Optional_['markdown'] = Field(default=None)
    'A detailed description of how the library is used from a clinical perspective.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.'
    status: 'code' = Field(default=...)
    'The status of this library. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the content.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this library is needed and why it has been designed as it has.'
    content: Sequence_['Attachment'] = Field(default_factory=list)
    'The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    subtitle: Optional_['string'] = Field(default=None)
    'An explanatory or alternate title for the library giving additional information about its content.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the library.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.'
    parameter: Sequence_['ParameterDefinition'] = Field(default_factory=list)
    'The parameter element defines parameters used by the library.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A code or group definition that describes the intended subject of the contents of the library.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'A code or group definition that describes the intended subject of the contents of the library.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate library instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the library from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the library is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the library content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, or bibliographic references.'
    dataRequirement: Sequence_['DataRequirement'] = Field(default_factory=list)
    'Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the library was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.'


class LinkageItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies which record considered as the reference to the same real-world occurrence as well as how the items should be evaluated within the collection of linked items."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'Distinguishes which item is "source of truth" (if any) and which items are no longer considered to be current representations.'
    resource: 'Reference' = Field(default=...)
    'The resource instance being linked as part of the group.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Linkage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies two or more records (resource instances) that refer to the same real-world "occurrence"."""
    resourceType: Literal_['Linkage'] = Field(default=...)
    "Links records for 'same' item"
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    item: Sequence_['LinkageItem'] = Field(default=...)
    'Identifies which record considered as the reference to the same real-world occurrence as well as how the items should be evaluated within the collection of linked items.'
    active: Optional_['boolean'] = Field(default=None)
    'Indicates whether the asserted set of linkages are considered to be "in effect".'
    author: Optional_['Reference'] = Field(default=None)
    'Identifies the user or organization responsible for asserting the linkages as well as the user or organization who establishes the context in which the nature of each linkage is evaluated.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ListEntry(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Entries in this list."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    flag: Optional_['CodeableConcept'] = Field(default=None)
    'The flag allows the system constructing the list to indicate the role and significance of the item in the list.'
    date: Optional_['dateTime'] = Field(default=None)
    'When this item was added to the list.'
    item: 'Reference' = Field(default=...)
    'A reference to the actual resource from which data was derived.'
    deleted: Optional_['boolean'] = Field(default=None)
    'True if this item is marked as deleted in the list.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class List(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A List is a curated collection of resources, for things such as problem lists, allergy lists, facility list, organization list, etc."""
    resourceType: Literal_['List'] = Field(default=...)
    'A list is a curated collection of resources'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    mode: 'code' = Field(default=...)
    'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.'
    date: Optional_['dateTime'] = Field(default=None)
    "Date list was last reviewed/revised and determined to be 'current'."
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments that apply to the overall list.'
    title: Optional_['string'] = Field(default=None)
    'A label for the list assigned by the author.'
    entry: Sequence_['ListEntry'] = Field(default_factory=list)
    'Entries in this list.'
    status: 'code' = Field(default=...)
    'Indicates the current state of this list.'
    source: Optional_['Reference'] = Field(default=None)
    'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.'
    subject: Sequence_['Reference'] = Field(default_factory=list)
    'The common subject(s) (or patient(s)) of the resources that are in the list if there is one (or a set of subjects).'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter that is the context in which this list was created.'
    orderedBy: Optional_['CodeableConcept'] = Field(default=None)
    'What order applies to the items in the list.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier for the List assigned for business purposes outside the context of FHIR.'
    emptyReason: Optional_['CodeableConcept'] = Field(default=None)
    'If the list is empty, why the list is empty.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['CodeableConcept'] = Field(default=None)
    'This code defines the purpose of the list - why it was created.'


class LocationPosition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    latitude: 'decimal' = Field(default=...)
    'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).'
    altitude: Optional_['decimal'] = Field(default=None)
    'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    longitude: 'decimal' = Field(default=...)
    'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Location(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details and position information for a place where services are provided and resources and participants may be stored, found, contained, or accommodated."""
    resourceType: Literal_['Location'] = Field(default=...)
    'Details and position information for a place'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'Name of the location as used by humans. Does not need to be unique.'
    mode: Optional_['code'] = Field(default=None)
    'Indicates whether a resource instance represents a specific location or a class of locations.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Indicates the type of function performed at the location.'
    form: Optional_['CodeableConcept'] = Field(default=None)
    'Physical form of the location, e.g. building, room, vehicle, road, virtual.'
    alias: Sequence_['string'] = Field(default_factory=list)
    'A list of alternate names that the location is known as, or was known as, in the past.'
    status: Optional_['code'] = Field(default=None)
    'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.'
    partOf: Optional_['Reference'] = Field(default=None)
    'Another Location of which this Location is physically a part of.'
    contact: Sequence_['ExtendedContactDetail'] = Field(default_factory=list)
    'The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.'
    address: Optional_['Address'] = Field(default=None)
    'Physical location.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    position: Optional_['LocationPosition'] = Field(default=None)
    'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'Technical endpoints providing access to services operated for the location.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique code or number identifying the location to its users.'
    description: Optional_['markdown'] = Field(default=None)
    'Description of the Location, which helps in finding or referencing the place.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    characteristic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Collection of characteristics (attributes).'
    virtualService: Sequence_['VirtualServiceDetail'] = Field(default_factory=list)
    'Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details).'
    hoursOfOperation: Sequence_['Availability'] = Field(default_factory=list)
    'What days/times during a week is this location usually open, and any exceptions where the location is not available.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    operationalStatus: Optional_['Coding'] = Field(default=None)
    'The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.'
    managingOrganization: Optional_['Reference'] = Field(default=None)
    'The organization responsible for the provisioning and upkeep of the location.'


class ManufacturedItemDefinitionComponent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Physical parts of the manufactured item, that it is intrisically made from. This is distinct from the ingredients that are part of its chemical makeup."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Defining type of the component e.g. shell, layer, ink.'
    amount: Sequence_['Quantity'] = Field(default_factory=list)
    'The measurable amount of total quantity of all substances in the component, expressable in different ways (e.g. by mass or volume).'
    function: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The function of this component within the item e.g. delivers active ingredient, masks taste.'
    property: Sequence_['ManufacturedItemDefinitionProperty'] = Field(default_factory=list)
    'General characteristics of this component.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    component: Sequence_['ManufacturedItemDefinitionComponent'] = Field(default_factory=list)
    'A component that this component contains or is made from.'
    constituent: Sequence_['ManufacturedItemDefinitionComponentConstituent'] = Field(default_factory=list)
    "A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient)."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ManufacturedItemDefinitionComponentConstituent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A reference to a constituent of the manufactured item as a whole, linked here so that its component location within the item can be indicated. This not where the item's ingredient are primarily stated (for which see Ingredient.for or ManufacturedItemDefinition.ingredient)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    amount: Sequence_['Quantity'] = Field(default_factory=list)
    'The measurable amount of the substance, expressable in different ways (e.g. by mass or volume).'
    location: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The physical location of the constituent/ingredient within the component. Example – if the component is the bead in the capsule, then the location would be where the ingredient resides within the product part – intragranular, extra-granular, etc.'
    function: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The function of this constituent within the component e.g. binder.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    hasIngredient: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The ingredient that is the constituent of the given component.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ManufacturedItemDefinitionProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """General characteristics of this item."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A code expressing the type of characteristic.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A value for the characteristic.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'A value for the characteristic.'
    valueDate: Optional_['date'] = Field(default=None)
    'A value for the characteristic.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'A value for the characteristic.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'A value for the characteristic.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'A value for the characteristic.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'A value for the characteristic.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ManufacturedItemDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product."""
    resourceType: Literal_['ManufacturedItemDefinition'] = Field(default=...)
    'The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A descriptive name applied to this item.'
    status: 'code' = Field(default=...)
    'The status of this item. Enables tracking the life-cycle of the content.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    property: Sequence_['ManufacturedItemDefinitionProperty'] = Field(default_factory=list)
    'General characteristics of this item.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    component: Sequence_['ManufacturedItemDefinitionComponent'] = Field(default_factory=list)
    'Physical parts of the manufactured item, that it is intrisically made from. This is distinct from the ingredients that are part of its chemical makeup.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique identifier.'
    ingredient: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The ingredients of this manufactured item. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource.'
    manufacturer: Sequence_['Reference'] = Field(default_factory=list)
    'Manufacturer of the item, one of several possible.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    marketingStatus: Sequence_['MarketingStatus'] = Field(default_factory=list)
    'Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    unitOfPresentation: Optional_['CodeableConcept'] = Field(default=None)
    'The “real-world” units in which the quantity of the manufactured item is described.'
    manufacturedDoseForm: 'CodeableConcept' = Field(default=...)
    'Dose form as manufactured and before any transformation into the pharmaceutical product.'


class MeasureSupplementalData(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.'
    usage: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.'
    linkId: Optional_['string'] = Field(default=None)
    'An identifier that is unique within the Measure allowing linkage to the equivalent item in a MeasureReport resource.'
    criteria: 'Expression' = Field(default=...)
    'The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'The human readable description of this supplemental data.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureGroup(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A group of population criteria for the measure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.'
    basis: Optional_['code'] = Field(default=None)
    'The population basis specifies the type of elements in the population. For a subject-based measure, this is boolean (because the subject and the population basis are the same, and the population criteria define yes/no values for each individual in the population). For measures that have a population basis that is different than the subject, this element specifies the type of the population basis. For example, an encounter-based measure has a subject of Patient and a population basis of Encounter, and the population criteria all return lists of Encounters.'
    linkId: Optional_['string'] = Field(default=None)
    'An identifier that is unique within the Measure allowing linkage to the equivalent item in a MeasureReport resource.'
    scoring: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.'
    library: Sequence_['canonical'] = Field(default_factory=list)
    'A reference to a Library resource containing the formal logic used by the measure group.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.'
    population: Sequence_['MeasureGroupPopulation'] = Field(default_factory=list)
    'A population criteria for the measure.'
    stratifier: Sequence_['MeasureGroupStratifier'] = Field(default_factory=list)
    'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.'
    description: Optional_['markdown'] = Field(default=None)
    'The human readable description of this population group.'
    scoringUnit: Optional_['CodeableConcept'] = Field(default=None)
    'Defines the expected units of measure for the measure score. This element SHOULD be specified as a UCUM unit.'
    rateAggregation: Optional_['markdown'] = Field(default=None)
    'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    improvementNotation: Optional_['CodeableConcept'] = Field(default=None)
    'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.'


class MeasureGroupStratifier(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.'
    linkId: Optional_['string'] = Field(default=None)
    'An identifier that is unique within the Measure allowing linkage to the equivalent item in a MeasureReport resource.'
    criteria: Optional_['Expression'] = Field(default=None)
    'An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    component: Sequence_['MeasureGroupStratifierComponent'] = Field(default_factory=list)
    'A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.'
    description: Optional_['markdown'] = Field(default=None)
    'The human readable description of this stratifier criteria.'
    groupDefinition: Optional_['Reference'] = Field(default=None)
    'A Group resource that defines this population as a set of characteristics.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureGroupStratifierComponent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.'
    linkId: Optional_['string'] = Field(default=None)
    'An identifier that is unique within the Measure allowing linkage to the equivalent item in a MeasureReport resource.'
    criteria: Optional_['Expression'] = Field(default=None)
    'An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'The human readable description of this stratifier criteria component.'
    groupDefinition: Optional_['Reference'] = Field(default=None)
    'A Group resource that defines this population as a set of characteristics.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureGroupPopulation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A population criteria for the measure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The type of population criteria.'
    linkId: Optional_['string'] = Field(default=None)
    'An identifier that is unique within the Measure allowing linkage to the equivalent population in a MeasureReport resource.'
    criteria: Optional_['Expression'] = Field(default=None)
    'An expression that specifies the criteria for the population, typically the name of an expression in a library.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'The human readable description of this population criteria.'
    groupDefinition: Optional_['Reference'] = Field(default=None)
    'A Group resource that defines this population as a set of characteristics.'
    aggregateMethod: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies which method should be used to aggregate measure observation values. For most scoring types, this is implied by scoring (e.g. a proportion measure counts members of the populations). For continuous variables, however, this information must be specified to ensure correct calculation.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    inputPopulationId: Optional_['string'] = Field(default=None)
    'The id of a population element in this measure that provides the input for this population criteria. In most cases, the scoring structure of the measure implies specific relationships (e.g. the Numerator uses the Denominator as the source in a proportion scoring). In some cases, however, multiple possible choices exist and must be resolved explicitly. For example in a ratio measure with multiple initial populations, the denominator must specify which population should be used as the starting point.'


class MeasureTerm(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Provides a description of an individual term used within the measure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A codeable representation of the defined term.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: Optional_['markdown'] = Field(default=None)
    'Provides a definition for the term as used within the measure.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Measure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The Measure resource provides the definition of a quality measure."""
    resourceType: Literal_['Measure'] = Field(default=...)
    'A quality measure definition'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.'
    term: Sequence_['MeasureTerm'] = Field(default_factory=list)
    'Provides a description of an individual term used within the measure.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the measure.'
    basis: Optional_['code'] = Field(default=None)
    'The population basis specifies the type of elements in the population. For a subject-based measure, this is boolean (because the subject and the population basis are the same, and the population criteria define yes/no values for each individual in the population). For measures that have a population basis that is different than the subject, this element specifies the type of the population basis. For example, an encounter-based measure has a subject of Patient and a population basis of Encounter, and the population criteria all return lists of Encounters.'
    usage: Optional_['markdown'] = Field(default=None)
    'A detailed description, from a clinical perspective, of how the measure is used.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.'
    group: Sequence_['MeasureGroup'] = Field(default_factory=list)
    'A group of population criteria for the measure.'
    status: 'code' = Field(default=...)
    'The status of this measure. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the content.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this measure is needed and why it has been designed as it has.'
    library: Sequence_['canonical'] = Field(default_factory=list)
    'A reference to a Library resource containing the formal logic used by the measure.'
    scoring: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    subtitle: Optional_['string'] = Field(default=None)
    'An explanatory or alternate title for the measure giving additional information about its content.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.'
    guidance: Optional_['markdown'] = Field(default=None)
    'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the measure.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.'
    rationale: Optional_['markdown'] = Field(default=None)
    'Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate measure instances.'
    disclaimer: Optional_['markdown'] = Field(default=None)
    'Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the measure from a consumer's perspective."
    scoringUnit: Optional_['CodeableConcept'] = Field(default=None)
    'Defines the expected units of measure for the measure score. This element SHOULD be specified as a UCUM unit.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the measure is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    riskAdjustment: Optional_['markdown'] = Field(default=None)
    'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the measure content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, or bibliographic references.'
    rateAggregation: Optional_['markdown'] = Field(default=None)
    'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.'
    compositeScoring: Optional_['CodeableConcept'] = Field(default=None)
    'If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.'
    supplementalData: Sequence_['MeasureSupplementalData'] = Field(default_factory=list)
    'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    improvementNotation: Optional_['CodeableConcept'] = Field(default=None)
    'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).'
    clinicalRecommendationStatement: Optional_['markdown'] = Field(default=None)
    'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the measure was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.'


class MeasureReportGroup(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The results of the calculation, one for each population group in the measure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The meaning of the population group as defined in the measure definition.'
    linkId: Optional_['string'] = Field(default=None)
    'The group from the Measure that corresponds to this group in the MeasureReport resource.'
    subject: Optional_['Reference'] = Field(default=None)
    'Optional subject identifying the individual or individuals the report is for.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    population: Sequence_['MeasureReportGroupPopulation'] = Field(default_factory=list)
    'The populations that make up the population group, one for each type of population appropriate for the measure.'
    stratifier: Sequence_['MeasureReportGroupStratifier'] = Field(default_factory=list)
    'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.'
    measureScoreQuantity: Optional_['Quantity'] = Field(default=None)
    'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.'
    measureScoreDateTime: Optional_['dateTime'] = Field(default=None)
    'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.'
    measureScoreCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.'
    measureScorePeriod: Optional_['Period'] = Field(default=None)
    'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.'
    measureScoreRange: Optional_['Range'] = Field(default=None)
    'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.'
    measureScoreDuration: Optional_['Duration'] = Field(default=None)
    'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureReportGroupStratifier(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The meaning of this stratifier, as defined in the measure definition.'
    linkId: Optional_['string'] = Field(default=None)
    'The stratifier from the Measure that corresponds to this stratifier in the MeasureReport resource.'
    stratum: Sequence_['MeasureReportGroupStratifierStratum'] = Field(default_factory=list)
    'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureReportGroupStratifierStratum(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    component: Sequence_['MeasureReportGroupStratifierStratumComponent'] = Field(default_factory=list)
    'A stratifier component value.'
    population: Sequence_['MeasureReportGroupStratifierStratumPopulation'] = Field(default_factory=list)
    'The populations that make up the stratum, one for each type of population appropriate to the measure.'
    measureScoreQuantity: Optional_['Quantity'] = Field(default=None)
    'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.'
    measureScoreDateTime: Optional_['dateTime'] = Field(default=None)
    'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.'
    measureScoreCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.'
    measureScorePeriod: Optional_['Period'] = Field(default=None)
    'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.'
    measureScoreRange: Optional_['Range'] = Field(default=None)
    'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.'
    measureScoreDuration: Optional_['Duration'] = Field(default=None)
    'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureReportGroupStratifierStratumPopulation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The populations that make up the stratum, one for each type of population appropriate to the measure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the population.'
    count: Optional_['integer'] = Field(default=None)
    'The number of members of the population in this stratum.'
    linkId: Optional_['string'] = Field(default=None)
    'The population from the Measure that corresponds to this population in the MeasureReport resource.'
    subjects: Optional_['Reference'] = Field(default=None)
    'Optional Group identifying the individuals that make up the population.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    subjectReport: Sequence_['Reference'] = Field(default_factory=list)
    'A reference to an individual level MeasureReport resource for a member of the population.'
    subjectResults: Optional_['Reference'] = Field(default=None)
    'This element refers to a List of individual level MeasureReport resources, one for each subject in this population in this stratum.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureReportGroupStratifierStratumComponent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A stratifier component value."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'The code for the stratum component value.'
    linkId: Optional_['string'] = Field(default=None)
    'The stratifier component from the Measure that corresponds to this stratifier component in the MeasureReport resource.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The stratum component value.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The stratum component value.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The stratum component value.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The stratum component value.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The stratum component value.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureReportGroupPopulation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The populations that make up the population group, one for each type of population appropriate for the measure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the population.'
    count: Optional_['integer'] = Field(default=None)
    'The number of members of the population.'
    linkId: Optional_['string'] = Field(default=None)
    'The population from the Measure that corresponds to this population in the MeasureReport resource.'
    subjects: Optional_['Reference'] = Field(default=None)
    'Optional Group identifying the individuals that make up the population.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    subjectReport: Sequence_['Reference'] = Field(default_factory=list)
    'A reference to an individual level MeasureReport resource for a member of the population.'
    subjectResults: Optional_['Reference'] = Field(default=None)
    'This element refers to a List of individual level MeasureReport resources, one for each subject in this population.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MeasureReport(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation."""
    resourceType: Literal_['MeasureReport'] = Field(default=...)
    'Results of a measure evaluation'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'code' = Field(default=...)
    'The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date this measure was calculated.'
    group: Sequence_['MeasureReportGroup'] = Field(default_factory=list)
    'The results of the calculation, one for each population group in the measure.'
    status: 'code' = Field(default=...)
    'The MeasureReport status. No data will be available until the MeasureReport status is complete.'
    period: 'Period' = Field(default=...)
    'The reporting period for which the report was calculated.'
    measure: Optional_['canonical'] = Field(default=None)
    'A reference to the Measure that was calculated to produce this report.'
    subject: Optional_['Reference'] = Field(default=None)
    'Optional subject identifying the individual or individuals the report is for.'
    scoring: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented. It is expected to be the same as the scoring element on the referenced Measure.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reporter: Optional_['Reference'] = Field(default=None)
    'The individual or organization that is reporting the data.'
    location: Optional_['Reference'] = Field(default=None)
    'A reference to the location for which the data is being reported.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    dataUpdateType: Optional_['code'] = Field(default=None)
    'Indicates whether the data submitted in a data-exchange report represents a snapshot or incremental update. A snapshot update replaces all previously submitted data for the receiver, whereas an incremental update represents only updated and/or changed data and should be applied as a differential update to the existing submitted data for the receiver.'
    reportingVendor: Optional_['Reference'] = Field(default=None)
    'A reference to the vendor who queried the data, calculated results and/or generated the report. The ‘reporting vendor’ is intended to represent the submitting entity when it is not the same as the reporting entity. This extension is used when the Receiver is interested in getting vendor information in the report.'
    inputParameters: Optional_['Reference'] = Field(default=None)
    'A reference to a Parameters resource (typically represented using a contained resource) that represents any input parameters that were provided to the operation that generated the report.'
    supplementalData: Sequence_['Reference'] = Field(default_factory=list)
    'A reference to a Resource that represents additional information collected for the report. If the value of the supplemental data is not a Resource (i.e. evaluating the supplementalData expression for this case in the measure results in a value that is not a FHIR Resource), it is reported as a reference to a contained Observation resource.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    evaluatedResource: Sequence_['Reference'] = Field(default_factory=list)
    'Evaluated resources are used to capture what data was involved in the calculation of a measure. This usage is only allowed for individual reports to ensure that the size of the MeasureReport resource is bounded.'
    improvementNotation: Optional_['CodeableConcept'] = Field(default=None)
    'Whether improvement in the measure is noted by an increase or decrease in the measure score.'


class MedicationIngredient(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies a particular constituent of interest in the product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: 'CodeableReference' = Field(default=...)
    'The ingredient (substance or medication) that the ingredient.strength relates to.  This is represented as a concept from a code system or described in another resource (Substance or Medication).'
    isActive: Optional_['boolean'] = Field(default=None)
    'Indication of whether this ingredient affects the therapeutic action of the drug.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    strengthRatio: Optional_['Ratio'] = Field(default=None)
    'Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.'
    strengthCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.'
    strengthQuantity: Optional_['Quantity'] = Field(default=None)
    'Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationBatch(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information that only applies to packages (not products)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    lotNumber: Optional_['string'] = Field(default=None)
    'The assigned lot number of a batch of the specified product.'
    expirationDate: Optional_['dateTime'] = Field(default=None)
    'When this specific batch of product will expire.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Medication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use."""
    resourceType: Literal_['Medication'] = Field(default=...)
    'Definition of a Medication'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    batch: Optional_['MedicationBatch'] = Field(default=None)
    'Information that only applies to packages (not products).'
    status: Optional_['code'] = Field(default=None)
    'A code to indicate if the medication is in active use.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    doseForm: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the form of the item.  Powder; tablets; capsule.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for this medication.'
    ingredient: Sequence_['MedicationIngredient'] = Field(default_factory=list)
    'Identifies a particular constituent of interest in the product.'
    definition: Optional_['Reference'] = Field(default=None)
    'A reference to a knowledge resource that provides more information about this medication.'
    totalVolume: Optional_['Quantity'] = Field(default=None)
    'When the specified product code does not infer a package size, this is the specific amount of drug in the product.  For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    marketingAuthorizationHolder: Optional_['Reference'] = Field(default=None)
    'The company or other legal entity that has authorization, from the appropriate drug regulatory authority,  to market a medicine in one or more jurisdictions.  Typically abbreviated MAH.Note:  The MAH may manufacture the product and may also contract the manufacturing of the product to one or more companies (organizations).'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.'


class MedicationAdministrationPerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The performer of the medication treatment.  For devices this is the device that performed the administration of the medication.  An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'CodeableReference' = Field(default=...)
    'Indicates who or what performed the medication administration.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of involvement of the performer in the medication administration.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationAdministrationDosage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes the medication dosage information details e.g. dose, rate, site, route, etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    text: Optional_['string'] = Field(default=None)
    'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered.'
    site: Optional_['CodeableConcept'] = Field(default=None)
    'A coded specification of the anatomic site where the medication first entered the body.  For example, "left arm".'
    dose: Optional_['Quantity'] = Field(default=None)
    'The amount of the medication given at one administration event.   Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.'
    route: Optional_['CodeableConcept'] = Field(default=None)
    'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient.  For example, topical, intravenous, etc.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.  This attribute will most often NOT be populated.  It is most commonly used for injections.  For example, Slow Push, Deep IV.'
    rateRatio: Optional_['Ratio'] = Field(default=None)
    'Identifies the speed with which the medication was or will be introduced into the patient.  Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours.  Other examples:  200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.'
    rateQuantity: Optional_['Quantity'] = Field(default=None)
    'Identifies the speed with which the medication was or will be introduced into the patient.  Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours.  Other examples:  200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationAdministration(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."""
    resourceType: Literal_['MedicationAdministration'] = Field(default=...)
    'Administration of medication to a patient'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Extra information about the medication administration that is not conveyed by the other attributes.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular event is a component or step.'
    status: 'code' = Field(default=...)
    'Will generally be set to show that the administration has been completed.  For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'A code, Condition or observation that supports why the medication was administered.'
    device: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The device that is to be used for the administration of the medication (for example, PCA Pump).'
    dosage: Optional_['MedicationAdministrationDosage'] = Field(default=None)
    'Describes the medication dosage information details e.g. dose, rate, site, route, etc.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan that is fulfilled in whole or in part by this MedicationAdministration.'
    subject: 'Reference' = Field(default=...)
    'The person or animal or group receiving the medication.'
    request: Optional_['Reference'] = Field(default=None)
    'The original request, instruction or authority to perform the administration.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication).'
    recorded: Optional_['dateTime'] = Field(default=None)
    'The date the occurrence of the  MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.'
    performer: Sequence_['MedicationAdministrationPerformer'] = Field(default_factory=list)
    'The performer of the medication treatment.  For devices this is the device that performed the administration of the medication.  An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.'
    medication: 'CodeableReference' = Field(default=...)
    'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.'
    isSubPotent: Optional_['boolean'] = Field(default=None)
    'An indication that the full dose was not administered.'
    statusReason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code indicating why the administration was not performed.'
    occurenceDateTime: Optional_['dateTime'] = Field(default=None)
    'A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.'
    occurencePeriod: Optional_['Period'] = Field(default=None)
    'A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.'
    occurenceTiming: Optional_['Timing'] = Field(default=None)
    'A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.'
    eventHistory: Sequence_['Reference'] = Field(default_factory=list)
    'A summary of the events of interest that have occurred, such as when the administration was verified.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    subPotentReason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The reason or reasons why the full dose was not administered.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    supportingInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Additional information (for example, patient height and weight) that supports the administration of the medication.  This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration.  For example, if the dose says "give "x" if the heartrate exceeds "y"", then the heart rate can be included using this attribute.'


class MedicationDispenseSubstitution(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates whether or not substitution was made as part of the dispense.  In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen.  This block explains what substitution did or did not happen and why.  If nothing is specified, substitution was not done."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'A code signifying whether a different drug was dispensed from what was prescribed.'
    reason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Indicates the reason for the substitution (or lack of substitution) from what was prescribed.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    wasSubstituted: 'boolean' = Field(default=...)
    'True if the dispenser dispensed a different drug or product from what was prescribed.'
    responsibleParty: Optional_['Reference'] = Field(default=None)
    'The person or organization that has primary responsibility for the substitution.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationDispensePerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what performed the event."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'The device, practitioner, etc. who performed the action.  It should be assumed that the actor is the dispenser of the medication.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of performer in the dispense.  For example, date enterer, packager, final checker.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationDispense(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order."""
    resourceType: Literal_['MedicationDispense'] = Field(default=...)
    'Dispensing a medication to a named patient'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Extra information about the dispense that could not be conveyed in the other attributes.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'The procedure or medication administration that triggered the dispense.'
    status: 'code' = Field(default=...)
    'A code specifying the state of the set of dispense events.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan that is fulfilled in whole or in part by this MedicationDispense.'
    subject: 'Reference' = Field(default=...)
    'A link to a resource representing the person or the group to whom the medication will be given.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Indicates the type of medication dispense (for example, drug classification like ATC, where meds would be administered, legal category of the medication.).'
    location: Optional_['Reference'] = Field(default=None)
    'The principal physical location where the dispense was performed.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount of medication that has been dispensed. Includes unit of measure.'
    recorded: Optional_['dateTime'] = Field(default=None)
    'The date (and maybe time) when the dispense activity started if whenPrepared or whenHandedOver is not populated.'
    receiver: Sequence_['Reference'] = Field(default_factory=list)
    'Identifies the person who picked up the medication or the location of where the medication was delivered.  This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional or a location.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter that establishes the context for this event.'
    performer: Sequence_['MedicationDispensePerformer'] = Field(default_factory=list)
    'Indicates who or what performed the event.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.'
    medication: 'CodeableReference' = Field(default=...)
    'Identifies the medication supplied. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.'
    daysSupply: Optional_['Quantity'] = Field(default=None)
    'The amount of medication expressed as a timing amount.'
    destination: Optional_['Reference'] = Field(default=None)
    'Identification of the facility/location where the medication was/will be shipped to, as part of the dispense event.'
    whenPrepared: Optional_['dateTime'] = Field(default=None)
    'The time when the dispensed product was packaged and reviewed.'
    substitution: Optional_['MedicationDispenseSubstitution'] = Field(default=None)
    'Indicates whether or not substitution was made as part of the dispense.  In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen.  This block explains what substitution did or did not happen and why.  If nothing is specified, substitution was not done.'
    eventHistory: Sequence_['Reference'] = Field(default_factory=list)
    'A summary of the events of interest that have occurred, such as when the dispense was verified.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    statusChanged: Optional_['dateTime'] = Field(default=None)
    'The date (and maybe time) when the status of the dispense record changed.'
    whenHandedOver: Optional_['dateTime'] = Field(default=None)
    'The time the dispensed product was provided to the patient or their representative.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    dosageInstruction: Sequence_['Dosage'] = Field(default_factory=list)
    'Indicates how the medication is to be used by the patient.'
    notPerformedReason: Optional_['CodeableReference'] = Field(default=None)
    'Indicates the reason why a dispense was not performed.'
    supportingInformation: Sequence_['Reference'] = Field(default_factory=list)
    "Additional information that supports the medication being dispensed.  For example, there may be requirements that a specific lab test has been completed prior to dispensing or the patient's weight at the time of dispensing is documented."
    authorizingPrescription: Sequence_['Reference'] = Field(default_factory=list)
    'Indicates the medication order that is being dispensed against.'
    renderedDosageInstruction: Optional_['markdown'] = Field(default=None)
    'The full representation of the dose of the medication included in all dosage instructions.  To be used when multiple dosage instructions are included to represent complex dosing such as increasing or tapering doses.'


class MedicationKnowledgeRelatedMedicationKnowledge(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Associated or related medications. For example, if the medication is a branded product (e.g. Crestor), this is the Therapeutic Moeity (e.g. Rosuvastatin) or if this is a generic medication (e.g. Rosuvastatin), this would link to a branded product (e.g. Crestor."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The category of the associated medication knowledge reference.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Sequence_['Reference'] = Field(default=...)
    'Associated documentation about the associated medication knowledge.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeMedicineClassification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Categorization of the medication within a formulary or classification system."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sourceString: Optional_['string'] = Field(default=None)
    'Either a textual source of the classification or a reference to an online source.'
    sourceUri: Optional_['uri'] = Field(default=None)
    'Either a textual source of the classification or a reference to an online source.'
    classification: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Specific category assigned to the medication (e.g. anti-infective, anti-hypertensive, antibiotic, etc.).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeIndicationGuideline(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Guidelines or protocols that are applicable for the administration of the medication based on indication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    indication: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Indication or reason for use of the medication that applies to the specific administration guideline.'
    dosingGuideline: Sequence_['MedicationKnowledgeIndicationGuidelineDosingGuideline'] = Field(default_factory=list)
    'The guidelines for the dosage of the medication for the indication.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeIndicationGuidelineDosingGuideline(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The guidelines for the dosage of the medication for the indication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    dosage: Sequence_['MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage'] = Field(default_factory=list)
    'Dosage for the medication for the specific guidelines.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    treatmentIntent: Optional_['CodeableConcept'] = Field(default=None)
    'The overall intention of the treatment, for example, prophylactic, supporative, curative, etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    patientCharacteristic: Sequence_['MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic'] = Field(default_factory=list)
    'Characteristics of the patient that are relevant to the administration guidelines (for example, height, weight, gender, etc.).'
    administrationTreatment: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the treatment that the guideline applies to, for example, long term therapy, first line treatment, etc.'


class MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Characteristics of the patient that are relevant to the administration guidelines (for example, height, weight, gender, etc.)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The categorization of the specific characteristic that is relevant to the administration guideline (e.g. height, weight, gender).'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The specific characteristic (e.g. height, weight, gender, etc.).'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The specific characteristic (e.g. height, weight, gender, etc.).'
    valueRange: Optional_['Range'] = Field(default=None)
    'The specific characteristic (e.g. height, weight, gender, etc.).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Dosage for the medication for the specific guidelines."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The type or category of dosage for a given medication (for example, prophylaxis, maintenance, therapeutic, etc.).'
    dosage: Sequence_['Dosage'] = Field(default=...)
    'Dosage for the medication for the specific guidelines.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeMonitoringProgram(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The program under which the medication is reviewed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of program under which the medication is monitored.'
    name: Optional_['string'] = Field(default=None)
    'Name of the reviewing program.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeStorageGuideline(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information on how the medication should be stored, for example, refrigeration temperatures and length of stability at a given temperature."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Additional notes about the storage.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['uri'] = Field(default=None)
    'Reference to additional information about the storage guidelines.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    stabilityDuration: Optional_['Duration'] = Field(default=None)
    'Duration that the medication remains stable if the environmentalSetting is respected.'
    environmentalSetting: Sequence_['MedicationKnowledgeStorageGuidelineEnvironmentalSetting'] = Field(default_factory=list)
    'Describes a setting/value on the environment for the adequate storage of the medication and other substances.  Environment settings may involve temperature, humidity, or exposure to light.'


class MedicationKnowledgeStorageGuidelineEnvironmentalSetting(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes a setting/value on the environment for the adequate storage of the medication and other substances.  Environment settings may involve temperature, humidity, or exposure to light."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Identifies the category or type of setting (e.g., type of location, temperature, humidity).'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Value associated to the setting. E.g., 40° – 50°F for temperature.'
    valueRange: Optional_['Range'] = Field(default=None)
    'Value associated to the setting. E.g., 40° – 50°F for temperature.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Value associated to the setting. E.g., 40° – 50°F for temperature.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeDefinitional(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Along with the link to a Medicinal Product Definition resource, this information provides common definitional elements that are needed to understand the specific medication that is being described."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    doseForm: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the form of the item.  Powder; tablets; capsule.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: Sequence_['Reference'] = Field(default_factory=list)
    'Associated definitions for this medication.'
    ingredient: Sequence_['MedicationKnowledgeDefinitionalIngredient'] = Field(default_factory=list)
    'Identifies a particular constituent of interest in the product.'
    intendedRoute: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The intended or approved route of administration.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    drugCharacteristic: Sequence_['MedicationKnowledgeDefinitionalDrugCharacteristic'] = Field(default_factory=list)
    'Specifies descriptive properties of the medicine, such as color, shape, imprints, etc.'


class MedicationKnowledgeDefinitionalDrugCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies descriptive properties of the medicine, such as color, shape, imprints, etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'A code specifying which characteristic of the medicine is being described (for example, colour, shape, imprint).'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Description of the characteristic.'
    valueString: Optional_['string'] = Field(default=None)
    'Description of the characteristic.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Description of the characteristic.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'Description of the characteristic.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'Description of the characteristic.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeDefinitionalIngredient(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies a particular constituent of interest in the product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: 'CodeableReference' = Field(default=...)
    'A reference to the resource that provides information about the ingredient.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Indication of whether this ingredient affects the therapeutic action of the drug.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    strengthRatio: Optional_['Ratio'] = Field(default=None)
    'Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.'
    strengthCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.'
    strengthQuantity: Optional_['Quantity'] = Field(default=None)
    'Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeRegulatory(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Regulatory information about a medication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    schedule: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Specifies the schedule of a medication in jurisdiction.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    maxDispense: Optional_['MedicationKnowledgeRegulatoryMaxDispense'] = Field(default=None)
    'The maximum number of units of the medication that can be dispensed in a period.'
    substitution: Sequence_['MedicationKnowledgeRegulatorySubstitution'] = Field(default_factory=list)
    'Specifies if changes are allowed when dispensing a medication from a regulatory perspective.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    regulatoryAuthority: 'Reference' = Field(default=...)
    'The authority that is specifying the regulations.'


class MedicationKnowledgeRegulatorySubstitution(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies if changes are allowed when dispensing a medication from a regulatory perspective."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Specifies the type of substitution allowed.'
    allowed: 'boolean' = Field(default=...)
    'Specifies if regulation allows for changes in the medication when dispensing.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeRegulatoryMaxDispense(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The maximum number of units of the medication that can be dispensed in a period."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    period: Optional_['Duration'] = Field(default=None)
    'The period that applies to the maximum number of units.'
    quantity: 'Quantity' = Field(default=...)
    'The maximum number of units of the medication that can be dispensed.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgePackaging(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information that only applies to packages (not products)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    cost: Sequence_['MedicationKnowledgeCost'] = Field(default_factory=list)
    'The cost of the packaged medication.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    packagedProduct: Optional_['Reference'] = Field(default=None)
    'A reference to a PackagedProductDefinition that provides the details of the product that is in the packaging and is being priced.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeMonograph(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Associated documentation about the medication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The category of documentation about the medication. (e.g. professional monograph, patient education monograph).'
    source: Optional_['Reference'] = Field(default=None)
    'Associated documentation about the medication.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledgeCost(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The price of the medication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    "The category of the cost information.  For example, manufacturers' cost, patient cost, claim reimbursement cost, actual acquisition cost."
    source: Optional_['string'] = Field(default=None)
    'The source or owner that assigns the price to the medication.'
    costMoney: Optional_['Money'] = Field(default=None)
    'The price or representation of the cost (for example, Band A, Band B or $, $$) of the medication.'
    costCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The price or representation of the cost (for example, Band A, Band B or $, $$) of the medication.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    effectiveDate: Sequence_['Period'] = Field(default_factory=list)
    'The date range for which the cost information of the medication is effective.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationKnowledge(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about a medication that is used to support knowledge."""
    resourceType: Literal_['MedicationKnowledge'] = Field(default=...)
    'Definition of Medication Knowledge'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Sequence_['string'] = Field(default_factory=list)
    'All of the names for a medication, for example, the name(s) given to a medication in different countries.  For example, acetaminophen and paracetamol or salbutamol and albuterol.'
    cost: Sequence_['MedicationKnowledgeCost'] = Field(default_factory=list)
    'The price of the medication.'
    status: Optional_['code'] = Field(default=None)
    'A code to indicate if the medication referred to by this MedicationKnowledge is in active use within the drug database or inventory system. The status refers to the validity about the information of the medication and not to its medicinal properties.'
    author: Optional_['Reference'] = Field(default=None)
    'The creator or owner of the knowledge or information about the medication.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    monograph: Sequence_['MedicationKnowledgeMonograph'] = Field(default_factory=list)
    'Associated documentation about the medication.'
    packaging: Sequence_['MedicationKnowledgePackaging'] = Field(default_factory=list)
    'Information that only applies to packages (not products).'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for this medication.'
    regulatory: Sequence_['MedicationKnowledgeRegulatory'] = Field(default_factory=list)
    'Regulatory information about a medication.'
    productType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Category of the medication or product (e.g. branded product, therapeutic moeity, generic product, innovator product, etc.).'
    definitional: Optional_['MedicationKnowledgeDefinitional'] = Field(default=None)
    'Along with the link to a Medicinal Product Definition resource, this information provides common definitional elements that are needed to understand the specific medication that is being described.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    clinicalUseIssue: Sequence_['Reference'] = Field(default_factory=list)
    'Potential clinical issue with or between medication(s) (for example, drug-drug interaction, drug-disease contraindication, drug-allergy interaction, etc.).'
    storageGuideline: Sequence_['MedicationKnowledgeStorageGuideline'] = Field(default_factory=list)
    'Information on how the medication should be stored, for example, refrigeration temperatures and length of stability at a given temperature.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    monitoringProgram: Sequence_['MedicationKnowledgeMonitoringProgram'] = Field(default_factory=list)
    'The program under which the medication is reviewed.'
    indicationGuideline: Sequence_['MedicationKnowledgeIndicationGuideline'] = Field(default_factory=list)
    'Guidelines or protocols that are applicable for the administration of the medication based on indication.'
    intendedJurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Lists the jurisdictions that this medication knowledge was written for.'
    associatedMedication: Sequence_['Reference'] = Field(default_factory=list)
    'Links to associated medications that could be prescribed, dispensed or administered.'
    preparationInstruction: Optional_['markdown'] = Field(default=None)
    'The instructions for preparing the medication.'
    medicineClassification: Sequence_['MedicationKnowledgeMedicineClassification'] = Field(default_factory=list)
    'Categorization of the medication within a formulary or classification system.'
    relatedMedicationKnowledge: Sequence_['MedicationKnowledgeRelatedMedicationKnowledge'] = Field(default_factory=list)
    'Associated or related medications. For example, if the medication is a branded product (e.g. Crestor), this is the Therapeutic Moeity (e.g. Rosuvastatin) or if this is a generic medication (e.g. Rosuvastatin), this would link to a branded product (e.g. Crestor.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code that specifies this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.'


class MedicationRequestDispenseRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order).  Note that this information is not always sent with the order.  There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount that is to be dispensed for one fill.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    dispenser: Optional_['Reference'] = Field(default=None)
    'Indicates the intended performing Organization that will dispense the medication as specified by the prescriber.'
    initialFill: Optional_['MedicationRequestDispenseRequestInitialFill'] = Field(default=None)
    'Indicates the quantity or duration for the first dispense of the medication.'
    validityPeriod: Optional_['Period'] = Field(default=None)
    'This indicates the validity period of a prescription (stale dating the Prescription).'
    dispenseInterval: Optional_['Duration'] = Field(default=None)
    'The minimum period of time that must occur between dispenses of the medication.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    dispenserInstruction: Sequence_['Annotation'] = Field(default_factory=list)
    'Provides additional information to the dispenser, for example, counselling to be provided to the patient.'
    doseAdministrationAid: Optional_['CodeableConcept'] = Field(default=None)
    'Provides information about the type of adherence packaging to be supplied for the medication dispense.'
    numberOfRepeatsAllowed: Optional_['unsignedInt'] = Field(default=None)
    'An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.  A prescriber may explicitly say that zero refills are permitted after the initial dispense.'
    expectedSupplyDuration: Optional_['Duration'] = Field(default=None)
    'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.'


class MedicationRequestDispenseRequestInitialFill(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates the quantity or duration for the first dispense of the medication."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount or quantity to provide as part of the first dispense.'
    duration: Optional_['Duration'] = Field(default=None)
    'The length of time that the first dispense is expected to last.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationRequestSubstitution(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    reason: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the reason for the substitution, or why substitution must or must not be performed.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    allowedBoolean: Optional_['boolean'] = Field(default=None)
    'True if the prescriber allows a different drug to be dispensed from what was prescribed.'
    allowedCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'True if the prescriber allows a different drug to be dispensed from what was prescribed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns."""
    resourceType: Literal_['MedicationRequest'] = Field(default=...)
    'Ordering of medication for patient or group'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Extra information about the prescription that could not be conveyed by the other attributes.'
    status: 'code' = Field(default=...)
    'A code specifying the current state of the order.  Generally, this will be active or completed state.'
    intent: 'code' = Field(default=...)
    'Whether the request is a proposal, plan, or an original order.'
    device: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The intended type of device that is to be used for the administration of the medication (for example, PCA Pump).'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The reason or the indication for ordering or not ordering the medication.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan or request that is fulfilled in whole or in part by this medication request.'
    subject: 'Reference' = Field(default=...)
    'The individual or group for whom the medication has been requested.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    "An arbitrary categorization or grouping of the medication request.  It could be used for indicating where meds are intended to be administered, eg. in an inpatient setting or in a patient's home, or a legal category of the medication."
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the Medication Request should be addressed with respect to other requests.'
    reported: Optional_['boolean'] = Field(default=None)
    "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report."
    recorder: Optional_['Reference'] = Field(default=None)
    'The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter during which this [x] was created or to which the creation of this record is tightly associated.'
    requester: Optional_['Reference'] = Field(default=None)
    'The individual, organization, or device that initiated the request and has responsibility for its activation.'
    performer: Sequence_['Reference'] = Field(default_factory=list)
    'The specified desired performer of the medication treatment (e.g. the performer of the medication administration).  For devices, this is the device that is intended to perform the administration of the medication.  An IV Pump would be an example of a device that is performing the administration.  Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.'
    insurance: Sequence_['Reference'] = Field(default_factory=list)
    'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.'
    medication: 'CodeableReference' = Field(default=...)
    'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.'
    authoredOn: Optional_['dateTime'] = Field(default=None)
    'The date (and perhaps time) when the prescription was initially written or authored on.'
    statusReason: Optional_['CodeableConcept'] = Field(default=None)
    'Captures the reason for the current state of the MedicationRequest.'
    doNotPerform: Optional_['boolean'] = Field(default=None)
    'If true, indicates that the provider is asking for the patient to either stop taking or to not start taking the specified medication. For example, the patient is taking an existing medication and the provider is changing their medication. They want to create two seperate requests: one to stop using the current medication and another to start the new medication.'
    substitution: Optional_['MedicationRequestSubstitution'] = Field(default=None)
    "Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done."
    eventHistory: Sequence_['Reference'] = Field(default_factory=list)
    'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    statusChanged: Optional_['dateTime'] = Field(default=None)
    'The date (and perhaps time) when the status was changed.'
    performerType: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the type of performer of the administration of the medication.'
    groupIdentifier: Optional_['Identifier'] = Field(default=None)
    'A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.'
    dispenseRequest: Optional_['MedicationRequestDispenseRequest'] = Field(default=None)
    'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order).  Note that this information is not always sent with the order.  There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    priorPrescription: Optional_['Reference'] = Field(default=None)
    'Reference to an order/prescription that is being replaced by this MedicationRequest.'
    informationSource: Sequence_['Reference'] = Field(default_factory=list)
    'The person or organization who provided the information about this request, if the source is someone other than the requestor.  This is often used when the MedicationRequest is reported by another person.'
    dosageInstruction: Sequence_['Dosage'] = Field(default_factory=list)
    'Specific instructions for how the medication is to be used by the patient.'
    courseOfTherapyType: Optional_['CodeableConcept'] = Field(default=None)
    'The description of the overall pattern of the administration of the medication to the patient.'
    effectiveDosePeriod: Optional_['Period'] = Field(default=None)
    'The period over which the medication is to be taken.  Where there are multiple dosageInstruction lines (for example, tapering doses), this is the earliest date and the latest end date of the dosageInstructions.'
    supportingInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Information to support fulfilling (i.e. dispensing or administering) of the medication, for example, patient height and weight, a MedicationStatement for the patient).'
    renderedDosageInstruction: Optional_['markdown'] = Field(default=None)
    'The full representation of the dose of the medication included in all dosage instructions.  To be used when multiple dosage instructions are included to represent complex dosing such as increasing or tapering doses.'


class MedicationStatementAdherence(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates whether the medication is or is not being consumed or administered."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Type of the adherence for the medication.'
    reason: Optional_['CodeableConcept'] = Field(default=None)
    'Captures the reason for the current use or adherence of a medication.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicationStatement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. 

The primary difference between a medicationstatement and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationstatement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.

The MedicationStatement resource was previously called MedicationStatement."""
    resourceType: Literal_['MedicationStatement'] = Field(default=...)
    'Record of medication being taken by a patient'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Provides extra information about the Medication Statement that is not conveyed by the other attributes.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular MedicationStatement is a component or step.'
    status: 'code' = Field(default=...)
    'A code representing the status of recording the medication statement.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'A concept, Condition or observation that supports why the medication is being/was taken.'
    dosage: Sequence_['Dosage'] = Field(default_factory=list)
    'Indicates how the medication is/was or should be taken by the patient.'
    subject: 'Reference' = Field(default=...)
    'The person, animal or group who is/was taking the medication.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Type of medication statement (for example, drug classification like ATC, where meds would be administered, legal category of the medication.).'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter that establishes the context for this MedicationStatement.'
    adherence: Optional_['MedicationStatementAdherence'] = Field(default=None)
    'Indicates whether the medication is or is not being consumed or administered.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.'
    medication: 'CodeableReference' = Field(default=...)
    'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.'
    derivedFrom: Sequence_['Reference'] = Field(default_factory=list)
    'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.'
    effectiveDateTime: Optional_['dateTime'] = Field(default=None)
    'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.adherence element is Not Taking).'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.adherence element is Not Taking).'
    effectiveTiming: Optional_['Timing'] = Field(default=None)
    'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.adherence element is Not Taking).'
    dateAsserted: Optional_['dateTime'] = Field(default=None)
    'The date when the Medication Statement was asserted by the information source.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    informationSource: Sequence_['Reference'] = Field(default_factory=list)
    'The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.'
    renderedDosageInstruction: Optional_['markdown'] = Field(default=None)
    'The full representation of the dose of the medication included in all dosage instructions.  To be used when multiple dosage instructions are included to represent complex dosing such as increasing or tapering doses.'
    relatedClinicalInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Link to information that is relevant to a medication statement, for example, illicit drug use, gestational age, etc.'


class MedicinalProductDefinitionCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Allows the key product features to be recorded, such as "sugar free", "modified release", "parallel import"."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A code expressing the type of characteristic.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A value for the characteristic.text.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'A value for the characteristic.text.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'A value for the characteristic.text.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'A value for the characteristic.text.'
    valueDate: Optional_['date'] = Field(default=None)
    'A value for the characteristic.text.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'A value for the characteristic.text.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'A value for the characteristic.text.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicinalProductDefinitionCrossReference(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Reference to another product, e.g. for linking authorised to investigational product, or a virtual product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of relationship, for instance branded to generic, virtual to actual product, product to development product (investigational), parallel import version.'
    product: 'CodeableReference' = Field(default=...)
    'Reference to another product, e.g. for linking authorised to investigational product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicinalProductDefinitionOperation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A manufacturing or administrative process or step associated with (or performed on) the medicinal product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableReference'] = Field(default=None)
    'The type of manufacturing operation e.g. manufacturing itself, re-packaging. For the authorization of this, a RegulatedAuthorization would point to the same plan or activity referenced here.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    organization: Sequence_['Reference'] = Field(default_factory=list)
    'The organization or establishment responsible for (or associated with) the particular process or step, examples include the manufacturer, importer, agent.'
    effectiveDate: Optional_['Period'] = Field(default=None)
    'Date range of applicability.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    confidentialityIndicator: Optional_['CodeableConcept'] = Field(default=None)
    'Specifies whether this particular business or manufacturing process is considered proprietary or confidential.'


class MedicinalProductDefinitionContact(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A product specific contact, person (in a role), or an organization."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Allows the contact to be classified, for example QPPV, Pharmacovigilance Enquiry Information.'
    contact: 'Reference' = Field(default=...)
    'A product specific contact, person (in a role), or an organization.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicinalProductDefinitionName(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The product's name, including full name and possibly coded parts."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of product name, such as rINN, BAN, Proprietary, Non-Proprietary.'
    part: Sequence_['MedicinalProductDefinitionNamePart'] = Field(default_factory=list)
    'Coding words or phrases of the name.'
    usage: Sequence_['MedicinalProductDefinitionNameUsage'] = Field(default_factory=list)
    'Country and jurisdiction where the name applies, and associated language.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    productName: 'string' = Field(default=...)
    'The full product name.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicinalProductDefinitionNameUsage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Country and jurisdiction where the name applies, and associated language."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    country: 'CodeableConcept' = Field(default=...)
    'Country code for where this name applies.'
    language: 'CodeableConcept' = Field(default=...)
    'Language code for this name.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    jurisdiction: Optional_['CodeableConcept'] = Field(default=None)
    'Jurisdiction code for where this name applies. A jurisdiction may be a sub- or supra-national entity (e.g. a state or a geographic region).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicinalProductDefinitionNamePart(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Coding words or phrases of the name."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    part: 'string' = Field(default=...)
    'A fragment of a product name.'
    type: 'CodeableConcept' = Field(default=...)
    'Identifying type for this part of the name (e.g. strength part).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MedicinalProductDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A medicinal product, being a substance or combination of substances that is intended to treat, prevent or diagnose a disease, or to restore, correct or modify physiological functions by exerting a pharmacological, immunological or metabolic action. This resource is intended to define and detail such products and their properties, for uses other than direct patient care (e.g. regulatory use, or drug catalogs)."""
    resourceType: Literal_['MedicinalProductDefinition'] = Field(default=...)
    'Detailed definition of a medicinal product'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Regulatory type, e.g. Investigational or Authorized.'
    name: Sequence_['MedicinalProductDefinitionName'] = Field(default=...)
    "The product's name, including full name and possibly coded parts."
    route: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The path by which the product is taken into or makes contact with the body. In some regions this is referred to as the licenced or approved route. See also AdministrableProductDefinition resource. MedicinalProductDefinition.route is the same concept as AdministrableProductDefinition.routeOfAdministration.code, and they cannot be used together.'
    domain: Optional_['CodeableConcept'] = Field(default=None)
    'If this medicine applies to human or veterinary uses.'
    status: Optional_['CodeableConcept'] = Field(default=None)
    'The status within the lifecycle of this product record. A high-level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization status.'
    version: Optional_['string'] = Field(default=None)
    'A business identifier relating to a specific version of the product, this is commonly used to support revisions to an existing product.'
    contact: Sequence_['MedicinalProductDefinitionContact'] = Field(default_factory=list)
    'A product specific contact, person (in a role), or an organization.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    impurity: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Any component of the drug product which is not the chemical entity defined as the drug substance, or an excipient in the drug product. This includes process-related impurities and contaminants, product-related impurities including degradation products.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Sequence_['MedicinalProductDefinitionOperation'] = Field(default_factory=list)
    'A manufacturing or administrative process or step associated with (or performed on) the medicinal product.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for this product. Could be an MPID. When in development or being regulated, products are typically referenced by official identifiers, assigned by a manufacturer or regulator, and unique to a product (which, when compared to a product instance being prescribed, is actually a product type). See also MedicinalProductDefinition.code.'
    statusDate: Optional_['dateTime'] = Field(default=None)
    'The date at which the given status became applicable.'
    indication: Optional_['markdown'] = Field(default=None)
    'Description of indication(s) for this product, used when structured indications are not required. In cases where structured indications are required, they are captured using the ClinicalUseDefinition resource. An indication is a medical situation for which using the product is appropriate.'
    ingredient: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The ingredients of this medicinal product - when not detailed in other resources. This is only needed if the ingredients are not specified by incoming references from the Ingredient resource, or indirectly via incoming AdministrableProductDefinition, PackagedProductDefinition or ManufacturedItemDefinition references. In cases where those levels of detail are not used, the ingredients may be specified directly here as codes.'
    masterFile: Sequence_['Reference'] = Field(default_factory=list)
    'A master file for the medicinal product (e.g. Pharmacovigilance System Master File). Drug master files (DMFs) are documents submitted to regulatory agencies to provide confidential detailed information about facilities, processes or articles used in the manufacturing, processing, packaging and storing of drug products.'
    description: Optional_['markdown'] = Field(default=None)
    'General description of this product.'
    comprisedOf: Sequence_['Reference'] = Field(default_factory=list)
    "Types of medicinal manufactured items and/or devices that this product consists of, such as tablets, capsule, or syringes. Used as a direct link when the item's packaging is not being recorded (see also PackagedProductDefinition.package.containedItem.item)."
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    clinicalTrial: Sequence_['Reference'] = Field(default_factory=list)
    'Clinical trials or studies that this product is involved in.'
    classification: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Allows the product to be classified by various systems, commonly WHO ATC.'
    crossReference: Sequence_['MedicinalProductDefinitionCrossReference'] = Field(default_factory=list)
    'Reference to another product, e.g. for linking authorised to investigational product, or a virtual product.'
    characteristic: Sequence_['MedicinalProductDefinitionCharacteristic'] = Field(default_factory=list)
    'Allows the key product features to be recorded, such as "sugar free", "modified release", "parallel import".'
    specialMeasures: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Whether the Medicinal Product is subject to special measures for regulatory reasons, such as a requirement to conduct post-authorization studies.'
    marketingStatus: Sequence_['MarketingStatus'] = Field(default_factory=list)
    "Marketing status of the medicinal product, in contrast to marketing authorization. This refers to the product being actually 'on the market' as opposed to being allowed to be on the market (which is an authorization)."
    attachedDocument: Sequence_['Reference'] = Field(default_factory=list)
    'Additional information or supporting documentation about the medicinal product.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    legalStatusOfSupply: Optional_['CodeableConcept'] = Field(default=None)
    'The legal status of supply of the medicinal product as classified by the regulator.'
    pediatricUseIndicator: Optional_['CodeableConcept'] = Field(default=None)
    'If authorised for use in children, or infants, neonates etc.'
    packagedMedicinalProduct: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Package type for the product. See also the PackagedProductDefinition resource.'
    additionalMonitoringIndicator: Optional_['CodeableConcept'] = Field(default=None)
    'Whether the Medicinal Product is subject to additional monitoring for regulatory reasons, such as heightened reporting requirements.'
    combinedPharmaceuticalDoseForm: Optional_['CodeableConcept'] = Field(default=None)
    'The dose form for a single part product, or combined form of a multiple part product. This is one concept that describes all the components. It does not represent the form with components physically mixed, if that might be necessary, for which see (AdministrableProductDefinition.administrableDoseForm).'
    code: Sequence_['Coding'] = Field(default_factory=list)
    'A code that this product is known by, usually within some formal terminology, perhaps assigned by a third party (i.e. not the manufacturer or regulator). Products (types of medications) tend to be known by identifiers during development and within regulatory process. However when they are prescribed they tend to be identified by codes. The same product may be have multiple codes, applied to it by multiple organizations.'


class MessageDefinitionAllowedResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates what types of messages may be sent as an application-level response to this message."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    message: 'canonical' = Field(default=...)
    'A reference to the message definition that must be adhered to by this supported response.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    situation: Optional_['markdown'] = Field(default=None)
    'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MessageDefinitionFocus(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies the resource (or resources) that are being addressed by the event.  For example, the Encounter for an admit message or two Account records for a merge."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    min: 'unsignedInt' = Field(default=...)
    'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.'
    max: Optional_['string'] = Field(default=None)
    'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.'
    profile: Optional_['canonical'] = Field(default=None)
    'A profile that reflects constraints for the focal resource (and potentially for related resources).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'The kind of resource that must be the focus for this message.'


class MessageDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted."""
    resourceType: Literal_['MessageDefinition'] = Field(default=...)
    'A resource that defines a type of message that can be exchanged between systems'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: 'dateTime' = Field(default=...)
    'The date  (and optionally time) when the message definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.'
    base: Optional_['canonical'] = Field(default=None)
    'The MessageDefinition that is the basis for the contents of this resource.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the message definition.'
    focus: Sequence_['MessageDefinitionFocus'] = Field(default_factory=list)
    'Identifies the resource (or resources) that are being addressed by the event.  For example, the Encounter for an admit message or two Account records for a merge.'
    graph: Optional_['canonical'] = Field(default=None)
    'Graph is Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a GraphDefinition that it controls what additional resources are to be added to the Bundle when building the message. The GraphDefinition can also specify profiles that apply to the various resources.'
    status: 'code' = Field(default=...)
    'The status of this message definition. Enables tracking the life-cycle of the content.'
    parent: Sequence_['canonical'] = Field(default_factory=list)
    'Identifies a protocol or workflow that this MessageDefinition represents a step in.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this message definition is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    replaces: Sequence_['canonical'] = Field(default_factory=list)
    'A MessageDefinition that is superseded by this definition.'
    eventCoding: Optional_['Coding'] = Field(default=None)
    'Event code or link to the EventDefinition.'
    eventUri: Optional_['uri'] = Field(default=None)
    'Event code or link to the EventDefinition.'
    category: Optional_['code'] = Field(default=None)
    'The impact of the content of the message.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the message definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the message definition from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the message definition is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    allowedResponse: Sequence_['MessageDefinitionAllowedResponse'] = Field(default_factory=list)
    'Indicates what types of messages may be sent as an application-level response to this message.'
    responseRequired: Optional_['code'] = Field(default=None)
    'Declare at a message definition level whether a response is required or only upon error or success, or never.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'


class MessageHeaderDestination(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The destination application which the message is intended for."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'Human-readable name for the target system.'
    target: Optional_['Reference'] = Field(default=None)
    'Identifies the target end system in situations where the initial message transmission is to an intermediary system.'
    receiver: Optional_['Reference'] = Field(default=None)
    "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    endpointUrl: Optional_['url'] = Field(default=None)
    'Indicates where the message should be routed.'
    endpointReference: Optional_['Reference'] = Field(default=None)
    'Indicates where the message should be routed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MessageHeaderResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the message that this message is a response to.  Only present if this message is a response."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    details: Optional_['Reference'] = Field(default=None)
    'Full details of any issues found in the message.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: 'Identifier' = Field(default=...)
    'The Bundle.identifier of the message to which this message is a response.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.'


class MessageHeaderSource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The source application from which this message originated."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'Human-readable name for the source system.'
    version: Optional_['string'] = Field(default=None)
    'Can convey versions of multiple systems in situations where a message passes through multiple hands.'
    contact: Optional_['ContactPoint'] = Field(default=None)
    'An e-mail, phone, website or other contact point to use to resolve issues with message communications.'
    software: Optional_['string'] = Field(default=None)
    'May include configuration or other information useful in debugging.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    endpointUrl: Optional_['url'] = Field(default=None)
    'Identifies the routing target to send acknowledgements to.'
    endpointReference: Optional_['Reference'] = Field(default=None)
    'Identifies the routing target to send acknowledgements to.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MessageHeader(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."""
    resourceType: Literal_['MessageHeader'] = Field(default=...)
    'A resource that describes a message that is exchanged between systems'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    focus: Sequence_['Reference'] = Field(default_factory=list)
    'The actual data of the message - a reference to the root/focus class of the event. This is allowed to be a Parameters resource.'
    sender: Optional_['Reference'] = Field(default=None)
    'Identifies the sending system to allow the use of a trust relationship.'
    author: Optional_['Reference'] = Field(default=None)
    'The logical author of the message - the personor device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.'
    source: 'MessageHeaderSource' = Field(default=...)
    'The source application from which this message originated.'
    reason: Optional_['CodeableConcept'] = Field(default=None)
    'Coded indication of the cause for the event - indicates  a reason for the occurrence of the event that is a focus of this message.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    eventCoding: Optional_['Coding'] = Field(default=None)
    'Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification are defined by the implementation.  Alternatively a canonical uri to the EventDefinition.'
    eventCanonical: Optional_['canonical'] = Field(default=None)
    'Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification are defined by the implementation.  Alternatively a canonical uri to the EventDefinition.'
    response: Optional_['MessageHeaderResponse'] = Field(default=None)
    'Information about the message that this message is a response to.  Only present if this message is a response.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: Optional_['canonical'] = Field(default=None)
    'Permanent link to the MessageDefinition for this message.'
    destination: Sequence_['MessageHeaderDestination'] = Field(default_factory=list)
    'The destination application which the message is intended for.'
    responsible: Optional_['Reference'] = Field(default=None)
    'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MetadataResource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Common Interface declaration for conformance and knowledge artifact resources."""
    resourceType: Literal_['MetadataResource'] = Field(default=...)
    'Common Interface declaration for definitional resources'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this {{title}} when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this {{title}} is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the {{title}} is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the {{title}}. This name should be usable as an identifier for the resource by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the {{title}}.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptive topics related to the content of the {{title}}. Topics provide a high-level categorization as well as keywords for the {{title}} that can be useful for filtering and searching.'
    status: 'code' = Field(default=...)
    'The current state of this {{title}}. '
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the {{title}}.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the {{title}}.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the {{title}} when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the {{title}} author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence without additional knowledge.  (See the versionAlgorithm element.)'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this {{title}} is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the {{title}}.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the {{title}} for use in some setting.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the {{title}}.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the {{title}} and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the {{title}}.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this {{title}} when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate {{title}}s.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the {{title}} from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this {{title}} is authored for testing purposes (or education/evaluation/marketing) and is not intended for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the {{title}} is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the {{title}} content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the {{title}} was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the {{title}} changes.'


class MolecularSequenceRelative(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A sequence defined relative to another sequence."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    edit: Sequence_['MolecularSequenceRelativeEdit'] = Field(default_factory=list)
    'Changes in sequence from the starting sequence.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sequenceRange: Optional_['Range'] = Field(default=None)
    "Indicates the nucleotide range in the composed sequence when multiple 'relative' elements are used together."
    ordinalPosition: Optional_['integer'] = Field(default=None)
    "Indicates the order in which the sequence should be considered when putting multiple 'relative' elements together."
    coordinateSystem: 'CodeableConcept' = Field(default=...)
    'These are different ways of identifying nucleotides or amino acids within a sequence. Different databases and file types may use different systems. For detail definitions, see https://loinc.org/92822-6/ for more detail.'
    startingSequence: Optional_['MolecularSequenceRelativeStartingSequence'] = Field(default=None)
    'A sequence that is used as a starting sequence to describe variants that are present in a sequence analyzed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MolecularSequenceRelativeStartingSequence(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A sequence that is used as a starting sequence to describe variants that are present in a sequence analyzed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    strand: Optional_['code'] = Field(default=None)
    "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    windowEnd: Optional_['integer'] = Field(default=None)
    'End position of the window on the starting sequence. This value should honor the rules of the  coordinateSystem.'
    chromosome: Optional_['CodeableConcept'] = Field(default=None)
    'Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).'
    sequenceCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The reference sequence that represents the starting sequence.'
    sequenceString: Optional_['string'] = Field(default=None)
    'The reference sequence that represents the starting sequence.'
    sequenceReference: Optional_['Reference'] = Field(default=None)
    'The reference sequence that represents the starting sequence.'
    windowStart: Optional_['integer'] = Field(default=None)
    'Start position of the window on the starting sequence. This value should honor the rules of the coordinateSystem.'
    orientation: Optional_['code'] = Field(default=None)
    'A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the "sense" strand, and the opposite complementary strand is the "antisense" strand.'
    genomeAssembly: Optional_['CodeableConcept'] = Field(default=None)
    'The genome assembly used for starting sequence, e.g. GRCh38.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class MolecularSequenceRelativeEdit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Changes in sequence from the starting sequence."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    end: Optional_['integer'] = Field(default=None)
    'End position of the edit on the starting sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.'
    start: Optional_['integer'] = Field(default=None)
    'Start position of the edit on the starting sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    replacedSequence: Optional_['string'] = Field(default=None)
    'Allele in the starting sequence. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the starting sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    replacementSequence: Optional_['string'] = Field(default=None)
    'Allele that was observed. Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.'


class MolecularSequence(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Representation of a molecular sequence."""
    resourceType: Literal_['MolecularSequence'] = Field(default=...)
    'Representation of a molecular sequence'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['code'] = Field(default=None)
    'Amino Acid Sequence/ DNA Sequence / RNA Sequence.'
    focus: Sequence_['Reference'] = Field(default_factory=list)
    'The actual focus of a molecular sequence when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, child, or sibling. For example, in trio testing, the subject would be the child (proband) and the focus would be the parent.'
    device: Optional_['Reference'] = Field(default=None)
    'The method for sequencing, for example, chip information.'
    subject: Optional_['Reference'] = Field(default=None)
    'Indicates the subject this sequence is associated too.'
    literal: Optional_['string'] = Field(default=None)
    'Sequence that was observed.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    specimen: Optional_['Reference'] = Field(default=None)
    'Specimen used for sequencing.'
    relative: Sequence_['MolecularSequenceRelative'] = Field(default_factory=list)
    'A sequence defined relative to another sequence.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    performer: Optional_['Reference'] = Field(default=None)
    'The organization or lab that should be responsible for this result.'
    formatted: Sequence_['Attachment'] = Field(default_factory=list)
    'Sequence that was observed as file content. Can be an actual file contents, or referenced by a URL to an external system.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier for this particular sequence instance.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NamingSystemUniqueId(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates how the system may be identified when referenced in electronic exchange."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'Identifies the unique identifier scheme used for this particular identifier.'
    value: 'string' = Field(default=...)
    'The string that should be sent over the wire to identify the code system or identifier system.'
    period: Optional_['Period'] = Field(default=None)
    'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic.'
    comment: Optional_['string'] = Field(default=None)
    'Notes about the past or intended usage of this identifier.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preferred: Optional_['boolean'] = Field(default=None)
    'Indicates whether this identifier is the "preferred" identifier of this type.'
    authoritative: Optional_['boolean'] = Field(default=None)
    'Indicates whether this identifier ie endorsed by the official owner of the associated naming system.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NamingSystem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a "System" used within the Identifier and Coding data types."""
    resourceType: Literal_['NamingSystem'] = Field(default=...)
    'System of unique identification'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this naming system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this naming system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the naming system is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    kind: 'code' = Field(default=...)
    'Indicates the purpose for the naming system - what kinds of things does it make unique?'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Categorizes a naming system for easier search by grouping related naming systems.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the naming system.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptions related to the content of the NamingSystem. Topics provide a high-level categorization as well as keywords for the NamingSystem that can be useful for filtering and searching.'
    usage: Optional_['string'] = Field(default=None)
    'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.'
    status: 'code' = Field(default=...)
    'The status of this naming system. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the NamingSystem.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the NamingSystem.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the naming system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the naming system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this naming system is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the NamingSystem.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the NamingSystem for use in some setting.'
    uniqueId: Sequence_['NamingSystemUniqueId'] = Field(default=...)
    'Indicates how the system may be identified when referenced in electronic exchange.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the naming system.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the naming system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the naming system.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this naming system when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate naming system instances.'
    responsible: Optional_['string'] = Field(default=None)
    'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this naming system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the naming system is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the NamingSystem content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which NamingSystem is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which NamingSystem is more current.'
    date: 'dateTime' = Field(default=...)
    'The date  (and optionally time) when the naming system was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.'


class NutritionIntakeIngredientLabel(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Total nutrient amounts for the whole meal, product, serving, etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    amount: 'Quantity' = Field(default=...)
    'Total amount of nutrient consumed.'
    nutrient: 'CodeableReference' = Field(default=...)
    'Total nutrient consumed. This could be a macronutrient (protein, fat, carbohydrate), or a vitamin and mineral.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionIntakeConsumedItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """What food or fluid product or item was consumed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'Indicates what a category of item that was consumed: e.g., food, fluid, enteral, etc.'
    rate: Optional_['Quantity'] = Field(default=None)
    'Rate at which enteral feeding was administered.'
    amount: Optional_['Quantity'] = Field(default=None)
    'Quantity of the specified food.'
    schedule: Optional_['Timing'] = Field(default=None)
    'Scheduled frequency of consumption.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    notConsumed: Optional_['boolean'] = Field(default=None)
    'Indicator when a patient is in a setting where it is helpful to know if food was not consumed, such as it was refused, held (as in tube feedings), or otherwise not provided. If a consumption is being recorded from an app, such as MyFitnessPal, this indicator will likely not be used.'
    nutritionProduct: 'CodeableReference' = Field(default=...)
    'Identifies the food or fluid product that was consumed. This is potentially a link to a resource representing the details of the food product (TBD) or a simple attribute carrying a code that identifies the food from a known list of foods.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    notConsumedReason: Optional_['CodeableConcept'] = Field(default=None)
    'Document the reason the food or fluid was not consumed, such as refused, held, etc.'


class NutritionIntakePerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Who performed the intake and how they were involved."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'Who performed the intake.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Type of performer.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionIntake(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of food or fluid that is being consumed by a patient.   A NutritionIntake may indicate that the patient may be consuming the food or fluid now or has consumed the food or fluid in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food or fluids consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label,  or from a clinician documenting observed intake."""
    resourceType: Literal_['NutritionIntake'] = Field(default=...)
    'Record of food or fluid being taken by a patient'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Provides extra information about the Nutrition Intake that is not conveyed by the other attributes.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular event is a component or step.'
    status: 'code' = Field(default=...)
    "A code representing the patient or other source's judgment about the state of the intake that this assertion is about.  Generally, this will be active or completed."
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'A reason, Condition or observation for why the food or fluid is /was consumed.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan, proposal or order that is fulfilled in whole or in part by this event.'
    subject: 'Reference' = Field(default=...)
    'The person, animal or group who is/was consuming the food or fluid.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    recorded: Optional_['dateTime'] = Field(default=None)
    'The date when the Nutrition Intake was asserted by the information source.'
    location: Optional_['Reference'] = Field(default=None)
    'Where the intake occurred.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter that establishes the context for this NutritionIntake.'
    performer: Sequence_['NutritionIntakePerformer'] = Field(default_factory=list)
    'Who performed the intake and how they were involved.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers associated with this Nutrition Intake that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.'
    reportedBoolean: Optional_['boolean'] = Field(default=None)
    'The person or organization that provided the information about the consumption of this food or fluid. Note: Use derivedFrom when a NutritionIntake is derived from other resources.'
    reportedReference: Optional_['Reference'] = Field(default=None)
    'The person or organization that provided the information about the consumption of this food or fluid. Note: Use derivedFrom when a NutritionIntake is derived from other resources.'
    derivedFrom: Sequence_['Reference'] = Field(default_factory=list)
    'Allows linking the NutritionIntake to the underlying NutritionOrder, or to other information, such as AllergyIntolerance, that supports or is used to derive the NutritionIntake.'
    statusReason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Captures the reason for the current state of the NutritionIntake.'
    consumedItem: Sequence_['NutritionIntakeConsumedItem'] = Field(default=...)
    'What food or fluid product or item was consumed.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'The interval of time during which it is being asserted that the patient is/was consuming the food or fluid.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'The interval of time during which it is being asserted that the patient is/was consuming the food or fluid.'
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'Instantiates external protocol or definition.'
    ingredientLabel: Sequence_['NutritionIntakeIngredientLabel'] = Field(default_factory=list)
    'Total nutrient amounts for the whole meal, product, serving, etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'Instantiates FHIR protocol or definition.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'Overall type of nutrition intake.'


class NutritionOrderEnteralFormula(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    additive: Sequence_['NutritionOrderEnteralFormulaAdditive'] = Field(default_factory=list)
    'Indicates modular components to be provided in addition or mixed with the base formula.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    deliveryDevice: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The intended type of device that is to be used for the administration of the enteral formula.'
    caloricDensity: Optional_['Quantity'] = Field(default=None)
    'The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz.  For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.'
    administration: Sequence_['NutritionOrderEnteralFormulaAdministration'] = Field(default_factory=list)
    'Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.'
    baseFormulaType: Optional_['CodeableReference'] = Field(default=None)
    'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    maxVolumeToDeliver: Optional_['Quantity'] = Field(default=None)
    'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.'
    routeOfAdministration: Optional_['CodeableConcept'] = Field(default=None)
    "The route or physiological path of administration into the patient's gastrointestinal  tract for purposes of providing the formula feeding, e.g. nasogastric tube."
    baseFormulaProductName: Optional_['string'] = Field(default=None)
    'The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula".'
    administrationInstruction: Optional_['markdown'] = Field(default=None)
    'Free text formula administration, feeding instructions or additional instructions or information.'


class NutritionOrderEnteralFormulaAdministration(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    rateQuantity: Optional_['Quantity'] = Field(default=None)
    'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.'
    rateRatio: Optional_['Ratio'] = Field(default=None)
    'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.'
    schedule: Optional_['NutritionOrderEnteralFormulaAdministrationSchedule'] = Field(default=None)
    'Schedule information for an enteral formula.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The volume of formula to provide to the patient per the specified administration schedule.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionOrderEnteralFormulaAdministrationSchedule(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Schedule information for an enteral formula."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    timing: Sequence_['Timing'] = Field(default_factory=list)
    'The time period and frequency at which the enteral formula should be given.  The enteral formula should be given for the combination of all schedules if more than one schedule is present.'
    asNeeded: Optional_['boolean'] = Field(default=None)
    'Indicates whether the enteral formula is only taken when needed within a specific dosing schedule.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    asNeededFor: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates whether the enteral formula is only taken based on a precondition for taking the enteral formula.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionOrderEnteralFormulaAdditive(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates modular components to be provided in addition or mixed with the base formula."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableReference'] = Field(default=None)
    'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount of additive to be given in addition or to be mixed in with the base formula.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    productName: Optional_['string'] = Field(default=None)
    'The product or brand name of the type of modular component to be added to the formula.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionOrderSupplement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Oral nutritional products given in order to add further nutritional value to the patient's diet."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableReference'] = Field(default=None)
    'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.'
    schedule: Optional_['NutritionOrderSupplementSchedule'] = Field(default=None)
    'Schedule information for a supplement.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount of the nutritional supplement to be given.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    productName: Optional_['string'] = Field(default=None)
    'The product or brand name of the nutritional supplement such as "Acme Protein Shake".'
    instruction: Optional_['string'] = Field(default=None)
    'Free text or additional instructions or information pertaining to the oral supplement.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionOrderSupplementSchedule(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Schedule information for a supplement."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    timing: Sequence_['Timing'] = Field(default_factory=list)
    'The time period and frequency at which the supplement should be given.  The supplement should be given for the combination of all schedules if more than one schedule is present.'
    asNeeded: Optional_['boolean'] = Field(default=None)
    'Indicates whether the supplement is only taken when needed within a specific dosing schedule.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    asNeededFor: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates whether the supplement is only taken based on a precondition for taking the supplement.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionOrderOralDiet(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Diet given orally in contrast to enteral (tube) feeding."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.'
    texture: Sequence_['NutritionOrderOralDietTexture'] = Field(default_factory=list)
    'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.'
    schedule: Optional_['NutritionOrderOralDietSchedule'] = Field(default=None)
    'Schedule information for an oral diet.'
    nutrient: Sequence_['NutritionOrderOralDietNutrient'] = Field(default_factory=list)
    'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    instruction: Optional_['string'] = Field(default=None)
    'Free text or additional instructions or information pertaining to the oral diet.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    fluidConsistencyType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.'


class NutritionOrderOralDietNutrient(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    amount: Optional_['Quantity'] = Field(default=None)
    'The quantity of the specified nutrient to include in diet.'
    modifier: Optional_['CodeableConcept'] = Field(default=None)
    'The nutrient that is being modified such as carbohydrate or sodium.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionOrderOralDietSchedule(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Schedule information for an oral diet."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    timing: Sequence_['Timing'] = Field(default_factory=list)
    'The time period and frequency at which the diet should be given.  The diet should be given for the combination of all schedules if more than one schedule is present.'
    asNeeded: Optional_['boolean'] = Field(default=None)
    'Indicates whether the product is only taken when needed within a specific dosing schedule.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    asNeededFor: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates whether the product is only taken based on a precondition for taking the product.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionOrderOralDietTexture(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Class that describes any texture modifications required for the patient to safely consume various types of solid foods."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    modifier: Optional_['CodeableConcept'] = Field(default=None)
    'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.'
    foodType: Optional_['CodeableConcept'] = Field(default=None)
    'The food type(s) (e.g. meats, all foods)  that the texture modification applies to.  This could be all foods types.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionOrder(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."""
    resourceType: Literal_['NutritionOrder'] = Field(default=...)
    'Diet, formula or nutritional supplement request'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the {{title}} by the requester, performer, subject or other participants.'
    status: 'code' = Field(default=...)
    'The workflow status of the nutrition order/request.'
    intent: 'code' = Field(default=...)
    'Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan or request that is fulfilled in whole or in part by this nutrition order.'
    subject: 'Reference' = Field(default=...)
    'The person or set of individuals who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.'
    orderer: Optional_['Reference'] = Field(default=None)
    'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the Nutrition Order should be addressed with respect to other        requests.'
    oralDiet: Optional_['NutritionOrderOralDiet'] = Field(default=None)
    'Diet given orally in contrast to enteral (tube) feeding.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'An encounter that provides additional information about the healthcare context in which this request is made.'
    performer: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The specified desired performer of the nutrition order.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers assigned to this order by the order sender or by the order receiver.'
    supplement: Sequence_['NutritionOrderSupplement'] = Field(default_factory=list)
    "Oral nutritional products given in order to add further nutritional value to the patient's diet."
    instantiates: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    enteralFormula: Optional_['NutritionOrderEnteralFormula'] = Field(default=None)
    'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.'
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.'
    groupIdentifier: Optional_['Identifier'] = Field(default=None)
    'A shared identifier common to all nutrition orders that were authorized more or less simultaneously by a single author, representing the composite or group identifier.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    allergyIntolerance: Sequence_['Reference'] = Field(default_factory=list)
    'A link to a record of allergies or intolerances  which should be included in the nutrition order.'
    outsideFoodAllowed: Optional_['boolean'] = Field(default=None)
    'This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family.  If set to true, indicates that the receiving system does not need to supply the food item.'
    excludeFoodModifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or  Gluten-Free.  While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason.  This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.'
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.'
    supportingInformation: Sequence_['Reference'] = Field(default_factory=list)
    'Information to support fulfilling (i.e. dispensing or administering) of the nutrition,        for example, patient height and weight).'
    foodPreferenceModifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.'
    dateTime: 'dateTime' = Field(default=...)
    'The date and time that this nutrition order was requested.'


class NutritionProductCharacteristic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies descriptive properties of the nutrition product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A code specifying which characteristic of the product is being described (for example, colour, shape).'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The actual characteristic value corresponding to the type.'
    valueString: Optional_['string'] = Field(default=None)
    'The actual characteristic value corresponding to the type.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The actual characteristic value corresponding to the type.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'The actual characteristic value corresponding to the type.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The actual characteristic value corresponding to the type.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The actual characteristic value corresponding to the type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionProductIngredient(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Ingredients contained in this product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: 'CodeableReference' = Field(default=...)
    'The ingredient contained in the product.'
    amount: Sequence_['Ratio'] = Field(default_factory=list)
    'The amount of ingredient that is in the product.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionProductInstance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Conveys instance-level information about this product item. One or several physical, countable instances or occurrences of the product."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'The name for the specific product.'
    useBy: Optional_['dateTime'] = Field(default=None)
    'The time after which the product is no longer expected to be in proper condition, or its use is not advised or not allowed.'
    expiry: Optional_['dateTime'] = Field(default=None)
    'The time after which the product is no longer expected to be in proper condition, or its use is not advised or not allowed.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount of items or instances that the resource considers, for instance when referring to 2 identical units together.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    lotNumber: Optional_['string'] = Field(default=None)
    'The identification of the batch or lot of the product.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'The identifier for the physical instance, typically a serial number or manufacturer number.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    biologicalSourceEvent: Optional_['Identifier'] = Field(default=None)
    'An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.'


class NutritionProductNutrient(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The product's nutritional information expressed by the nutrients."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: Optional_['CodeableReference'] = Field(default=None)
    'The (relevant) nutrients in the product.'
    amount: Sequence_['Ratio'] = Field(default_factory=list)
    'The amount of nutrient expressed in one or more units: X per pack / per serving / per dose.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class NutritionProduct(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A food or supplement that is consumed by patients."""
    resourceType: Literal_['NutritionProduct'] = Field(default=...)
    'A product used for nutritional purposes (i.e. food or supplement)'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the product.'
    status: 'code' = Field(default=...)
    'The current state of the product.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Nutrition products can have different classifications - according to its nutritional properties, preparation methods, etc.'
    nutrient: Sequence_['NutritionProductNutrient'] = Field(default_factory=list)
    "The product's nutritional information expressed by the nutrients."
    instance: Sequence_['NutritionProductInstance'] = Field(default_factory=list)
    'Conveys instance-level information about this product item. One or several physical, countable instances or occurrences of the product.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    ingredient: Sequence_['NutritionProductIngredient'] = Field(default_factory=list)
    'Ingredients contained in this product.'
    manufacturer: Sequence_['Reference'] = Field(default_factory=list)
    'The organisation (manufacturer, representative or legal authorization holder) that is responsible for the device.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    knownAllergen: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Allergens that are known or suspected to be a part of this nutrition product.'
    characteristic: Sequence_['NutritionProductCharacteristic'] = Field(default_factory=list)
    'Specifies descriptive properties of the nutrition product.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The code assigned to the product, for example a USDA NDB number, a USDA FDC ID number, or a Langual code.'


class ObservationReferenceRange(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an "OR".   In other words, to represent two distinct target populations, two `referenceRange` elements would be used."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    low: Optional_['Quantity'] = Field(default=None)
    'The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is <=2.3).'
    age: Optional_['Range'] = Field(default=None)
    'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.'
    high: Optional_['Quantity'] = Field(default=None)
    'The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9). If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is >= 2.3).'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.'
    text: Optional_['markdown'] = Field(default=None)
    'Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of "Negative" or a list or table of "normals".'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    appliesTo: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.  Multiple `appliesTo`  are interpreted as an "AND" of the target populations.  For example, to represent a target population of African American females, both a code of female and a code for African American would be used.'
    normalValue: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the normal value of the reference range.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ObservationTriggeredBy(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies the observation(s) that triggered the performance of this observation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of trigger.\nReflex | Repeat | Re-run.'
    reason: Optional_['string'] = Field(default=None)
    'Provides the reason why this observation was performed as a result of the observation(s) referenced.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    observation: 'Reference' = Field(default=...)
    'Reference to the triggering observation.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ObservationComponent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Describes what was observed. Sometimes this is called the observation "code".'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueString: Optional_['string'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueTime: Optional_['time'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    interpretation: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A categorical assessment of an observation value.  For example, high, low, normal.'
    referenceRange: Sequence_['ObservationReferenceRange'] = Field(default_factory=list)
    'Guidance on how to interpret the value by comparison to a normal or recommended range.'
    dataAbsentReason: Optional_['CodeableConcept'] = Field(default=None)
    'Provides a reason why the expected value in the element Observation.component.value[x] is missing.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Observation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Measurements and simple assertions made about a patient, device or other subject."""
    resourceType: Literal_['Observation'] = Field(default=...)
    'Measurements and simple assertions'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments about the observation or the results.'
    focus: Sequence_['Reference'] = Field(default_factory=list)
    "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus."
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular Observation is a component or step.  For example,  an observation as part of a procedure.'
    status: 'code' = Field(default=...)
    'The status of the result value.'
    issued: Optional_['instant'] = Field(default=None)
    'The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the mechanism used to perform the observation.'
    device: Optional_['Reference'] = Field(default=None)
    'A reference to the device that generates the measurements or the device settings for the device.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan, proposal or order that is fulfilled in whole or in part by this event.  For example, a MedicationRequest may require a patient to have laboratory test performed before  it is dispensed.'
    subject: Optional_['Reference'] = Field(default=None)
    'The patient, or group of patients, location, device, organization, procedure or practitioner this observation is about and into whose or what record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that classifies the general type of observation being made.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueString: Optional_['string'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueTime: Optional_['time'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The information determined as a result of making the observation, if the information has a simple value.'
    bodySite: Optional_['CodeableConcept'] = Field(default=None)
    "Indicates the site on the subject's body where the observation was made (i.e. the target site)."
    specimen: Optional_['Reference'] = Field(default=None)
    'The specimen that was used when this observation was made.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made.'
    performer: Sequence_['Reference'] = Field(default_factory=list)
    'Who was responsible for asserting the observed value as "true".'
    hasMember: Sequence_['Reference'] = Field(default_factory=list)
    'This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.'
    component: Sequence_['ObservationComponent'] = Field(default_factory=list)
    'Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this observation.'
    triggeredBy: Sequence_['ObservationTriggeredBy'] = Field(default_factory=list)
    'Identifies the observation(s) that triggered the performance of this observation.'
    derivedFrom: Sequence_['Reference'] = Field(default_factory=list)
    'The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.'
    effectiveDateTime: Optional_['dateTime'] = Field(default=None)
    'The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.'
    effectiveTiming: Optional_['Timing'] = Field(default=None)
    'The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.'
    effectiveInstant: Optional_['instant'] = Field(default=None)
    'The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the "physiologically relevant time". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    bodyStructure: Optional_['Reference'] = Field(default=None)
    "Indicates the body structure on the subject's body where the observation was made (i.e. the target site)."
    interpretation: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A categorical assessment of an observation value.  For example, high, low, normal.'
    referenceRange: Sequence_['ObservationReferenceRange'] = Field(default_factory=list)
    'Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an "OR".   In other words, to represent two distinct target populations, two `referenceRange` elements would be used.'
    instantiatesCanonical: Optional_['canonical'] = Field(default=None)
    'The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.'
    instantiatesReference: Optional_['Reference'] = Field(default=None)
    'The reference to a FHIR ObservationDefinition resource that provides the definition that is adhered to in whole or in part by this Observation instance.'
    dataAbsentReason: Optional_['CodeableConcept'] = Field(default=None)
    'Provides a reason why the expected value in the element Observation.value[x] is missing.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'CodeableConcept' = Field(default=...)
    'Describes what was observed. Sometimes this is called the observation "name".'


class ObservationDefinitionQualifiedValue(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of qualified values associated with a context and a set of conditions -  provides a range for quantitative and ordinal observations and a collection of value sets for qualitative observations."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    age: Optional_['Range'] = Field(default=None)
    'The age range this  set of qualified values applies to.'
    range: Optional_['Range'] = Field(default=None)
    'The range of values defined for continuous or ordinal observations that match the criteria of this set of qualified values.'
    gender: Optional_['code'] = Field(default=None)
    'The gender this  set of qualified values applies to.'
    context: Optional_['CodeableConcept'] = Field(default=None)
    'A concept defining the context for this set of qualified values.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    appliesTo: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The target population this  set of qualified values applies to.'
    condition: Optional_['string'] = Field(default=None)
    'Text based condition for which the the set of qualified values is valid.'
    rangeCategory: Optional_['code'] = Field(default=None)
    'The category of range of values for continuous or ordinal observations that match the criteria of this set of qualified values.'
    gestationalAge: Optional_['Range'] = Field(default=None)
    'The gestational age this  set of qualified values applies to.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    validCodedValueSet: Optional_['canonical'] = Field(default=None)
    'The set of valid coded results for qualitative observations  that match the criteria of this set of qualified values.'
    normalCodedValueSet: Optional_['canonical'] = Field(default=None)
    'The set of normal coded results for qualitative observations  that match the criteria of this set of qualified values.'
    abnormalCodedValueSet: Optional_['canonical'] = Field(default=None)
    'The set of abnormal coded results for qualitative observations  that match the criteria of this set of qualified values.'
    criticalCodedValueSet: Optional_['canonical'] = Field(default=None)
    'The set of critical coded results for qualitative observations  that match the criteria of this set of qualified values.'


class ObservationDefinitionComponent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Some observations have multiple component observations, expressed as separate code value pairs."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    permittedUnit: Sequence_['Coding'] = Field(default_factory=list)
    'Units allowed for the valueQuantity element in the instance observations conforming to this ObservationDefinition.'
    qualifiedValue: Sequence_['ObservationDefinitionQualifiedValue'] = Field(default_factory=list)
    'A set of qualified values associated with a context and a set of conditions -  provides a range for quantitative and ordinal observations and a collection of value sets for qualitative observations.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    permittedDataType: Sequence_['code'] = Field(default_factory=list)
    'The data types allowed for the value element of the instance of this component observations.'
    code: 'CodeableConcept' = Field(default=...)
    'Describes what will be observed.'


class ObservationDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service."""
    resourceType: Literal_['ObservationDefinition'] = Field(default=...)
    'Definition of an observation'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URL that is used to identify this ObservationDefinition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this ObservationDefinition is (or will be) published. The URL SHOULD include the major version of the ObservationDefinition. For more information see Technical and Business Versions.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the ObservationDefinition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the ObservationDefinition.'
    status: 'code' = Field(default=...)
    'The current state of the ObservationDefinition.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'The method or technique used to perform the observation.'
    device: Sequence_['Reference'] = Field(default_factory=list)
    'The measurement model of device or actual device used to produce observations of this type.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the ObservationDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the ObservationDefinition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explains why this ObservationDefinition is needed and why it has been designed as it has.'
    subject: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that describes the intended kind of subject of Observation instances conforming to this ObservationDefinition.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that classifies the general type of observation.'
    bodySite: Optional_['CodeableConcept'] = Field(default=None)
    "The site on the subject's body where the  observation is to be made."
    specimen: Sequence_['Reference'] = Field(default_factory=list)
    'The kind of specimen that this type of observation is produced on.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'Helps establish the "authority/credibility" of the ObservationDefinition. May also allow for contact.'
    copyright: Optional_['markdown'] = Field(default=None)
    'Copyright statement relating to the ObservationDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the ObservationDefinition.'
    hasMember: Sequence_['Reference'] = Field(default_factory=list)
    'This ObservationDefinition defines a group  observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.'
    component: Sequence_['ObservationDefinitionComponent'] = Field(default_factory=list)
    'Some observations have multiple component observations, expressed as separate code value pairs.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Business identifiers assigned to this ObservationDefinition. by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate ObservationDefinition instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the ObservationDefinition from the consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A flag to indicate that this ObservationDefinition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A jurisdiction in which the ObservationDefinition is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    performerType: Optional_['CodeableConcept'] = Field(default=None)
    'The type of individual/organization/device that is expected to act upon instances of this definition.'
    permittedUnit: Sequence_['Coding'] = Field(default_factory=list)
    'Units allowed for the valueQuantity element in the instance observations conforming to this ObservationDefinition.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    "The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date."
    derivedFromUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally-defined observation definition, guideline or other definition that is adhered to in whole or in part by this definition.'
    qualifiedValue: Sequence_['ObservationDefinitionQualifiedValue'] = Field(default_factory=list)
    'A set of qualified values associated with a context and a set of conditions -  provides a range for quantitative and ordinal observations and a collection of value sets for qualitative observations.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the ObservationDefinition content was or is planned to be effective.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    permittedDataType: Sequence_['code'] = Field(default_factory=list)
    'The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.'
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    preferredReportName: Optional_['string'] = Field(default=None)
    'The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.'
    derivedFromCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The canonical URL pointing to another FHIR-defined ObservationDefinition that is adhered to in whole or in part by this definition.'
    multipleResultsAllowed: Optional_['boolean'] = Field(default=None)
    'Multiple results allowed for observations conforming to this ObservationDefinition.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the ObservationDefinition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the ObservationDefinition changes.'
    code: 'CodeableConcept' = Field(default=...)
    'Describes what will be observed. Sometimes this is called the observation "name".'


class OperationDefinitionParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The parameters for the operation/query."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: 'code' = Field(default=...)
    'Whether this is an input or an output parameter.'
    min: 'integer' = Field(default=...)
    'The minimum number of times this parameter SHALL appear in the request or response.'
    max: 'string' = Field(default=...)
    'The maximum number of times this element is permitted to appear in the request or response.'
    name: 'code' = Field(default=...)
    'The name of used to identify the parameter.'
    type: Optional_['code'] = Field(default=None)
    'The type for this parameter.'
    part: Sequence_['OperationDefinitionParameter'] = Field(default_factory=list)
    'The parts of a nested Parameter.'
    scope: Sequence_['code'] = Field(default_factory=list)
    'If present, indicates that the parameter applies when the operation is being invoked at the specified level.'
    binding: Optional_['OperationDefinitionParameterBinding'] = Field(default=None)
    'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    searchType: Optional_['code'] = Field(default=None)
    'How the parameter is understood if/when it used as search parameter. This is only used if the parameter is a string.'
    allowedType: Sequence_['code'] = Field(default_factory=list)
    'Support for polymorphic types. If the parameter type is abstract, this element lists allowed sub-types for the parameter.'
    documentation: Optional_['markdown'] = Field(default=None)
    'Describes the meaning or use of this parameter.'
    targetProfile: Sequence_['canonical'] = Field(default_factory=list)
    'Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.'
    referencedFrom: Sequence_['OperationDefinitionParameterReferencedFrom'] = Field(default_factory=list)
    'Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class OperationDefinitionParameterReferencedFrom(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies other resource parameters within the operation invocation that are expected to resolve to this resource."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    source: 'string' = Field(default=...)
    'The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.'
    sourceId: Optional_['string'] = Field(default=None)
    'The id of the element in the referencing resource that is expected to resolve to this resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class OperationDefinitionParameterBinding(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Binds to a value set if this parameter is coded (code, Coding, CodeableConcept)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    strength: 'code' = Field(default=...)
    'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.'
    valueSet: 'canonical' = Field(default=...)
    'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class OperationDefinitionOverload(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    comment: Optional_['string'] = Field(default=None)
    'Comments to go on overload.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    parameterName: Sequence_['string'] = Field(default_factory=list)
    'Name of parameter to include in overload.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class OperationDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction)."""
    resourceType: Literal_['OperationDefinition'] = Field(default=...)
    'Definition of an operation or a named query'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    kind: 'code' = Field(default=...)
    'Whether this is an operation or a named query.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the operation definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.'
    base: Optional_['canonical'] = Field(default=None)
    'Indicates that this operation definition is a constraining profile on the base.'
    type: 'boolean' = Field(default=...)
    'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the operation definition.'
    status: 'code' = Field(default=...)
    'The current state of this operation definition.'
    system: 'boolean' = Field(default=...)
    'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this operation definition is needed and why it has been designed as it has.'
    comment: Optional_['markdown'] = Field(default=None)
    'Additional information about how to use this operation or named query.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    resource: Sequence_['code'] = Field(default_factory=list)
    'The types on which this operation can be executed.'
    instance: 'boolean' = Field(default=...)
    'Indicates whether this operation can be invoked on a particular instance of one of the given types.'
    overload: Sequence_['OperationDefinitionOverload'] = Field(default_factory=list)
    'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the operation definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the operation definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the operation definition.'
    parameter: Sequence_['OperationDefinitionParameter'] = Field(default_factory=list)
    'The parameters for the operation/query.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this implementation guide when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the operation definition from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and is not intended for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the operation definition is intended to be used.'
    affectsState: Optional_['boolean'] = Field(default=None)
    "Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'."
    inputProfile: Optional_['canonical'] = Field(default=None)
    'Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    outputProfile: Optional_['canonical'] = Field(default=None)
    'Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    code: 'code' = Field(default=...)
    'The label that is recommended to be used in the URL for this operation. In some cases, servers may need to use a different CapabilityStatement operation.name to differentiate between multiple SearchParameters that happen to have the same code.'


class OperationOutcomeIssue(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An error, warning, or information message that results from a system action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    details: Optional_['CodeableConcept'] = Field(default=None)
    'Additional details about the error. This may be a text description of the error or a system code that identifies the error.'
    severity: 'code' = Field(default=...)
    'Indicates whether the issue indicates a variation from successful processing.'
    location: Sequence_['string'] = Field(default_factory=list)
    'This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. \n\nFor resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be "http." + the parameter name.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Sequence_['string'] = Field(default_factory=list)
    'A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.'
    diagnostics: Optional_['string'] = Field(default=None)
    'Additional diagnostic information about the issue.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.'


class OperationOutcome(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A collection of error, warning, or information messages that result from a system action."""
    resourceType: Literal_['OperationOutcome'] = Field(default=...)
    'Information about the success/failure of an action'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    issue: Sequence_['OperationOutcomeIssue'] = Field(default=...)
    'An error, warning, or information message that results from a system action.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class OrganizationQualification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The official certifications, accreditations, training, designations and licenses that authorize and/or otherwise endorse the provision of care by the organization.\r\rFor example, an approval to provide a type of services issued by a certifying body (such as the US Joint Commission) to an organization."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Coded representation of the qualification.'
    period: Optional_['Period'] = Field(default=None)
    'Period during which the qualification is valid.'
    issuer: Optional_['Reference'] = Field(default=None)
    'Organization that regulates and issues the qualification.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'An identifier allocated to this qualification for this organization.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Organization(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc."""
    resourceType: Literal_['Organization'] = Field(default=...)
    'A grouping of people or organizations with a common purpose'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The kind(s) of organization that this is.'
    name: Optional_['string'] = Field(default=None)
    'A name associated with the organization.'
    alias: Sequence_['string'] = Field(default_factory=list)
    'A list of alternate names that the organization is known as, or was known as in the past.'
    active: Optional_['boolean'] = Field(default=None)
    "Whether the organization's record is still in active use."
    partOf: Optional_['Reference'] = Field(default=None)
    'The organization of which this organization forms a part.'
    contact: Sequence_['ExtendedContactDetail'] = Field(default_factory=list)
    'The contact details of communication devices available relevant to the specific Organization. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'Technical endpoints providing access to services operated for the organization.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier for the organization that is used to identify the organization across multiple disparate systems.'
    description: Optional_['markdown'] = Field(default=None)
    'Description of the organization, which helps provide additional general context on the organization to ensure that the correct organization is selected.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    qualification: Sequence_['OrganizationQualification'] = Field(default_factory=list)
    'The official certifications, accreditations, training, designations and licenses that authorize and/or otherwise endorse the provision of care by the organization.\r\rFor example, an approval to provide a type of services issued by a certifying body (such as the US Joint Commission) to an organization.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class OrganizationAffiliation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines an affiliation/association/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship."""
    resourceType: Literal_['OrganizationAffiliation'] = Field(default=...)
    'Defines an affiliation/association/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    active: Optional_['boolean'] = Field(default=None)
    'Whether this organization affiliation record is in active use.'
    period: Optional_['Period'] = Field(default=None)
    'The period during which the participatingOrganization is affiliated with the primary organization.'
    network: Sequence_['Reference'] = Field(default_factory=list)
    "The network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined)."
    contact: Sequence_['ExtendedContactDetail'] = Field(default_factory=list)
    'The contact details of communication devices available at the participatingOrganization relevant to this Affiliation.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    location: Sequence_['Reference'] = Field(default_factory=list)
    'The location(s) at which the role occurs.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    'Technical endpoints providing access to services operated for this role.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specialty: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Specific specialty of the participatingOrganization in the context of the role.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers that are specific to this role.'
    organization: Optional_['Reference'] = Field(default=None)
    'Organization where the role is available (primary organization/has members).'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    healthcareService: Sequence_['Reference'] = Field(default_factory=list)
    'Healthcare services provided through the role.'
    participatingOrganization: Optional_['Reference'] = Field(default=None)
    'The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of).'
    code: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Definition of the role the participatingOrganization plays in the association.'


class PackagedProductDefinitionLegalStatusOfSupply(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The legal status of supply of the packaged item as classified by the regulator."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The actual status of supply. Conveys in what situation this package type may be supplied for use.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    jurisdiction: Optional_['CodeableConcept'] = Field(default=None)
    'The place where the legal status of supply applies. When not specified, this indicates it is unknown in this context.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PackagedProductDefinitionPackaging(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The physical type of the container of the items.'
    quantity: Optional_['integer'] = Field(default=None)
    'The quantity of packaging items contained at this layer of the package. This does not relate to the number of contained items but relates solely to the number of packaging items. When looking at the outermost layer it is always 1. If there are two boxes within, at the next layer it would be 2.'
    material: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Material type of the package item.'
    property: Sequence_['PackagedProductDefinitionPackagingProperty'] = Field(default_factory=list)
    'General characteristics of this item.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    packaging: Sequence_['PackagedProductDefinitionPackaging'] = Field(default_factory=list)
    'Allows containers (and parts of containers) within containers, still as a part of a single packaged product. See also PackagedProductDefinition.packaging.containedItem.item(PackagedProductDefinition).'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A business identifier that is specific to this particular part of the packaging, often assigned by the manufacturer. Including possibly Data Carrier Identifier (a GS1 barcode).'
    manufacturer: Sequence_['Reference'] = Field(default_factory=list)
    'Manufacturer of this packaging item. When there are multiple values each one is a potential manufacturer of this packaging item.'
    componentPart: Optional_['boolean'] = Field(default=None)
    'Is this a part of the packaging (e.g. a cap or bottle stopper), rather than the packaging itself (e.g. a bottle or vial). The latter type are designed be a container, but the former are not.'
    containedItem: Sequence_['PackagedProductDefinitionPackagingContainedItem'] = Field(default_factory=list)
    'The item(s) within the packaging.'
    shelfLifeStorage: Sequence_['ProductShelfLife'] = Field(default_factory=list)
    'Shelf Life and storage information.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    alternateMaterial: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material (e.g. different types of plastic for a blister sleeve).'


class PackagedProductDefinitionPackagingContainedItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The item(s) within the packaging."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: 'CodeableReference' = Field(default=...)
    'The actual item(s) of medication, as manufactured, or a device (typically, but not necessarily, a co-packaged one), or other medically related item (such as food, biologicals, raw materials, medical fluids, gases etc.), as contained in the package. This also allows another whole packaged product to be included, which is solely for the case where a package of other entire packages is wanted - such as a wholesale or distribution pack (for layers within one package, use PackagedProductDefinition.packaging.packaging).'
    amount: Optional_['Quantity'] = Field(default=None)
    'The number of this type of item within this packaging or for continuous items such as liquids it is the quantity (for example 25ml). See also PackagedProductDefinition.containedItemQuantity (especially the long definition).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PackagedProductDefinitionPackagingProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """General characteristics of this item."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A code expressing the type of characteristic.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A value for the characteristic.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'A value for the characteristic.'
    valueDate: Optional_['date'] = Field(default=None)
    'A value for the characteristic.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'A value for the characteristic.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'A value for the characteristic.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PackagedProductDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A medically related item or items, in a container or package."""
    resourceType: Literal_['PackagedProductDefinition'] = Field(default=...)
    'A medically related item or items, in a container or package'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A name for this package. Typically what it would be listed as in a drug formulary or catalogue, inventory etc.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'A high level category e.g. medicinal product, raw material, shipping/transport container, etc.'
    status: Optional_['CodeableConcept'] = Field(default=None)
    'The status within the lifecycle of this item. A high level status, this is not intended to duplicate details carried elsewhere such as legal status, or authorization or marketing status.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    packaging: Optional_['PackagedProductDefinitionPackaging'] = Field(default=None)
    'A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap (which is not a device or a medication manufactured item).'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier for this package as whole - not the the content of the package. Unique instance identifiers assigned to a package by manufacturers, regulators, drug catalogue custodians or other organizations.'
    packageFor: Sequence_['Reference'] = Field(default_factory=list)
    'The product this package model relates to, not the contents of the package (for which see package.containedItem).'
    statusDate: Optional_['dateTime'] = Field(default=None)
    'The date at which the given status became applicable.'
    description: Optional_['markdown'] = Field(default=None)
    'Textual description. Note that this is not the name of the package or product.'
    manufacturer: Sequence_['Reference'] = Field(default_factory=list)
    'Manufacturer of this package type. When there are multiple it means these are all possible manufacturers.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    characteristic: Sequence_['PackagedProductDefinitionPackagingProperty'] = Field(default_factory=list)
    'Allows the key features to be recorded, such as "hospital pack", "nurse prescribable", "calendar pack".'
    marketingStatus: Sequence_['MarketingStatus'] = Field(default_factory=list)
    'Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated.'
    attachedDocument: Sequence_['Reference'] = Field(default_factory=list)
    'Additional information or supporting documentation about the packaged product.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    legalStatusOfSupply: Sequence_['PackagedProductDefinitionLegalStatusOfSupply'] = Field(default_factory=list)
    'The legal status of supply of the packaged item as classified by the regulator.'
    copackagedIndicator: Optional_['boolean'] = Field(default=None)
    'Identifies if the package contains different items, such as when a drug product is supplied with another item e.g. a diluent or adjuvant.'
    containedItemQuantity: Sequence_['Quantity'] = Field(default_factory=list)
    "A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size. This attribute differs from containedItem.amount in that it can give a single aggregated count of all tablet types in a pack, even when these are different manufactured items. For example a pill pack of 21 tablets plus 7 sugar tablets, can be denoted here as '28 tablets'. This attribute is repeatable so that the different item types in one pack type can be counted (e.g. a count of vials and count of syringes). Each repeat must have different units, so that it is clear what the different sets of counted items are, and it is not intended to allow different counts of similar items (e.g. not '2 tubes and 3 tubes'). Repeats are not to be used to represent different pack sizes (e.g. 20 pack vs. 50 pack) - which would be different instances of this resource."


class ParametersParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A parameter passed to or received from the operation."""
    name: 'string' = Field(default=...)
    'The name of the parameter (reference to the operation definition).'
    part: Sequence_['ParametersParameter'] = Field(default_factory=list)
    'A named part of a multi-part parameter.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueCanonical: Optional_['canonical'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueCode: Optional_['code'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueDate: Optional_['date'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueId: Optional_['id'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueInstant: Optional_['instant'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueInteger64: Optional_['integer64'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueOid: Optional_['oid'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueString: Optional_['string'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueTime: Optional_['time'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueUri: Optional_['uri'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueUrl: Optional_['url'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueUuid: Optional_['uuid'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueAddress: Optional_['Address'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueAge: Optional_['Age'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueAnnotation: Optional_['Annotation'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueCount: Optional_['Count'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueDistance: Optional_['Distance'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueHumanName: Optional_['HumanName'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueMoney: Optional_['Money'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueRange: Optional_['Range'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueRatioRange: Optional_['RatioRange'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueSignature: Optional_['Signature'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueTiming: Optional_['Timing'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueExpression: Optional_['Expression'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueUsageContext: Optional_['UsageContext'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueAvailability: Optional_['Availability'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueDosage: Optional_['Dosage'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    valueMeta: Optional_['Meta'] = Field(default=None)
    'Conveys the content if the parameter is a data type.'
    resource: Optional_['AnyResource'] = Field(default=None)
    'Conveys the content if the parameter is a whole resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class Parameters(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource is used to pass information into and back from an operation (whether invoked directly from REST or within a messaging environment).  It is not persisted or allowed to be referenced by other resources."""
    resourceType: Literal_['Parameters'] = Field(default=...)
    'Operation Request or Response'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    parameter: Sequence_['ParametersParameter'] = Field(default_factory=list)
    'A parameter passed to or received from the operation.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'


class PatientCommunication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A language which may be used to communicate with the patient about his or her health."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    language: 'CodeableConcept' = Field(default=...)
    'The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-AU" for Australian English.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preferred: Optional_['boolean'] = Field(default=None)
    'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PatientContact(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A contact party (e.g. guardian, partner, friend) for the patient."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['HumanName'] = Field(default=None)
    'A name associated with the contact person.'
    gender: Optional_['code'] = Field(default=None)
    'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.'
    period: Optional_['Period'] = Field(default=None)
    'The period during which this contact person or organization is valid to be contacted relating to this patient.'
    telecom: Sequence_['ContactPoint'] = Field(default_factory=list)
    'A contact detail for the person, e.g. a telephone number or an email address.'
    address: Optional_['Address'] = Field(default=None)
    'Address for the contact person.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    relationship: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The nature of the relationship between the patient and the contact person.'
    organization: Optional_['Reference'] = Field(default=None)
    'Organization on behalf of which the contact is acting or for which the contact is working.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PatientLink(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Link to a Patient or RelatedPerson resource that concerns the same actual individual."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of link between this patient resource and another patient resource.'
    other: 'Reference' = Field(default=...)
    'Link to a Patient or RelatedPerson resource that concerns the same actual individual.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Patient(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Demographics and other administrative information about an individual or animal receiving care or other health-related services."""
    resourceType: Literal_['Patient'] = Field(default=...)
    'Information about an individual or animal receiving health care services'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Sequence_['HumanName'] = Field(default_factory=list)
    'A name associated with the individual.'
    link: Sequence_['PatientLink'] = Field(default_factory=list)
    'Link to a Patient or RelatedPerson resource that concerns the same actual individual.'
    photo: Sequence_['Attachment'] = Field(default_factory=list)
    'Image of the patient.'
    active: Optional_['boolean'] = Field(default=None)
    "Whether this patient record is in active use. \nMany systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.\n\nIt is often used to filter patient lists to exclude inactive patients\n\nDeceased patients may also be marked as inactive for the same reasons, but may be active for some time after death."
    gender: Optional_['code'] = Field(default=None)
    'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.'
    telecom: Sequence_['ContactPoint'] = Field(default_factory=list)
    'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.'
    address: Sequence_['Address'] = Field(default_factory=list)
    'An address for the individual.'
    contact: Sequence_['PatientContact'] = Field(default_factory=list)
    'A contact party (e.g. guardian, partner, friend) for the patient.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    birthDate: Optional_['date'] = Field(default=None)
    'The date of birth for the individual.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'An identifier for this patient.'
    deceasedBoolean: Optional_['boolean'] = Field(default=None)
    'Indicates if the individual is deceased or not.'
    deceasedDateTime: Optional_['dateTime'] = Field(default=None)
    'Indicates if the individual is deceased or not.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    maritalStatus: Optional_['CodeableConcept'] = Field(default=None)
    "This field contains a patient's most recent marital (civil) status."
    communication: Sequence_['PatientCommunication'] = Field(default_factory=list)
    'A language which may be used to communicate with the patient about his or her health.'
    multipleBirthBoolean: Optional_['boolean'] = Field(default=None)
    'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).'
    multipleBirthInteger: Optional_['integer'] = Field(default=None)
    'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    generalPractitioner: Sequence_['Reference'] = Field(default_factory=list)
    "Patient's nominated care provider."
    managingOrganization: Optional_['Reference'] = Field(default=None)
    'Organization that is the custodian of the patient record.'


class PaymentNotice(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource provides the status of the payment for goods and services rendered, and the request and response resource references."""
    resourceType: Literal_['PaymentNotice'] = Field(default=...)
    'PaymentNotice request'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    payee: Optional_['Reference'] = Field(default=None)
    'The party who will receive or has received payment that is the subject of this notification.'
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    amount: 'Money' = Field(default=...)
    'The amount sent to the payee.'
    request: Optional_['Reference'] = Field(default=None)
    'Reference of resource for which payment is being made.'
    created: 'dateTime' = Field(default=...)
    'The date when this resource was created.'
    payment: Optional_['Reference'] = Field(default=None)
    'A reference to the payment which is the subject of this notice.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    response: Optional_['Reference'] = Field(default=None)
    'Reference of response to resource for which payment is being made.'
    reporter: Optional_['Reference'] = Field(default=None)
    'The party who reports the payment notice.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    recipient: 'Reference' = Field(default=...)
    'The party who is notified of the payment status.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this payment notice.'
    paymentDate: Optional_['date'] = Field(default=None)
    'The date when the above payment action occurred.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    paymentStatus: Optional_['CodeableConcept'] = Field(default=None)
    'A code indicating whether payment has been sent or cleared.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PaymentReconciliationProcessNote(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A note that describes or explains the processing in a human readable form."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['code'] = Field(default=None)
    'The business purpose of the note text.'
    text: Optional_['string'] = Field(default=None)
    'The explanation or description associated with the processing.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PaymentReconciliationAllocation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Distribution of the payment amount for a previously acknowledged payable."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Code to indicate the nature of the payment.'
    payee: Optional_['Reference'] = Field(default=None)
    'The party which is receiving the payment.'
    target: Optional_['Reference'] = Field(default=None)
    'Specific resource to which the payment/adjustment/advance applies.'
    amount: Optional_['Money'] = Field(default=None)
    'The monetary amount allocated from the total payment to the payable.'
    account: Optional_['Reference'] = Field(default=None)
    'The Account to which this payment applies, may be completed by the receiver, used for search.'
    response: Optional_['Reference'] = Field(default=None)
    'A resource, such as a ClaimResponse, which contains a commitment to payment.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter to which this payment applies, may be completed by the receiver, used for search.'
    submitter: Optional_['Reference'] = Field(default=None)
    'The party which submitted the claim or financial transaction.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Unique identifier for the current payment item for the referenced payable.'
    predecessor: Optional_['Identifier'] = Field(default=None)
    'Unique identifier for the prior payment item for the referenced payable.'
    responsible: Optional_['Reference'] = Field(default=None)
    'A reference to the individual who is responsible for inquiries regarding the response and its payment.'
    targetItemString: Optional_['string'] = Field(default=None)
    ' Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.'
    targetItemIdentifier: Optional_['Identifier'] = Field(default=None)
    ' Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.'
    targetItemPositiveInt: Optional_['positiveInt'] = Field(default=None)
    ' Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    date: Optional_['date'] = Field(default=None)
    'The date from the response resource containing a commitment to pay.'


class PaymentReconciliation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource provides the details including amount of a payment and allocates the payment items being paid."""
    resourceType: Literal_['PaymentReconciliation'] = Field(default=...)
    'PaymentReconciliation resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'CodeableConcept' = Field(default=...)
    'Code to indicate the nature of the payment such as payment, adjustment.'
    kind: Optional_['CodeableConcept'] = Field(default=None)
    'The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc.'
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    period: Optional_['Period'] = Field(default=None)
    'The period of time for which payments have been gathered into this bulk payment for settlement.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'The means of payment such as check, card cash, or electronic funds transfer.'
    amount: 'Money' = Field(default=...)
    'Total payment amount as indicated on the financial instrument.'
    created: 'dateTime' = Field(default=...)
    'The date when the resource was created.'
    enterer: Optional_['Reference'] = Field(default=None)
    'Payment enterer if not the actual payment issuer.'
    request: Optional_['Reference'] = Field(default=None)
    'Original request resource reference.'
    outcome: Optional_['code'] = Field(default=None)
    'The outcome of a request for a reconciliation.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    location: Optional_['Reference'] = Field(default=None)
    'The location of the site or device for electronic transfers or physical location for cash payments.'
    formCode: Optional_['CodeableConcept'] = Field(default=None)
    'A code for the form to be used for printing the content.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requestor: Optional_['Reference'] = Field(default=None)
    'The practitioner who is responsible for the services rendered to the patient.'
    cardBrand: Optional_['string'] = Field(default=None)
    'The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.'
    processor: Optional_['string'] = Field(default=None)
    'The name of the card processor, etf processor, bank for checks.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this payment reconciliation.'
    issuerType: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the source such as patient or insurance.'
    allocation: Sequence_['PaymentReconciliationAllocation'] = Field(default_factory=list)
    'Distribution of the payment amount for a previously acknowledged payable.'
    disposition: Optional_['string'] = Field(default=None)
    'A human readable description of the status of the request for the reconciliation.'
    processNote: Sequence_['PaymentReconciliationProcessNote'] = Field(default_factory=list)
    'A note that describes or explains the processing in a human readable form.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    paymentIssuer: Optional_['Reference'] = Field(default=None)
    'The party who generated the payment.'
    accountNumber: Optional_['string'] = Field(default=None)
    'A portion of the account number, often the last 4 digits, used for verification not charging purposes.'
    authorization: Optional_['string'] = Field(default=None)
    'An alphanumeric issued by the processor to confirm the successful issuance of payment.'
    expirationDate: Optional_['date'] = Field(default=None)
    'The year and month (YYYY-MM) when the instrument, typically card, expires.'
    tenderedAmount: Optional_['Money'] = Field(default=None)
    'The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid.'
    returnedAmount: Optional_['Money'] = Field(default=None)
    "The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'."
    referenceNumber: Optional_['string'] = Field(default=None)
    'The check number, eft reference, car processor reference.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    paymentIdentifier: Optional_['Identifier'] = Field(default=None)
    "Issuer's unique identifier for the payment instrument."
    date: 'date' = Field(default=...)
    'The date of payment as indicated on the financial instrument.'


class PermissionJustification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The asserted justification for using the data."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    basis: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'This would be a codeableconcept, or a coding, which can be constrained to , for example, the 6 grounds for processing in GDPR.'
    evidence: Sequence_['Reference'] = Field(default_factory=list)
    'Justifing rational.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PermissionRule(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of rules."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['code'] = Field(default=None)
    'deny | permit.'
    data: Sequence_['PermissionRuleData'] = Field(default_factory=list)
    'A description or definition of which activities are allowed to be done on the data.'
    limit: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'What limits apply to the use of the data.'
    activity: Sequence_['PermissionRuleActivity'] = Field(default_factory=list)
    'A description or definition of which activities are allowed to be done on the data.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PermissionRuleActivity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A description or definition of which activities are allowed to be done on the data."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: Sequence_['Reference'] = Field(default_factory=list)
    'The actor(s) authorized for the defined activity.'
    action: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Actions controlled by this Rule.'
    purpose: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The purpose for which the permission is given.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PermissionRuleData(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A description or definition of which activities are allowed to be done on the data."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    period: Sequence_['Period'] = Field(default_factory=list)
    'Clinical or Operational Relevant period of time that bounds the data controlled by this rule.'
    resource: Sequence_['PermissionRuleDataResource'] = Field(default_factory=list)
    'Explicit FHIR Resource references.'
    security: Sequence_['Coding'] = Field(default_factory=list)
    'The data in scope are those with the given codes present in that data .meta.security element.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Optional_['Expression'] = Field(default=None)
    'Used when other data selection elements are insufficient.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PermissionRuleDataResource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Explicit FHIR Resource references."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    meaning: 'code' = Field(default=...)
    'How the resource reference is interpreted when testing consent restrictions.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: 'Reference' = Field(default=...)
    'A reference to a specific resource that defines which resources are covered by this consent.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Permission(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Permission resource holds access rules for a given data and context."""
    resourceType: Literal_['Permission'] = Field(default=...)
    'Access Rules'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    date: Sequence_['dateTime'] = Field(default_factory=list)
    'The date that permission was asserted.'
    rule: Sequence_['PermissionRule'] = Field(default_factory=list)
    'A set of rules.'
    status: 'code' = Field(default=...)
    'Status.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    asserter: Optional_['Reference'] = Field(default=None)
    'The person or entity that asserts the permission.'
    validity: Optional_['Period'] = Field(default=None)
    'The period in which the permission is active.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    combining: 'code' = Field(default=...)
    'Defines a procedure for arriving at an access decision given the set of rules.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    justification: Optional_['PermissionJustification'] = Field(default=None)
    'The asserted justification for using the data.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PersonCommunication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A language which may be used to communicate with the person about his or her health."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    language: 'CodeableConcept' = Field(default=...)
    'The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-AU" for Australian English.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preferred: Optional_['boolean'] = Field(default=None)
    'Indicates whether or not the person prefers this language (over other languages he masters up a certain level).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PersonLink(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Link to a resource that concerns the same actual person."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    target: 'Reference' = Field(default=...)
    'The resource to which this actual person is associated.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    assurance: Optional_['code'] = Field(default=None)
    'Level of assurance that this link is associated with the target resource.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Person(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Demographics and administrative information about a person independent of a specific health-related context."""
    resourceType: Literal_['Person'] = Field(default=...)
    'A generic person record'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Sequence_['HumanName'] = Field(default_factory=list)
    'A name associated with the person.'
    link: Sequence_['PersonLink'] = Field(default_factory=list)
    'Link to a resource that concerns the same actual person.'
    photo: Sequence_['Attachment'] = Field(default_factory=list)
    'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.'
    active: Optional_['boolean'] = Field(default=None)
    "Whether this person's record is in active use."
    gender: Optional_['code'] = Field(default=None)
    'Administrative Gender.'
    telecom: Sequence_['ContactPoint'] = Field(default_factory=list)
    'A contact detail for the person, e.g. a telephone number or an email address.'
    address: Sequence_['Address'] = Field(default_factory=list)
    'One or more addresses for the person.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    birthDate: Optional_['date'] = Field(default=None)
    'The birth date for the person.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier for a person within a particular scope.'
    deceasedBoolean: Optional_['boolean'] = Field(default=None)
    'Indicates if the individual is deceased or not.'
    deceasedDateTime: Optional_['dateTime'] = Field(default=None)
    'Indicates if the individual is deceased or not.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    maritalStatus: Optional_['CodeableConcept'] = Field(default=None)
    "This field contains a person's most recent marital (civil) status."
    communication: Sequence_['PersonCommunication'] = Field(default_factory=list)
    'A language which may be used to communicate with the person about his or her health.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    managingOrganization: Optional_['Reference'] = Field(default=None)
    'The organization that is the custodian of the person record.'


class PlanDefinitionAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An action or group of actions to be taken as part of the plan. For example, in clinical care, an action would be to prescribe a particular indicated medication, or perform a particular test as appropriate. In pharmaceutical quality, an action would be the test that needs to be performed on a drug product as defined in the quality specification."""
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of action to perform (create, update, remove).'
    title: Optional_['string'] = Field(default=None)
    'The textual description of the action displayed to a user. For example, when the action is a test to be performed, the title would be the title of the test such as Assay by HPLC.'
    input: Sequence_['PlanDefinitionActionInput'] = Field(default_factory=list)
    'Defines input data requirements for the action.'
    linkId: Optional_['string'] = Field(default=None)
    'An identifier that is unique within the PlanDefinition to allow linkage within the realized CarePlan and/or RequestOrchestration.'
    prefix: Optional_['string'] = Field(default=None)
    'A user-visible prefix for the action. For example a section or item numbering such as 1. or A.'
    reason: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A description of why this action is necessary or appropriate.'
    goalId: Sequence_['id'] = Field(default_factory=list)
    'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition. In pharmaceutical quality, a goal represents acceptance criteria (Goal) for a given action (Test), so the goalId would be the unique id of a defined goal element establishing the acceptance criteria for the action.'
    output: Sequence_['PlanDefinitionActionOutput'] = Field(default_factory=list)
    'Defines the outputs of the action, if any.'
    action: Sequence_['PlanDefinitionAction'] = Field(default_factory=list)
    'Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.'
    trigger: Sequence_['TriggerDefinition'] = Field(default_factory=list)
    'A description of when the action should be triggered. When multiple triggers are specified on an action, any triggering event invokes the action.'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the action should be addressed with respect to other actions.'
    location: Optional_['CodeableReference'] = Field(default=None)
    'Identifies the facility where the action will occur; e.g. home, hospital, specific clinic, etc.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Sequence_['PlanDefinitionActionCondition'] = Field(default_factory=list)
    'An expression that describes applicability criteria or start/stop conditions for the action.'
    timingAge: Optional_['Age'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    timingDuration: Optional_['Duration'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    timingRange: Optional_['Range'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    timingTiming: Optional_['Timing'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    transform: Optional_['canonical'] = Field(default=None)
    'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A code, group definition, or canonical reference that describes the intended subject of the action and its children, if any. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'A code, group definition, or canonical reference that describes the intended subject of the action and its children, if any. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    subjectCanonical: Optional_['canonical'] = Field(default=None)
    'A code, group definition, or canonical reference that describes the intended subject of the action and its children, if any. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    description: Optional_['markdown'] = Field(default=None)
    'A brief description of the action used to provide a summary to display to the user.'
    participant: Sequence_['PlanDefinitionActionParticipant'] = Field(default_factory=list)
    'Indicates who should participate in performing the action described.'
    dynamicValue: Sequence_['PlanDefinitionActionDynamicValue'] = Field(default_factory=list)
    "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result."
    documentation: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.'
    relatedAction: Sequence_['PlanDefinitionActionRelatedAction'] = Field(default_factory=list)
    'A relationship to another action such as "before" or "30-60 minutes after start of".'
    definitionCanonical: Optional_['canonical'] = Field(default=None)
    'A reference to an ActivityDefinition that describes the action to be taken in detail, a MessageDefinition describing a message to be snet, a PlanDefinition that describes a series of actions to be taken, a Questionnaire that should be filled out, a SpecimenDefinition describing a specimen to be collected, or an ObservationDefinition that specifies what observation should be captured.'
    definitionUri: Optional_['uri'] = Field(default=None)
    'A reference to an ActivityDefinition that describes the action to be taken in detail, a MessageDefinition describing a message to be snet, a PlanDefinition that describes a series of actions to be taken, a Questionnaire that should be filled out, a SpecimenDefinition describing a specimen to be collected, or an ObservationDefinition that specifies what observation should be captured.'
    textEquivalent: Optional_['markdown'] = Field(default=None)
    'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.'
    groupingBehavior: Optional_['code'] = Field(default=None)
    'Defines the grouping behavior for the action and its children.'
    requiredBehavior: Optional_['code'] = Field(default=None)
    'Defines the required behavior for the action.'
    precheckBehavior: Optional_['code'] = Field(default=None)
    'Defines whether the action should usually be preselected.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    selectionBehavior: Optional_['code'] = Field(default=None)
    'Defines the selection behavior for the action and its children.'
    cardinalityBehavior: Optional_['code'] = Field(default=None)
    'Defines whether the action can be selected multiple times.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code that provides a meaning, grouping, or classification for the action or action group. For example, a section may have a LOINC code for the section of a documentation template. In pharmaceutical quality, an action (Test) such as pH could be classified as a physical property.'


class PlanDefinitionActionRelatedAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A relationship to another action such as "before" or "30-60 minutes after start of"."""
    targetId: 'id' = Field(default=...)
    'The element id of the target related action.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    offsetDuration: Optional_['Duration'] = Field(default=None)
    'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.'
    offsetRange: Optional_['Range'] = Field(default=None)
    'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.'
    relationship: 'code' = Field(default=...)
    'The relationship of the start of this action to the related action.'
    endRelationship: Optional_['code'] = Field(default=None)
    'The relationship of the end of this action to the related action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class PlanDefinitionActionDynamicValue(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    path: Optional_['string'] = Field(default=None)
    'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolvable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Optional_['Expression'] = Field(default=None)
    'An expression specifying the value of the customized element.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PlanDefinitionActionParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who should participate in performing the action described."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['code'] = Field(default=None)
    'The type of participant in the action.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'The role the participant should play in performing the described action.'
    actorId: Optional_['string'] = Field(default=None)
    'A reference to the id element of the actor who will participate in this action.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates how the actor will be involved in the action - author, reviewer, witness, etc.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    typeCanonical: Optional_['canonical'] = Field(default=None)
    'The type of participant in the action.'
    typeReference: Optional_['Reference'] = Field(default=None)
    'The type of participant in the action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PlanDefinitionActionCondition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An expression that describes applicability criteria or start/stop conditions for the action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    kind: 'code' = Field(default=...)
    'The kind of condition.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Optional_['Expression'] = Field(default=None)
    'An expression that returns true or false, indicating whether the condition is satisfied.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PlanDefinitionActionOutput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines the outputs of the action, if any."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    title: Optional_['string'] = Field(default=None)
    'A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requirement: Optional_['DataRequirement'] = Field(default=None)
    'Defines the data that results as output from the action.'
    relatedData: Optional_['string'] = Field(default=None)
    'Points to an existing input or output element that is results as output from the action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PlanDefinitionActionInput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines input data requirements for the action."""
    title: Optional_['string'] = Field(default=None)
    'A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requirement: Optional_['DataRequirement'] = Field(default=None)
    'Defines the data that is to be provided as input to the action.'
    relatedData: Optional_['id'] = Field(default=None)
    'Points to an existing input or output element that provides data to this input.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class PlanDefinitionActor(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Actors represent the individuals or groups involved in the execution of the defined set of activities."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    title: Optional_['string'] = Field(default=None)
    'A descriptive label for the actor.'
    option: Sequence_['PlanDefinitionActorOption'] = Field(default=...)
    'The characteristics of the candidates that could serve as the actor.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'A description of how the actor fits into the overall actions of the plan definition.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PlanDefinitionActorOption(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The characteristics of the candidates that could serve as the actor."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['code'] = Field(default=None)
    'The type of participant in the action.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'The role the participant should play in performing the described action.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    typeCanonical: Optional_['canonical'] = Field(default=None)
    'The type of participant in the action.'
    typeReference: Optional_['Reference'] = Field(default=None)
    'The type of participant in the action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PlanDefinitionGoal(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A goal describes an expected outcome that activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, meeting the acceptance criteria for a test as specified by a quality specification, etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    start: Optional_['CodeableConcept'] = Field(default=None)
    'The event after which the goal should begin being pursued.'
    target: Sequence_['PlanDefinitionGoalTarget'] = Field(default_factory=list)
    'Indicates what should be done and within what timeframe.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates a category the goal falls within.'
    priority: Optional_['CodeableConcept'] = Field(default=None)
    'Identifies the expected level of importance associated with reaching/sustaining the defined goal.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    addresses: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Identifies problems, conditions, issues, or concerns the goal is intended to address.'
    description: 'CodeableConcept' = Field(default=...)
    'Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".'
    documentation: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PlanDefinitionGoalTarget(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates what should be done and within what timeframe."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    due: Optional_['Duration'] = Field(default=None)
    'Indicates the timeframe after the start of the goal in which the goal should be met.'
    measure: Optional_['CodeableConcept'] = Field(default=None)
    'The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    detailQuantity: Optional_['Quantity'] = Field(default=None)
    'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.'
    detailRange: Optional_['Range'] = Field(default=None)
    'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.'
    detailCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.'
    detailString: Optional_['string'] = Field(default=None)
    'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.'
    detailBoolean: Optional_['boolean'] = Field(default=None)
    'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.'
    detailInteger: Optional_['integer'] = Field(default=None)
    'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.'
    detailRatio: Optional_['Ratio'] = Field(default=None)
    'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%, or in the case of pharmaceutical quality - NMT 0.6%, Clear solution, etc. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PlanDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications."""
    resourceType: Literal_['PlanDefinition'] = Field(default=...)
    'The definition of a plan for a series of actions, independent of any specific patient or context'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.'
    goal: Sequence_['PlanDefinitionGoal'] = Field(default_factory=list)
    'A goal describes an expected outcome that activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, meeting the acceptance criteria for a test as specified by a quality specification, etc.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the plan definition.'
    usage: Optional_['markdown'] = Field(default=None)
    'A detailed description of how the plan definition is used from a clinical perspective.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.'
    actor: Sequence_['PlanDefinitionActor'] = Field(default_factory=list)
    'Actors represent the individuals or groups involved in the execution of the defined set of activities.'
    status: 'code' = Field(default=...)
    'The status of this plan definition. Enables tracking the life-cycle of the content.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the content.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the content.'
    action: Sequence_['PlanDefinitionAction'] = Field(default_factory=list)
    'An action or group of actions to be taken as part of the plan. For example, in clinical care, an action would be to prescribe a particular indicated medication, or perform a particular test as appropriate. In pharmaceutical quality, an action would be the test that needs to be performed on a drug product as defined in the quality specification.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this plan definition is needed and why it has been designed as it has.'
    library: Sequence_['canonical'] = Field(default_factory=list)
    'A reference to a Library resource containing any formal logic used by the plan definition.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    subtitle: Optional_['string'] = Field(default=None)
    'An explanatory or alternate title for the plan definition giving additional information about its content.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the content.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the content for use in some setting.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the plan definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A code, group definition, or canonical reference that describes  or identifies the intended subject of the plan definition. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'A code, group definition, or canonical reference that describes  or identifies the intended subject of the plan definition. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    subjectCanonical: Optional_['canonical'] = Field(default=None)
    'A code, group definition, or canonical reference that describes  or identifies the intended subject of the plan definition. Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the plan definition from a consumer's perspective."
    asNeededBoolean: Optional_['boolean'] = Field(default=None)
    'If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.'
    asNeededCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the plan definition is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the plan definition content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, or bibliographic references.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the plan definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.'


class PractitionerCommunication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A language which may be used to communicate with the practitioner, often for correspondence/administrative purposes.\r\rThe `PractitionerRole.communication` property should be used for publishing the languages that a practitioner is able to communicate with patients (on a per Organization/Role basis)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    language: 'CodeableConcept' = Field(default=...)
    'The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-AU" for Australian English.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preferred: Optional_['boolean'] = Field(default=None)
    'Indicates whether or not the person prefers this language (over other languages he masters up a certain level).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PractitionerQualification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The official qualifications, certifications, accreditations, training, licenses (and other types of educations/skills/capabilities) that authorize or otherwise pertain to the provision of care by the practitioner.\r\rFor example, a medical license issued by a medical board of licensure authorizing the practitioner to practice medicine within a certain locality."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'Coded representation of the qualification.'
    period: Optional_['Period'] = Field(default=None)
    'Period during which the qualification is valid.'
    issuer: Optional_['Reference'] = Field(default=None)
    'Organization that regulates and issues the qualification.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    "An identifier that applies to this person's qualification."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Practitioner(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A person who is directly or indirectly involved in the provisioning of healthcare or related services."""
    resourceType: Literal_['Practitioner'] = Field(default=...)
    'A person with a  formal responsibility in the provisioning of healthcare or related services'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Sequence_['HumanName'] = Field(default_factory=list)
    'The name(s) associated with the practitioner.'
    photo: Sequence_['Attachment'] = Field(default_factory=list)
    'Image of the person.'
    active: Optional_['boolean'] = Field(default=None)
    "Whether this practitioner's record is in active use."
    gender: Optional_['code'] = Field(default=None)
    'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.'
    telecom: Sequence_['ContactPoint'] = Field(default_factory=list)
    'A contact detail for the practitioner, e.g. a telephone number or an email address.'
    address: Sequence_['Address'] = Field(default_factory=list)
    'Address(es) of the practitioner that are not role specific (typically home address). \rWork addresses are not typically entered in this property as they are usually role dependent.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    birthDate: Optional_['date'] = Field(default=None)
    'The date of birth for the practitioner.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'An identifier that applies to this person in this role.'
    deceasedBoolean: Optional_['boolean'] = Field(default=None)
    'Indicates if the practitioner is deceased or not.'
    deceasedDateTime: Optional_['dateTime'] = Field(default=None)
    'Indicates if the practitioner is deceased or not.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    qualification: Sequence_['PractitionerQualification'] = Field(default_factory=list)
    'The official qualifications, certifications, accreditations, training, licenses (and other types of educations/skills/capabilities) that authorize or otherwise pertain to the provision of care by the practitioner.\r\rFor example, a medical license issued by a medical board of licensure authorizing the practitioner to practice medicine within a certain locality.'
    communication: Sequence_['PractitionerCommunication'] = Field(default_factory=list)
    'A language which may be used to communicate with the practitioner, often for correspondence/administrative purposes.\r\rThe `PractitionerRole.communication` property should be used for publishing the languages that a practitioner is able to communicate with patients (on a per Organization/Role basis).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class PractitionerRole(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time."""
    resourceType: Literal_['PractitionerRole'] = Field(default=...)
    'Roles/organizations the practitioner is associated with'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    active: Optional_['boolean'] = Field(default=None)
    ' Whether this practitioner role record is in active use. Some systems may use this property to mark non-active practitioners, such as those that are not currently employed.'
    period: Optional_['Period'] = Field(default=None)
    'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.'
    contact: Sequence_['ExtendedContactDetail'] = Field(default_factory=list)
    'The contact details of communication devices available relevant to the specific PractitionerRole. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    location: Sequence_['Reference'] = Field(default_factory=list)
    'The location(s) at which this practitioner provides care.'
    endpoint: Sequence_['Reference'] = Field(default_factory=list)
    ' Technical endpoints providing access to services operated for the practitioner with this role. Commonly used for locating scheduling services, or identifying where to send referrals electronically.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specialty: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The specialty of a practitioner that describes the functional role they are practicing at a given organization or location.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business Identifiers that are specific to a role/location.'
    practitioner: Optional_['Reference'] = Field(default=None)
    'Practitioner that is able to provide the defined services for the organization.'
    organization: Optional_['Reference'] = Field(default=None)
    'The organization where the Practitioner performs the roles associated.'
    availability: Sequence_['Availability'] = Field(default_factory=list)
    'A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    communication: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A language the practitioner can use in patient communication. The practitioner may know several languages (listed in practitioner.communication), however these are the languages that could be advertised in a directory for a patient to search.'
    characteristic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Collection of characteristics (attributes).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    healthcareService: Sequence_['Reference'] = Field(default_factory=list)
    "The list of healthcare services that this worker provides for this role's Organization/Location(s)."
    code: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Roles which this practitioner is authorized to perform for the organization.'


class ProcedureFocalDevice(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    action: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of change that happened to the device during the procedure.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    manipulated: 'Reference' = Field(default=...)
    'The device that was manipulated (changed) during the procedure.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ProcedurePerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Indicates who or what performed the procedure and how they were involved."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'Indicates who or what performed the procedure.'
    period: Optional_['Period'] = Field(default=None)
    'Time period during which the performer performed the procedure.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    onBehalfOf: Optional_['Reference'] = Field(default=None)
    'The Organization the Patient, RelatedPerson, Device, CareTeam, and HealthcareService was acting on behalf of.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Procedure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing."""
    resourceType: Literal_['Procedure'] = Field(default=...)
    'An action that is being or was performed on an individual or entity'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Any other notes and comments about the procedure.'
    used: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Identifies medications, devices and any other substance used as part of the procedure.'
    focus: Optional_['Reference'] = Field(default=None)
    'Who is the target of the procedure when it is not the subject of record only.  If focus is not present, then subject is the focus.  If focus is present and the subject is one of the targets of the procedure, include subject as a focus as well. If focus is present and the subject is not included in focus, it implies that the procedure was only targeted on the focus. For example, when a caregiver is given education for a patient, the caregiver would be the focus and the procedure record is associated with the subject (e.g. patient).  For example, use focus when recording the target of the education, training, or counseling is the parent or relative of a patient.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular procedure is a component or step.'
    status: 'code' = Field(default=...)
    'A code specifying the state of the procedure. Generally, this will be the in-progress or completed state.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The coded reason or reference why the procedure was performed. This may be a coded entity of some type, be present as text, or be a reference to one of several resources that justify the procedure.'
    report: Sequence_['Reference'] = Field(default_factory=list)
    'This could be a histology result, pathology report, surgical report, etc.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A reference to a resource that contains details of the request for this procedure.'
    subject: 'Reference' = Field(default=...)
    'On whom or on what the procedure was performed. This is usually an individual human, but can also be performed on animals, groups of humans or animals, organizations or practitioners (for licensing), locations or devices (for safety inspections or regulatory authorizations).  If the actual focus of the procedure is different from the subject, the focus element specifies the actual focus of the procedure.'
    outcome: Optional_['CodeableConcept'] = Field(default=None)
    'The outcome of the procedure - did it resolve the reasons for the procedure being performed?'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that classifies the procedure for searching, sorting and display purposes (e.g. "Surgical Procedure").'
    recorded: Optional_['dateTime'] = Field(default=None)
    'The date the occurrence of the procedure was first captured in the record regardless of Procedure.status (potentially after the occurrence of the event).'
    recorder: Optional_['Reference'] = Field(default=None)
    'Individual who recorded the record and takes responsibility for its content.'
    location: Optional_['Reference'] = Field(default=None)
    'The location where the procedure actually happened.  E.g. a newborn at home, a tracheostomy at a restaurant.'
    bodySite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.'
    followUp: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'If the procedure required specific follow up - e.g. removal of sutures. The follow up may be represented as a simple note or could potentially be more complex, in which case the CarePlan resource can be used.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated.'
    performer: Sequence_['ProcedurePerformer'] = Field(default_factory=list)
    'Indicates who or what performed the procedure and how they were involved.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server.'
    reportedBoolean: Optional_['boolean'] = Field(default=None)
    "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report."
    reportedReference: Optional_['Reference'] = Field(default=None)
    "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report."
    focalDevice: Sequence_['ProcedureFocalDevice'] = Field(default_factory=list)
    'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.'
    statusReason: Optional_['CodeableConcept'] = Field(default=None)
    'Captures the reason for the current state of the procedure.'
    complication: Sequence_['CodeableReference'] = Field(default_factory=list)
    "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues."
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure did occur or is occurring.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure did occur or is occurring.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    occurrenceString: Optional_['string'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure did occur or is occurring.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    occurrenceAge: Optional_['Age'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure did occur or is occurring.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    occurrenceRange: Optional_['Range'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure did occur or is occurring.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    occurrenceTiming: Optional_['Timing'] = Field(default=None)
    'Estimated or actual date, date-time, period, or age when the procedure did occur or is occurring.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.'
    supportingInfo: Sequence_['Reference'] = Field(default_factory=list)
    'Other resources from the patient record that may be relevant to the procedure.  The information from these resources was either used to create the instance or is provided to help with its interpretation. This extension should not be used if more specific inline elements or extensions are available.'
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally maintained protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The URL pointing to a FHIR-defined protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. "Laparoscopic Appendectomy").'


class ProvenanceEntity(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An entity used in this activity."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: 'code' = Field(default=...)
    'How the entity was used during the activity.'
    what: 'Reference' = Field(default=...)
    'Identity of the  Entity used. May be a logical or physical uri and maybe absolute or relative.'
    agent: Sequence_['ProvenanceAgent'] = Field(default_factory=list)
    "The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which used the entity."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ProvenanceAgent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An actor taking a role in an activity  for which it can be assigned some degree of responsibility for the activity taking place."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    who: 'Reference' = Field(default=...)
    'Indicates who or what performed in the event.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The Functional Role of the agent with respect to the activity.'
    role: Sequence_['CodeableConcept'] = Field(default_factory=list)
    "The structural roles of the agent indicating the agent's competency. The security role enabling the agent with respect to the activity."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    onBehalfOf: Optional_['Reference'] = Field(default=None)
    'The agent that delegated authority to perform the activity performed by the agent.who element.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Provenance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies."""
    resourceType: Literal_['Provenance'] = Field(default=...)
    'Who, What, When for a set of resources'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    agent: Sequence_['ProvenanceAgent'] = Field(default=...)
    'An actor taking a role in an activity  for which it can be assigned some degree of responsibility for the activity taking place.'
    target: Sequence_['Reference'] = Field(default=...)
    'The Reference(s) that were generated or updated by  the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.'
    policy: Sequence_['uri'] = Field(default_factory=list)
    'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.'
    entity: Sequence_['ProvenanceEntity'] = Field(default_factory=list)
    'An entity used in this activity.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'Allows tracing of authorizatino for the events and tracking whether proposals/recommendations were acted upon.'
    patient: Optional_['Reference'] = Field(default=None)
    'The patient element is available to enable deterministic tracking of activities that involve the patient as the subject of the data used in an activity.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    recorded: Optional_['instant'] = Field(default=None)
    'The instant of time at which the activity was recorded.'
    location: Optional_['Reference'] = Field(default=None)
    'Where the activity occurred, if relevant.'
    activity: Optional_['CodeableConcept'] = Field(default=None)
    'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'This will typically be the encounter the event occurred, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission lab tests).'
    signature: Sequence_['Signature'] = Field(default_factory=list)
    'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.'
    occurredPeriod: Optional_['Period'] = Field(default=None)
    'The period during which the activity occurred.'
    occurredDateTime: Optional_['dateTime'] = Field(default=None)
    'The period during which the activity occurred.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    authorization: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The authorization (e.g., PurposeOfUse) that was used during the event being recorded.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class QuestionnaireItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A particular question, question grouping or display text that is part of the questionnaire."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    text: Optional_['string'] = Field(default=None)
    'The name of a section, the text of a question or text content for a display item.'
    type: 'code' = Field(default=...)
    'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, Coding, etc.).'
    item: Sequence_['QuestionnaireItem'] = Field(default_factory=list)
    'Text, questions and other groups to be nested beneath a question or group.'
    linkId: 'string' = Field(default=...)
    'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.'
    prefix: Optional_['string'] = Field(default=None)
    'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.'
    repeats: Optional_['boolean'] = Field(default=None)
    'An indication, if true, that a QuestionnaireResponse for this item may include multiple answers associated with a single instance of this item (for question-type items) or multiple repetitions of the item (for group-type items).'
    initial: Sequence_['QuestionnaireItemInitial'] = Field(default_factory=list)
    'One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.'
    required: Optional_['boolean'] = Field(default=None)
    'An indication, if true, that the item must be present in a "completed" QuestionnaireResponse.  If false, the item may be skipped when answering the questionnaire.'
    readOnly: Optional_['boolean'] = Field(default=None)
    'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    maxLength: Optional_['integer'] = Field(default=None)
    'The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse.'
    definition: Optional_['uri'] = Field(default=None)
    'This element is a URI that refers to an [ElementDefinition](elementdefinition.html) or to an [ObservationDefinition](observationdefinition.html) that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in [Comments](questionnaire.html#definition), below.'
    enableWhen: Sequence_['QuestionnaireItemEnableWhen'] = Field(default_factory=list)
    'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.'
    answerOption: Sequence_['QuestionnaireItemAnswerOption'] = Field(default_factory=list)
    'One of the permitted answers for the question.'
    enableBehavior: Optional_['code'] = Field(default=None)
    'Controls how multiple enableWhen values are interpreted -  whether all or any must be true.'
    answerValueSet: Optional_['canonical'] = Field(default=None)
    'A reference to a value set containing a list of values representing permitted answers for a question.'
    disabledDisplay: Optional_['code'] = Field(default=None)
    "Indicates if and how items that are disabled (because enableWhen evaluates to 'false') should be displayed."
    answerConstraint: Optional_['code'] = Field(default=None)
    'For items that have a defined set of allowed answers (via answerOption or answerValueSet), indicates whether values *other* than those specified can be selected.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Sequence_['Coding'] = Field(default_factory=list)
    'A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).'


class QuestionnaireItemAnswerOption(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """One of the permitted answers for the question."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueInteger: Optional_['integer'] = Field(default=None)
    "A potential answer that's allowed as the answer to this question."
    valueDate: Optional_['date'] = Field(default=None)
    "A potential answer that's allowed as the answer to this question."
    valueTime: Optional_['time'] = Field(default=None)
    "A potential answer that's allowed as the answer to this question."
    valueString: Optional_['string'] = Field(default=None)
    "A potential answer that's allowed as the answer to this question."
    valueCoding: Optional_['Coding'] = Field(default=None)
    "A potential answer that's allowed as the answer to this question."
    valueReference: Optional_['Reference'] = Field(default=None)
    "A potential answer that's allowed as the answer to this question."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    initialSelected: Optional_['boolean'] = Field(default=None)
    'Indicates whether the answer value is selected when the list of possible answers is initially shown.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class QuestionnaireItemEnableWhen(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    question: 'string' = Field(default=...)
    'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.'
    operator: 'code' = Field(default=...)
    'Specifies the criteria by which the question is enabled.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    answerBoolean: Optional_['boolean'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerDecimal: Optional_['decimal'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerInteger: Optional_['integer'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerDate: Optional_['date'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerDateTime: Optional_['dateTime'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerTime: Optional_['time'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerString: Optional_['string'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerCoding: Optional_['Coding'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerQuantity: Optional_['Quantity'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    answerReference: Optional_['Reference'] = Field(default=None)
    'A value that the referenced question is tested using the specified operator in order for the item to be enabled.  If there are multiple answers, a match on any of the answers suffices.  If different behavior is desired (all must match, at least 2 must match, etc.), consider using the enableWhenExpression extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class QuestionnaireItemInitial(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueDate: Optional_['date'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueTime: Optional_['time'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueString: Optional_['string'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueUri: Optional_['uri'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The actual value to for an initial answer.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The actual value to for an initial answer.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Questionnaire(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection."""
    resourceType: Literal_['Questionnaire'] = Field(default=...)
    'A structured set of questions'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    item: Sequence_['QuestionnaireItem'] = Field(default_factory=list)
    'A particular question, question grouping or display text that is part of the questionnaire.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the questionnaire.'
    status: 'code' = Field(default=...)
    'The current state of this questionnaire.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this questionnaire is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the questionnaire.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate questionnaires.'
    derivedFrom: Sequence_['canonical'] = Field(default_factory=list)
    'The URL of a Questionnaire that this Questionnaire is based on.'
    subjectType: Sequence_['code'] = Field(default_factory=list)
    'The types of subjects that can be the subject of responses created for the questionnaire.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the questionnaire from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the questionnaire is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the questionnaire content was or is planned to be in active use.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the questionnaire was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.'
    code: Sequence_['Coding'] = Field(default_factory=list)
    'An identifier for this collection of questions in a particular terminology such as LOINC.'


class QuestionnaireResponseItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A group or question item from the original questionnaire for which answers are provided."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    text: Optional_['string'] = Field(default=None)
    'Text that is displayed above the contents of the group or as the text of the question being answered.'
    item: Sequence_['QuestionnaireResponseItem'] = Field(default_factory=list)
    'Sub-questions, sub-groups or display items nested beneath a group.'
    linkId: 'string' = Field(default=...)
    'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.'
    answer: Sequence_['QuestionnaireResponseItemAnswer'] = Field(default_factory=list)
    "The respondent's answer(s) to the question."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: Optional_['uri'] = Field(default=None)
    'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class QuestionnaireResponseItemAnswer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The respondent's answer(s) to the question."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    item: Sequence_['QuestionnaireResponseItem'] = Field(default_factory=list)
    'Nested groups and/or questions found within this particular answer.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueDate: Optional_['date'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueTime: Optional_['time'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueString: Optional_['string'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueUri: Optional_['uri'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The answer (or one of the answers) provided by the respondent to the question.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class QuestionnaireResponse(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to."""
    resourceType: Literal_['QuestionnaireResponse'] = Field(default=...)
    'A structured set of questions and their answers'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    item: Sequence_['QuestionnaireResponseItem'] = Field(default_factory=list)
    'A group or question item from the original questionnaire for which answers are provided.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of.'
    status: 'code' = Field(default=...)
    'The current state of the questionnaire response.'
    author: Optional_['Reference'] = Field(default=None)
    'The individual or device that received the answers to the questions in the QuestionnaireResponse and recorded them in the system.'
    source: Optional_['Reference'] = Field(default=None)
    'The individual or device that answered the questions about the subject.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan, proposal or order that is fulfilled in whole or in part by this questionnaire response.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.'
    subject: Optional_['Reference'] = Field(default=None)
    'The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    authored: Optional_['dateTime'] = Field(default=None)
    'The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this questionnaire response by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    questionnaire: 'canonical' = Field(default=...)
    'The Questionnaire that defines and organizes the questions for which answers are being provided.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RegulatedAuthorizationCase(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The case or regulatory procedure for granting or amending a regulated authorization. An authorization is granted in response to submissions/applications by those seeking authorization. A case is the administrative process that deals with the application(s) that relate to this and assesses them. Note: This area is subject to ongoing review and the workgroup is seeking implementer feedback on its use (see link at bottom of page)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The defining type of case.'
    status: Optional_['CodeableConcept'] = Field(default=None)
    'The status associated with the case.'
    datePeriod: Optional_['Period'] = Field(default=None)
    'Relevant date for this case.'
    dateDateTime: Optional_['dateTime'] = Field(default=None)
    'Relevant date for this case.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Identifier by which this case can be referenced.'
    application: Sequence_['RegulatedAuthorizationCase'] = Field(default_factory=list)
    'A regulatory submission from an organization to a regulator, as part of an assessing case. Multiple applications may occur over time, with more or different information to support or modify the submission or the authorization. The applications can be considered as steps within the longer running case or procedure for this authorization process.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RegulatedAuthorization(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product."""
    resourceType: Literal_['RegulatedAuthorization'] = Field(default=...)
    'Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity e.g. Market Authorization for a Medicinal Product'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Overall type of this authorization, for example drug marketing approval, orphan drug designation.'
    case: Optional_['RegulatedAuthorizationCase'] = Field(default=None)
    'The case or regulatory procedure for granting or amending a regulated authorization. An authorization is granted in response to submissions/applications by those seeking authorization. A case is the administrative process that deals with the application(s) that relate to this and assesses them. Note: This area is subject to ongoing review and the workgroup is seeking implementer feedback on its use (see link at bottom of page).'
    basis: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The legal or regulatory framework against which this authorization is granted, or other reasons for it.'
    region: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The territory (e.g., country, jurisdiction etc.) in which the authorization has been granted.'
    status: Optional_['CodeableConcept'] = Field(default=None)
    'The status that is authorised e.g. approved. Intermediate states and actions can be tracked with cases and applications.'
    holder: Optional_['Reference'] = Field(default=None)
    "The organization that has been granted this authorization, by some authoritative body (the 'regulator')."
    subject: Sequence_['Reference'] = Field(default_factory=list)
    'The product type, treatment, facility or activity that is being authorized.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    regulator: Optional_['Reference'] = Field(default=None)
    'The regulatory authority or authorizing body granting the authorization. For example, European Medicines Agency (EMA), Food and Drug Administration (FDA), Health Canada (HC), etc.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier for the authorization, typically assigned by the authorizing body.'
    statusDate: Optional_['dateTime'] = Field(default=None)
    'The date at which the current status was assigned.'
    indication: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Condition for which the use of the regulated product applies.'
    description: Optional_['markdown'] = Field(default=None)
    'General textual supporting information.'
    intendedUse: Optional_['CodeableConcept'] = Field(default=None)
    'The intended use of the product, e.g. prevention, treatment, diagnosis.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    validityPeriod: Optional_['Period'] = Field(default=None)
    'The time period in which the regulatory approval, clearance or licencing is in effect. As an example, a Marketing Authorization includes the date of authorization and/or an expiration date.'
    attachedDocument: Sequence_['Reference'] = Field(default_factory=list)
    'Additional information or supporting documentation about the authorization.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RelatedPersonCommunication(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A language which may be used to communicate with the related person about the patient's health."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    language: 'CodeableConcept' = Field(default=...)
    'The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-AU" for Australian English.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preferred: Optional_['boolean'] = Field(default=None)
    'Indicates whether or not the related person prefers this language (over other languages he or she masters up a certain level).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RelatedPerson(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about a person that is involved in a patient's health or the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process."""
    resourceType: Literal_['RelatedPerson'] = Field(default=...)
    'A person that is related to a patient, but who is not a direct target of care'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Sequence_['HumanName'] = Field(default_factory=list)
    'A name associated with the person.'
    photo: Sequence_['Attachment'] = Field(default_factory=list)
    'Image of the person.'
    active: Optional_['boolean'] = Field(default=None)
    'Whether this related person record is in active use.'
    gender: Optional_['code'] = Field(default=None)
    'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.'
    period: Optional_['Period'] = Field(default=None)
    'The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown.'
    patient: 'Reference' = Field(default=...)
    'The patient this person is related to.'
    telecom: Sequence_['ContactPoint'] = Field(default_factory=list)
    'A contact detail for the person, e.g. a telephone number or an email address.'
    address: Sequence_['Address'] = Field(default_factory=list)
    'Address where the related person can be contacted or visited.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    birthDate: Optional_['date'] = Field(default=None)
    'The date on which the related person was born.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier for a person within a particular scope.'
    relationship: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The nature of the relationship between the related person and the patient.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    communication: Sequence_['RelatedPersonCommunication'] = Field(default_factory=list)
    "A language which may be used to communicate with the related person about the patient's health."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RequestOrchestrationAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The actions, if any, produced by the evaluation of the artifact."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    goal: Sequence_['Reference'] = Field(default_factory=list)
    'Goals that are intended to be achieved by following the requests in this action.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of action to perform (create, update, remove).'
    title: Optional_['string'] = Field(default=None)
    'The title of the action displayed to a user.'
    input: Sequence_['RequestOrchestrationActionInput'] = Field(default_factory=list)
    'Defines input data requirements for the action.'
    linkId: Optional_['string'] = Field(default=None)
    'The linkId of the action from the PlanDefinition that corresponds to this action in the RequestOrchestration resource.'
    prefix: Optional_['string'] = Field(default=None)
    'A user-visible prefix for the action. For example a section or item numbering such as 1. or A.'
    output: Sequence_['RequestOrchestrationActionOutput'] = Field(default_factory=list)
    'Defines the outputs of the action, if any.'
    action: Sequence_['RequestOrchestrationAction'] = Field(default_factory=list)
    'Sub actions.'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the action should be addressed with respect to other actions.'
    location: Optional_['CodeableReference'] = Field(default=None)
    'Identifies the facility where the action will occur; e.g. home, hospital, specific clinic, etc.'
    resource: Optional_['Reference'] = Field(default=None)
    'The resource that is the target of the action (e.g. CommunicationRequest).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Sequence_['RequestOrchestrationActionCondition'] = Field(default_factory=list)
    'An expression that describes applicability criteria, or start/stop conditions for the action.'
    timingDateTime: Optional_['dateTime'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    timingAge: Optional_['Age'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    timingPeriod: Optional_['Period'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    timingDuration: Optional_['Duration'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    timingRange: Optional_['Range'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    timingTiming: Optional_['Timing'] = Field(default=None)
    'An optional value describing when the action should be performed.'
    transform: Optional_['canonical'] = Field(default=None)
    'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.'
    description: Optional_['markdown'] = Field(default=None)
    'A short description of the action used to provide a summary to display to the user.'
    participant: Sequence_['RequestOrchestrationActionParticipant'] = Field(default_factory=list)
    'The participant that should perform or be responsible for this action.'
    dynamicValue: Sequence_['RequestOrchestrationActionDynamicValue'] = Field(default_factory=list)
    "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result."
    documentation: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.'
    relatedAction: Sequence_['RequestOrchestrationActionRelatedAction'] = Field(default_factory=list)
    'A relationship to another action such as "before" or "30-60 minutes after start of".'
    definitionCanonical: Optional_['canonical'] = Field(default=None)
    'A reference to an ActivityDefinition that describes the action to be taken in detail, a PlanDefinition that describes a series of actions to be taken, a Questionnaire that should be filled out, a SpecimenDefinition describing a specimen to be collected, or an ObservationDefinition that specifies what observation should be captured.'
    definitionUri: Optional_['uri'] = Field(default=None)
    'A reference to an ActivityDefinition that describes the action to be taken in detail, a PlanDefinition that describes a series of actions to be taken, a Questionnaire that should be filled out, a SpecimenDefinition describing a specimen to be collected, or an ObservationDefinition that specifies what observation should be captured.'
    textEquivalent: Optional_['markdown'] = Field(default=None)
    'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.'
    groupingBehavior: Optional_['code'] = Field(default=None)
    'Defines the grouping behavior for the action and its children.'
    requiredBehavior: Optional_['code'] = Field(default=None)
    'Defines expectations around whether an action is required.'
    precheckBehavior: Optional_['code'] = Field(default=None)
    'Defines whether the action should usually be preselected.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    selectionBehavior: Optional_['code'] = Field(default=None)
    'Defines the selection behavior for the action and its children.'
    cardinalityBehavior: Optional_['code'] = Field(default=None)
    'Defines whether the action can be selected multiple times.'
    code: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.'


class RequestOrchestrationActionRelatedAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A relationship to another action such as "before" or "30-60 minutes after start of"."""
    targetId: 'id' = Field(default=...)
    'The element id of the target related action.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    offsetDuration: Optional_['Duration'] = Field(default=None)
    'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.'
    offsetRange: Optional_['Range'] = Field(default=None)
    'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.'
    relationship: 'code' = Field(default=...)
    'The relationship of this action to the related action.'
    endRelationship: Optional_['code'] = Field(default=None)
    'The relationship of the end of this action to the related action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class RequestOrchestrationActionDynamicValue(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    path: Optional_['string'] = Field(default=None)
    'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolvable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Optional_['Expression'] = Field(default=None)
    'An expression specifying the value of the customized element.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RequestOrchestrationActionParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The participant that should perform or be responsible for this action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['code'] = Field(default=None)
    'The type of participant in the action.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'The role the participant should play in performing the described action.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates how the actor will be involved in the action - author, reviewer, witness, etc.'
    actorCanonical: Optional_['canonical'] = Field(default=None)
    'A reference to the actual participant.'
    actorReference: Optional_['Reference'] = Field(default=None)
    'A reference to the actual participant.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    typeCanonical: Optional_['canonical'] = Field(default=None)
    'The type of participant in the action.'
    typeReference: Optional_['Reference'] = Field(default=None)
    'The type of participant in the action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RequestOrchestrationActionCondition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An expression that describes applicability criteria, or start/stop conditions for the action."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    kind: 'code' = Field(default=...)
    'The kind of condition.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Optional_['Expression'] = Field(default=None)
    'An expression that returns true or false, indicating whether or not the condition is satisfied.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RequestOrchestrationActionOutput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines the outputs of the action, if any."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    title: Optional_['string'] = Field(default=None)
    'A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requirement: Optional_['DataRequirement'] = Field(default=None)
    'Defines the data that results as output from the action.'
    relatedData: Optional_['string'] = Field(default=None)
    'Points to an existing input or output element that is results as output from the action.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RequestOrchestrationActionInput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Defines input data requirements for the action."""
    title: Optional_['string'] = Field(default=None)
    'A human-readable label for the data requirement used to label data flows in BPMN or similar diagrams. Also provides a human readable label when rendering the data requirement that conveys its purpose to human readers.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requirement: Optional_['DataRequirement'] = Field(default=None)
    'Defines the data that is to be provided as input to the action.'
    relatedData: Optional_['id'] = Field(default=None)
    'Points to an existing input or output element that provides data to this input.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class RequestOrchestration(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one"."""
    resourceType: Literal_['RequestOrchestration'] = Field(default=...)
    'A set of related requests'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    goal: Sequence_['Reference'] = Field(default_factory=list)
    'Goals that are intended to be achieved by following the requests in this RequestOrchestration.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Provides a mechanism to communicate additional information about the response.'
    status: 'code' = Field(default=...)
    'The current state of the request. For request orchestrations, the status reflects the status of all the requests in the orchestration.'
    intent: 'code' = Field(default=...)
    'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.'
    author: Optional_['Reference'] = Field(default=None)
    'Provides a reference to the author of the request orchestration.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Describes the reason for the request orchestration in coded or textual form.'
    action: Sequence_['RequestOrchestrationAction'] = Field(default_factory=list)
    'The actions, if any, produced by the evaluation of the artifact.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan, proposal or order that is fulfilled in whole or in part by this request.'
    subject: Optional_['Reference'] = Field(default=None)
    'The subject for which the request orchestration was created.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    replaces: Sequence_['Reference'] = Field(default_factory=list)
    'Completed or terminated request(s) whose function is taken by this new request.'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the request should be addressed with respect to other requests.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'Describes the context of the request orchestration, if any.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Allows a service to provide a unique, business identifier for the request.'
    authoredOn: Optional_['dateTime'] = Field(default=None)
    'Indicates when the request orchestration was created.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.'
    groupIdentifier: Optional_['Identifier'] = Field(default=None)
    'A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code that identifies what the overall request orchestration is.'


class RequirementsStatement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The actual statement of requirement, in markdown format."""
    key: 'id' = Field(default=...)
    'Key that identifies this statement (unique within this resource).'
    label: Optional_['string'] = Field(default=None)
    'A short human usable label for this statement.'
    parent: Optional_['string'] = Field(default=None)
    'A larger requirement that this requirement helps to refine and enable.'
    source: Sequence_['Reference'] = Field(default_factory=list)
    "Who asked for this statement to be a requirement. By default, it's assumed that the publisher knows who it is if it matters."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Sequence_['url'] = Field(default_factory=list)
    'A reference to another artifact that created this requirement. This could be a Profile, etc., or external regulation, or business requirements expressed elsewhere.'
    conformance: Sequence_['code'] = Field(default_factory=list)
    'A short human usable label for this statement.'
    requirement: 'markdown' = Field(default=...)
    'The actual requirement for human consumption.'
    derivedFrom: Optional_['string'] = Field(default=None)
    'Another statement on one of the requirements that this requirement clarifies or restricts.'
    satisfiedBy: Sequence_['url'] = Field(default_factory=list)
    'A reference to another artifact that satisfies this requirement. This could be a Profile, extension, or an element in one of those, or a CapabilityStatement, OperationDefinition, SearchParameter, CodeSystem(/code), ValueSet, Libary etc.'
    conditionality: Optional_['boolean'] = Field(default=None)
    "This boolean flag is set to true of the text of the requirement is conditional on something e.g. it includes lanauage like 'if x then y'. This conditionality flag is introduced for purposes of filtering and colour highlighting etc."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class Requirements(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of requirements - a list of features or behaviors of designed systems that are necessary to achieve organizational or regulatory goals."""
    resourceType: Literal_['Requirements'] = Field(default=...)
    'A set of requirements - features of systems that are necessary'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the Requirements. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the Requirements was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the Requirements changes.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the Requirements.'
    actor: Sequence_['canonical'] = Field(default_factory=list)
    'An actor these requirements are in regard to.'
    status: 'code' = Field(default=...)
    'The status of this Requirements. Enables tracking the life-cycle of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the Requirements when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Requirements author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this Requirements is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the Requirements.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the Requirements and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Requirements.'
    reference: Sequence_['url'] = Field(default_factory=list)
    'A reference to another artifact that created this set of requirements. This could be a Profile, etc., or external regulation, or business requirements expressed elsewhere.'
    statement: Sequence_['RequirementsStatement'] = Field(default_factory=list)
    'The actual statement of requirement, in markdown format.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this Requirements when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Requirements instances.'
    description: Optional_['markdown'] = Field(default=None)
    'A free text natural language description of the requirements.'
    derivedFrom: Sequence_['canonical'] = Field(default_factory=list)
    'Another set of Requirements that this set of Requirements builds on and updates.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this Requirements is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the Requirements is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this Requirements when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Requirements is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Requirements is stored on different servers.'


class ResearchStudyComparisonGroup(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes an expected event or sequence of events for one of the subjects of a study. E.g. for a living subject: exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up. E.g. for a stability study: {store sample from lot A at 25 degrees for 1 month}, {store sample from lot A at 40 degrees for 1 month}."""
    name: 'string' = Field(default=...)
    'Unique, human-readable label for this comparisonGroup of the study.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Categorization of study comparisonGroup, e.g. experimental, active comparator, placebo comparater.'
    linkId: Optional_['id'] = Field(default=None)
    'Allows the comparisonGroup for the study and the comparisonGroup for the subject to be linked easily.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'A succinct description of the path through the study that would be followed by a subject adhering to this comparisonGroup.'
    observedGroup: Optional_['Reference'] = Field(default=None)
    'Group of participants who were enrolled in study comparisonGroup.'
    intendedExposure: Sequence_['Reference'] = Field(default_factory=list)
    'Interventions or exposures in this comparisonGroup or cohort.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class ResearchStudyAssociatedParty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Sponsors, collaborators, and other parties."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'Name of associated party.'
    role: 'CodeableConcept' = Field(default=...)
    'Type of association.'
    party: Optional_['Reference'] = Field(default=None)
    'Individual or organization associated with study (use practitionerRole to specify their organisation).'
    period: Sequence_['Period'] = Field(default_factory=list)
    'Identifies the start date and the end date of the associated party in the role.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    classifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A categorization other than role for the associated party.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ResearchStudyOutcomeMeasure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An "outcome measure", "endpoint", "effect measure" or "measure of effect" is a specific measurement or observation used to quantify the effect of experimental variables on the participants in a study, or for observational studies, to describe patterns of diseases or traits or associations with exposures, risk factors or treatment."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'Label for the outcome.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The parameter or characteristic being assessed as one of the values by which the study is assessed.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    reference: Optional_['Reference'] = Field(default=None)
    'Structured outcome definition.'
    description: Optional_['markdown'] = Field(default=None)
    'Description of the outcome.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ResearchStudyProgressStatus(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Status of study with time for that status."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    state: 'CodeableConcept' = Field(default=...)
    'Label for status or state (e.g. recruitment status).'
    actual: Optional_['boolean'] = Field(default=None)
    'An indication of whether or not the date is a known date when the state changed or will change. A value of true indicates a known date. A value of false indicates an estimated date.'
    period: Optional_['Period'] = Field(default=None)
    'Date range.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ResearchStudyRecruitment(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Target or actual group of participants enrolled in study."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    eligibility: Optional_['Reference'] = Field(default=None)
    'Inclusion and exclusion criteria.'
    actualGroup: Optional_['Reference'] = Field(default=None)
    'Group of participants who were enrolled in study.'
    targetNumber: Optional_['unsignedInt'] = Field(default=None)
    'Estimated total number of participants to be enrolled.'
    actualNumber: Optional_['unsignedInt'] = Field(default=None)
    'Actual total number of participants enrolled in study.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ResearchStudyObjective(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A goal that the study is aiming to achieve in terms of a scientific question to be answered by the analysis of data collected during the study."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'Unique, human-readable label for this objective of the study.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of study objective.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'Free text description of the objective of the study.  This is what the study is trying to achieve rather than how it is going to achieve it (see ResearchStudy.description).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ResearchStudyLabel(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional names for the study."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Kind of name.'
    value: Optional_['string'] = Field(default=None)
    'The name.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ResearchStudy(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A scientific study of nature that sometimes includes processes involved in health and disease. For example, clinical trials are research studies that involve people. These studies may be related to new ways to screen, prevent, diagnose, and treat disease. They may also study certain outcomes and certain groups of people by looking at data collected in the past or future."""
    resourceType: Literal_['ResearchStudy'] = Field(default=...)
    'Investigation to increase healthcare-related patient-independent knowledge'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'Canonical identifier for this study resource, represented as a globally unique URI.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'Name for this study (computer friendly).'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the ResearchStudy Resource was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the ResearchStudy Resource changes.'
    site: Sequence_['Reference'] = Field(default_factory=list)
    'A facility in which study activities are conducted.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Comments made about the study by the performer, subject or other participants.'
    title: Optional_['string'] = Field(default=None)
    'The human readable name of the research study.'
    label: Sequence_['ResearchStudyLabel'] = Field(default_factory=list)
    'Additional names for the study.'
    phase: Optional_['CodeableConcept'] = Field(default=None)
    'The stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation.'
    focus: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger research study of which this particular study is a component or step.'
    status: 'code' = Field(default=...)
    'The publication state of the resource (not of the study).'
    region: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A country, state or other area where the study is taking place rather than its precise geographic location or address.'
    period: Optional_['Period'] = Field(default=None)
    'Identifies the start date and the expected (or actual, depending on status) end date for the study.'
    result: Sequence_['Reference'] = Field(default_factory=list)
    'Link to one or more sets of results generated by the study.  Could also link to a research registry holding the results such as ClinicalTrials.gov.'
    version: Optional_['string'] = Field(default=None)
    'The business version for the study record.'
    keyword: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Key terms to aid in searching for or filtering the study.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    protocol: Sequence_['Reference'] = Field(default_factory=list)
    'The set of steps expected to be performed as part of the execution of the study.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The condition that is the focus of the study.  For example, In a study to examine risk factors for Lupus, might have as an inclusion criterion "healthy volunteer", but the target condition code would be a Lupus SNOMED code.'
    objective: Sequence_['ResearchStudyObjective'] = Field(default_factory=list)
    'A goal that the study is aiming to achieve in terms of a scientific question to be answered by the analysis of data collected during the study.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers assigned to this research study by the sponsor or other systems.'
    classifier: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Additional grouping mechanism or categorization of a research study. Example: FDA regulated device, FDA regulated drug, MPG Paragraph 23b (a German legal requirement), IRB-exempt, etc. Implementation Note: do not use the classifier element to support existing semantics that are already supported thru explicit elements in the resource.'
    whyStopped: Optional_['CodeableConcept'] = Field(default=None)
    'A description and/or code explaining the premature termination of the study.'
    studyDesign: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.'
    description: Optional_['markdown'] = Field(default=None)
    'A detailed and human-readable narrative of the study. E.g., study abstract.'
    recruitment: Optional_['ResearchStudyRecruitment'] = Field(default=None)
    'Target or actual group of participants enrolled in study.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    progressStatus: Sequence_['ResearchStudyProgressStatus'] = Field(default_factory=list)
    'Status of study with time for that status.'
    outcomeMeasure: Sequence_['ResearchStudyOutcomeMeasure'] = Field(default_factory=list)
    'An "outcome measure", "endpoint", "effect measure" or "measure of effect" is a specific measurement or observation used to quantify the effect of experimental variables on the participants in a study, or for observational studies, to describe patterns of diseases or traits or associations with exposures, risk factors or treatment.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Citations, references, URLs and other related documents.  When using relatedArtifact to share URLs, the relatedArtifact.type will often be set to one of "documentation" or "supported-with" and the URL value will often be in relatedArtifact.document.url but another possible location is relatedArtifact.resource when it is a canonical URL.'
    associatedParty: Sequence_['ResearchStudyAssociatedParty'] = Field(default_factory=list)
    'Sponsors, collaborators, and other parties.'
    comparisonGroup: Sequence_['ResearchStudyComparisonGroup'] = Field(default_factory=list)
    'Describes an expected event or sequence of events for one of the subjects of a study. E.g. for a living subject: exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up. E.g. for a stability study: {store sample from lot A at 25 degrees for 1 month}, {store sample from lot A at 40 degrees for 1 month}.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    primaryPurposeType: Optional_['CodeableConcept'] = Field(default=None)
    'The type of study based upon the intent of the study activities. A classification of the intent of the study.'
    descriptionSummary: Optional_['markdown'] = Field(default=None)
    'A brief text for explaining the study.'


class ResearchSubjectProgress(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The current state (status) of the subject and resons for status change where appropriate."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    "Identifies the aspect of the subject's journey that the state refers to."
    reason: Optional_['CodeableConcept'] = Field(default=None)
    'The reason for the state change.  If coded it should follow the formal subject state model.'
    endDate: Optional_['dateTime'] = Field(default=None)
    'The date when the state ended.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    milestone: Optional_['CodeableConcept'] = Field(default=None)
    'The milestones the subject has passed through.'
    startDate: Optional_['dateTime'] = Field(default=None)
    'The date when the new status started.'
    subjectState: Optional_['CodeableConcept'] = Field(default=None)
    'The current state of the subject.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ResearchSubject(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study."""
    resourceType: Literal_['ResearchSubject'] = Field(default=...)
    'Participant or object which is the recipient of investigative activities in a study'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    study: 'Reference' = Field(default=...)
    'Reference to the study the subject is participating in.'
    status: 'code' = Field(default=...)
    'The publication state of the resource (not of the subject).'
    period: Optional_['Period'] = Field(default=None)
    'The dates the subject began and ended their participation in the study.'
    subject: 'Reference' = Field(default=...)
    'The record of the person, animal or other entity involved in the study.'
    consent: Sequence_['Reference'] = Field(default_factory=list)
    "A record of the patient's informed agreement to participate in the study."
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    progress: Sequence_['ResearchSubjectProgress'] = Field(default_factory=list)
    'The current state (status) of the subject and resons for status change where appropriate.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers assigned to this research subject for a study.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    actualComparisonGroup: Optional_['id'] = Field(default=None)
    'The name of the arm in the study the subject actually followed as part of this study.'
    assignedComparisonGroup: Optional_['id'] = Field(default=None)
    'The name of the arm in the study the subject is expected to follow as part of this study.'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'


class RiskAssessmentPrediction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes the expected outcome for the subject."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    outcome: Optional_['CodeableConcept'] = Field(default=None)
    'One of the potential outcomes for the patient (e.g. remission, death,  a particular condition).'
    whenPeriod: Optional_['Period'] = Field(default=None)
    'Indicates the period of time or age range of the subject to which the specified probability applies.'
    whenRange: Optional_['Range'] = Field(default=None)
    'Indicates the period of time or age range of the subject to which the specified probability applies.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    rationale: Optional_['string'] = Field(default=None)
    'Additional information explaining the basis for the prediction.'
    relativeRisk: Optional_['decimal'] = Field(default=None)
    'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general.  (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).'
    probabilityDecimal: Optional_['decimal'] = Field(default=None)
    'Indicates how likely the outcome is (in the specified timeframe).'
    probabilityRange: Optional_['Range'] = Field(default=None)
    'Indicates how likely the outcome is (in the specified timeframe).'
    qualitativeRisk: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class RiskAssessment(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome."""
    resourceType: Literal_['RiskAssessment'] = Field(default=...)
    'Potential outcomes for a subject with likelihood'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Additional comments about the risk assessment.'
    basis: Sequence_['Reference'] = Field(default_factory=list)
    'Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).'
    parent: Optional_['Reference'] = Field(default=None)
    'A reference to a resource that this risk assessment is part of, such as a Procedure.'
    status: 'code' = Field(default=...)
    'The status of the RiskAssessment, using the same statuses as an Observation.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'The algorithm, process or mechanism used to evaluate the risk.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The reason the risk assessment was performed.'
    basedOn: Optional_['Reference'] = Field(default=None)
    'A reference to the request that is fulfilled by this risk assessment.'
    subject: 'Reference' = Field(default=...)
    'The patient or group the risk assessment applies to.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The encounter where the assessment was performed.'
    condition: Optional_['Reference'] = Field(default=None)
    'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.'
    performer: Optional_['Reference'] = Field(default=None)
    'The provider, patient, related person, or software application that performed the assessment.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifier assigned to the risk assessment.'
    prediction: Sequence_['RiskAssessmentPrediction'] = Field(default_factory=list)
    'Describes the expected outcome for the subject.'
    mitigation: Optional_['string'] = Field(default=None)
    'A description of the steps that might be taken to reduce the identified risk(s).'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'The date (and possibly time) the risk assessment was performed.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'The date (and possibly time) the risk assessment was performed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the risk assessment performed.'


class Schedule(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A container for slots of time that may be available for booking appointments."""
    resourceType: Literal_['Schedule'] = Field(default=...)
    'A container for slots of time that may be available for booking appointments'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'Further description of the schedule as it would be presented to a consumer while searching.'
    actor: Sequence_['Reference'] = Field(default=...)
    'Slots that reference this schedule resource provide the availability details to these referenced resource(s).'
    active: Optional_['boolean'] = Field(default=None)
    'Whether this schedule record is in active use or should not be used (such as was entered in error).'
    comment: Optional_['markdown'] = Field(default=None)
    'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specialty: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The specialty of a practitioner that would be required to perform the service requested in this appointment.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'External Ids for this item.'
    serviceType: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The specific service that is to be performed during this appointment.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    serviceCategory: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A broad categorization of the service that is to be performed during this appointment.'
    planningHorizon: Optional_['Period'] = Field(default=None)
    'The period of time that the slots that reference this Schedule resource cover (even if none exist). These  cover the amount of time that an organization\'s planning horizon; the interval for which they are currently accepting appointments. This does not define a "template" for planning outside these dates.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SearchParameterComponent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Used to define the parts of a composite search parameter."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    definition: 'canonical' = Field(default=...)
    'The definition of the search parameter that describes this part.'
    expression: 'string' = Field(default=...)
    'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SearchParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A search parameter that defines a named search item that can be used to search/filter on a resource."""
    resourceType: Literal_['SearchParameter'] = Field(default=...)
    'Search parameter for a resource'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: 'uri' = Field(default=...)
    'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the search parameter was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.'
    base: Sequence_['code'] = Field(default=...)
    'The base resource type(s) that this search parameter can be used against.'
    type: 'code' = Field(default=...)
    'The type of value that a search parameter may contain, and how the content is interpreted.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the search parameter.'
    chain: Sequence_['string'] = Field(default_factory=list)
    'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.'
    status: 'code' = Field(default=...)
    'The status of this search parameter. Enables tracking the life-cycle of the content.'
    target: Sequence_['code'] = Field(default_factory=list)
    'Types of resource (if a resource is referenced).'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this search parameter is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    modifier: Sequence_['code'] = Field(default_factory=list)
    'A modifier supported for the search parameter.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual tresponsible for the release and ongoing maintenance of the search parameter.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the search parameter and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the search parameter.'
    component: Sequence_['SearchParameterComponent'] = Field(default_factory=list)
    'Used to define the parts of a composite search parameter.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this search parameter when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate search parameter instances.'
    expression: Optional_['string'] = Field(default=None)
    'A FHIRPath expression that returns a set of elements for the search parameter.'
    constraint: Optional_['string'] = Field(default=None)
    'FHIRPath expression that defines/sets a complex constraint for when this SearchParameter is applicable.'
    multipleOr: Optional_['boolean'] = Field(default=None)
    'Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.'
    comparator: Sequence_['code'] = Field(default_factory=list)
    'Comparators supported for the search parameter.'
    derivedFrom: Optional_['canonical'] = Field(default=None)
    'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.'
    description: 'markdown' = Field(default=...)
    'And how it used.'
    multipleAnd: Optional_['boolean'] = Field(default=None)
    'Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the search parameter is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    processingMode: Optional_['code'] = Field(default=None)
    'How the search parameter relates to the set of elements returned by evaluating the expression query.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    code: 'code' = Field(default=...)
    'The label that is recommended to be used in the URL or the parameter name in a parameters resource for this search parameter.  In some cases, servers may need to use a different CapabilityStatement searchParam.name to differentiate between multiple SearchParameters that happen to have the same code.'


class ServiceRequestPatientInstruction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Instructions in terms that are understood by the patient or consumer."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    instructionMarkdown: Optional_['markdown'] = Field(default=None)
    'Instructions in terms that are understood by the patient or consumer.'
    instructionReference: Optional_['Reference'] = Field(default=None)
    'Instructions in terms that are understood by the patient or consumer.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ServiceRequestOrderDetail(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional details and instructions about the how the services are to be delivered.   For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    parameter: Sequence_['ServiceRequestOrderDetailParameter'] = Field(default=...)
    'The parameter details for the service being requested.'
    parameterFocus: Optional_['CodeableReference'] = Field(default=None)
    'Indicates the context of the order details by reference.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ServiceRequestOrderDetailParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The parameter details for the service being requested."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: 'CodeableConcept' = Field(default=...)
    'A value representing the additional detail or instructions for the order (e.g., catheter insertion, body elevation, descriptive device configuration and/or setting instructions).'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'Indicates a value for the order detail.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'Indicates a value for the order detail.'
    valueRange: Optional_['Range'] = Field(default=None)
    'Indicates a value for the order detail.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Indicates a value for the order detail.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates a value for the order detail.'
    valueString: Optional_['string'] = Field(default=None)
    'Indicates a value for the order detail.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'Indicates a value for the order detail.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ServiceRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of a request for service such as diagnostic investigations, treatments, or operations to be performed."""
    resourceType: Literal_['ServiceRequest'] = Field(default=...)
    'A request for a service to be performed'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Any other notes and comments made about the service request. For example, internal billing notes.'
    focus: Sequence_['Reference'] = Field(default_factory=list)
    "The actual focus of a service request when it is not the subject of record representing something or someone associated with the subject such as a spouse, parent, fetus, or donor. The focus of a service request could also be an existing condition,  an intervention, the subject's diet,  another service request on the subject,  or a body structure such as tumor or implanted device."
    status: 'code' = Field(default=...)
    'The status of the order.'
    intent: 'code' = Field(default=...)
    'Whether the request is a proposal, plan, an original order or a reflex order.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'An explanation or justification for why this service is being requested in coded or textual form.   This is often for billing purposes.  May relate to the resources referred to in `supportingInfo`.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'Plan/proposal/order fulfilled by this request.'
    subject: 'Reference' = Field(default=...)
    'On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    replaces: Sequence_['Reference'] = Field(default_factory=list)
    'The request takes the place of the referenced completed or terminated request(s).'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that classifies the service for searching, sorting and display purposes (e.g. "Surgical Procedure").'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the ServiceRequest should be addressed with respect to other requests.'
    location: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.'
    specimen: Sequence_['Reference'] = Field(default_factory=list)
    'One or more specimens that the laboratory procedure will use.'
    bodySite: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Anatomic location where the procedure should be performed. This is the target site.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'An encounter that provides additional information about the healthcare context in which this request is made.'
    requester: Optional_['Reference'] = Field(default=None)
    'The individual who initiated the request and has responsibility for its activation.'
    performer: Sequence_['Reference'] = Field(default_factory=list)
    'The desired performer for doing the requested service.  For example, the surgeon, dermatopathologist, endoscopist, etc.'
    insurance: Sequence_['Reference'] = Field(default_factory=list)
    'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.'
    authoredOn: Optional_['dateTime'] = Field(default=None)
    'When the request transitioned to being actionable.'
    requisition: Optional_['Identifier'] = Field(default=None)
    'A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.'
    orderDetail: Sequence_['ServiceRequestOrderDetail'] = Field(default_factory=list)
    'Additional details and instructions about the how the services are to be delivered.   For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied.'
    quantityQuantity: Optional_['Quantity'] = Field(default=None)
    'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).'
    quantityRatio: Optional_['Ratio'] = Field(default=None)
    'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).'
    quantityRange: Optional_['Range'] = Field(default=None)
    'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).'
    asNeededBoolean: Optional_['boolean'] = Field(default=None)
    'If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.'
    asNeededCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.'
    doNotPerform: Optional_['boolean'] = Field(default=None)
    'Set this to true if the record is saying that the service/procedure should NOT be performed.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'The date/time at which the requested service should occur.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'The date/time at which the requested service should occur.'
    occurrenceTiming: Optional_['Timing'] = Field(default=None)
    'The date/time at which the requested service should occur.'
    performerType: Optional_['CodeableConcept'] = Field(default=None)
    'Desired type of performer for doing the requested service.'
    bodyStructure: Optional_['Reference'] = Field(default=None)
    'Anatomic location where the procedure should be performed. This is the target site.'
    supportingInfo: Sequence_['CodeableReference'] = Field(default_factory=list)
    'Additional clinical information about the patient or specimen that may influence the services or their interpretations.     This information includes diagnosis, clinical findings and other observations.  In laboratory ordering these are typically referred to as "ask at order entry questions (AOEs)".  This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example,  reporting the amount of inspired oxygen for blood gas measurements.'
    instantiatesUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.'
    relevantHistory: Sequence_['Reference'] = Field(default_factory=list)
    'Key events in the history of the request.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    patientInstruction: Sequence_['ServiceRequestPatientInstruction'] = Field(default_factory=list)
    'Instructions in terms that are understood by the patient or consumer.'
    instantiatesCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.'
    code: Optional_['CodeableReference'] = Field(default=None)
    'A code or reference that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.'


class Slot(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A slot of time on a schedule that may be available for booking appointments."""
    resourceType: Literal_['Slot'] = Field(default=...)
    'A slot of time on a schedule that may be available for booking appointments'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    end: 'instant' = Field(default=...)
    'Date/Time that the slot is to conclude.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    start: 'instant' = Field(default=...)
    'Date/Time that the slot is to begin.'
    status: 'code' = Field(default=...)
    'busy | free | busy-unavailable | busy-tentative | entered-in-error.'
    comment: Optional_['string'] = Field(default=None)
    'Comments on the slot to describe any extended information. Such as custom constraints on the slot.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    schedule: 'Reference' = Field(default=...)
    'The schedule resource that this slot defines an interval of status information.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specialty: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The specialty of a practitioner that would be required to perform the service requested in this appointment.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'External Ids for this item.'
    overbooked: Optional_['boolean'] = Field(default=None)
    'This slot has already been overbooked, appointments are unlikely to be accepted for this time.'
    serviceType: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the Schedule resource.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    serviceCategory: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A broad categorization of the service that is to be performed during this appointment.'
    appointmentType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The style of appointment or patient that may be booked in the slot (not service type).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SpecimenProcessing(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details concerning processing and processing steps for the specimen."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'A coded value specifying the method used to process the specimen.'
    timeDateTime: Optional_['dateTime'] = Field(default=None)
    'A record of the time or period when the specimen processing occurred.  For example the time of sample fixation or the period of time the sample was in formalin.'
    timePeriod: Optional_['Period'] = Field(default=None)
    'A record of the time or period when the specimen processing occurred.  For example the time of sample fixation or the period of time the sample was in formalin.'
    additive: Sequence_['Reference'] = Field(default_factory=list)
    'Material used in the processing step.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'Textual description of procedure.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SpecimenCollection(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details concerning the specimen collection."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'A coded value specifying the technique that is used to perform the procedure.'
    device: Optional_['CodeableReference'] = Field(default=None)
    'A coded value specifying the technique that is used to perform the procedure.'
    duration: Optional_['Duration'] = Field(default=None)
    'The span of time over which the collection of a specimen occurred.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.'
    bodySite: Optional_['CodeableReference'] = Field(default=None)
    'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site.  This element is not used for environmental specimens.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    collector: Optional_['Reference'] = Field(default=None)
    'Person who collected the specimen.'
    procedure: Optional_['Reference'] = Field(default=None)
    'The procedure event during which the specimen was collected (e.g. the surgery leading to the collection of a pathology sample).'
    collectedDateTime: Optional_['dateTime'] = Field(default=None)
    'Time when specimen was collected from subject - the physiologically relevant time.'
    collectedPeriod: Optional_['Period'] = Field(default=None)
    'Time when specimen was collected from subject - the physiologically relevant time.'
    fastingStatusCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.'
    fastingStatusDuration: Optional_['Duration'] = Field(default=None)
    'Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SpecimenContainer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The container holding the specimen.  The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    device: 'Reference' = Field(default=...)
    'The device resource for the the container holding the specimen. If the container is in a holder then the referenced device will point to a parent device.'
    location: Optional_['Reference'] = Field(default=None)
    'The location of the container holding the specimen.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    specimenQuantity: Optional_['Quantity'] = Field(default=None)
    'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SpecimenFeature(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A physical feature or landmark on a specimen, highlighted for context by the collector of the specimen (e.g. surgeon), that identifies the type of feature as well as its meaning (e.g. the red ink indicating the resection margin of the right lobe of the excised prostate tissue or wire loop at radiologically suspected tumor location)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'The landmark or feature being highlighted.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: 'string' = Field(default=...)
    'Description of the feature of the specimen.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Specimen(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A sample to be used for analysis."""
    resourceType: Literal_['Specimen'] = Field(default=...)
    'Sample for analysis'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of material that forms the specimen.'
    role: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The role or reason for the specimen in the testing workflow.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).'
    status: Optional_['code'] = Field(default=None)
    'The availability of the specimen.'
    parent: Sequence_['Reference'] = Field(default_factory=list)
    'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.'
    subject: Optional_['Reference'] = Field(default=None)
    'Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance, a biologically-derived product, or a device.'
    request: Sequence_['Reference'] = Field(default_factory=list)
    'Details concerning a service request that required a specimen to be collected.'
    feature: Sequence_['SpecimenFeature'] = Field(default_factory=list)
    'A physical feature or landmark on a specimen, highlighted for context by the collector of the specimen (e.g. surgeon), that identifies the type of feature as well as its meaning (e.g. the red ink indicating the resection margin of the right lobe of the excised prostate tissue or wire loop at radiologically suspected tumor location).'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    combined: Optional_['code'] = Field(default=None)
    'This element signifies if the specimen is part of a group or pooled.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    container: Sequence_['SpecimenContainer'] = Field(default_factory=list)
    'The container holding the specimen.  The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.'
    condition: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A mode or state of being that describes the nature of the specimen.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Id for specimen.'
    collection: Optional_['SpecimenCollection'] = Field(default=None)
    'Details concerning the specimen collection.'
    processing: Sequence_['SpecimenProcessing'] = Field(default_factory=list)
    'Details concerning processing and processing steps for the specimen.'
    receivedTime: Optional_['dateTime'] = Field(default=None)
    'Time when specimen is received by the testing laboratory for processing or testing.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    accessionIdentifier: Optional_['Identifier'] = Field(default=None)
    'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.'


class SpecimenDefinitionTypeTested(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specimen conditioned in a container as expected by the testing laboratory."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of specimen conditioned for testing expected by lab.'
    handling: Sequence_['SpecimenDefinitionTypeTestedHandling'] = Field(default_factory=list)
    'Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    isDerived: Optional_['boolean'] = Field(default=None)
    'Primary of secondary specimen.'
    container: Optional_['SpecimenDefinitionTypeTestedContainer'] = Field(default=None)
    "The specimen's container."
    singleUse: Optional_['boolean'] = Field(default=None)
    'Specimen can be used by only one test or panel if the value is "true".'
    preference: 'code' = Field(default=...)
    'The preference for this type of conditioned specimen.'
    requirement: Optional_['markdown'] = Field(default=None)
    'Requirements for delivery and special handling of this kind of conditioned specimen.'
    retentionTime: Optional_['Duration'] = Field(default=None)
    'The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    rejectionCriterion: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Criterion for rejection of the specimen in its container by the laboratory.'
    testingDestination: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Where the specimen will be tested: e.g., lab, sector, device or any combination of these.'


class SpecimenDefinitionTypeTestedContainer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The specimen's container."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    cap: Optional_['CodeableConcept'] = Field(default=None)
    'Color of container cap.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of container used to contain this kind of specimen.'
    material: Optional_['CodeableConcept'] = Field(default=None)
    'The type of material of the container.'
    capacity: Optional_['Quantity'] = Field(default=None)
    'The capacity (volume or other measure) of this kind of container.'
    additive: Sequence_['SpecimenDefinitionTypeTestedContainerAdditive'] = Field(default_factory=list)
    'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'The textual description of the kind of container.'
    preparation: Optional_['markdown'] = Field(default=None)
    'Special processing that should be applied to the container for this kind of specimen.'
    minimumVolumeQuantity: Optional_['Quantity'] = Field(default=None)
    'The minimum volume to be conditioned in the container.'
    minimumVolumeString: Optional_['string'] = Field(default=None)
    'The minimum volume to be conditioned in the container.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SpecimenDefinitionTypeTestedContainerAdditive(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    additiveCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.'
    additiveReference: Optional_['Reference'] = Field(default=None)
    'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SpecimenDefinitionTypeTestedHandling(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    maxDuration: Optional_['Duration'] = Field(default=None)
    'The maximum time interval of preservation of the specimen with these conditions.'
    instruction: Optional_['markdown'] = Field(default=None)
    "Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'."
    temperatureRange: Optional_['Range'] = Field(default=None)
    'The temperature interval for this set of handling instructions.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    temperatureQualifier: Optional_['CodeableConcept'] = Field(default=None)
    'It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.'


class SpecimenDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A kind of specimen with associated set of requirements."""
    resourceType: Literal_['SpecimenDefinition'] = Field(default=...)
    'Kind of specimen'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URL that is used to identify this SpecimenDefinition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the {{title}}. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the SpecimenDefinition.'
    status: 'code' = Field(default=...)
    'The current state of theSpecimenDefinition.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explains why this SpecimeDefinition is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.'
    copyright: Optional_['markdown'] = Field(default=None)
    'Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'A business identifier assigned to this SpecimenDefinition.'
    subjectCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.'
    subjectReference: Optional_['Reference'] = Field(default=None)
    'A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of specimen definitions.'
    timeAspect: Optional_['string'] = Field(default=None)
    'Time aspect of specimen collection (duration or offset).'
    collection: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The action to be performed for collecting the specimen.'
    typeTested: Sequence_['SpecimenDefinitionTypeTested'] = Field(default_factory=list)
    'Specimen conditioned in a container as expected by the testing laboratory.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the SpecimenDefinition from the consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A jurisdiction in which the SpecimenDefinition is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    typeCollected: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of material to be collected.'
    derivedFromUri: Sequence_['uri'] = Field(default_factory=list)
    'The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    "The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date."
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the SpecimenDefinition content was or is planned to be effective.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    patientPreparation: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Preparation of the patient for specimen collection.'
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    derivedFromCanonical: Sequence_['canonical'] = Field(default_factory=list)
    'The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.'
    date: Optional_['dateTime'] = Field(default=None)
    'For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.'


class StructureDefinitionDifferential(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    element: Sequence_['ElementDefinition'] = Field(default=...)
    'Captures constraints on each element within the resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class StructureDefinitionSnapshot(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    element: Sequence_['ElementDefinition'] = Field(default=...)
    'Captures constraints on each element within the resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class StructureDefinitionContext(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies the types of resource or data type elements to which the extension can be applied. For more guidance on using the 'context' element, see the [defining extensions page](defining-extensions.html#context)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'Defines how to interpret the expression that defines what the context of the extension is.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: 'string' = Field(default=...)
    'An expression that defines where an extension can be used in resources.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class StructureDefinitionMapping(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An external specification that the content is mapped to."""
    name: Optional_['string'] = Field(default=None)
    'A name for the specification that is being mapped to.'
    comment: Optional_['string'] = Field(default=None)
    'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.'
    identity: 'id' = Field(default=...)
    'An Internal id that is used to identify this mapping set when specific mappings are made.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    uri: Optional_['uri'] = Field(default=None)
    'An absolute URI that identifies the specification that this mapping is expressed to.'


class StructureDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types."""
    resourceType: Literal_['StructureDefinition'] = Field(default=...)
    'Structural Definition'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: 'uri' = Field(default=...)
    'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the structure definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.'
    kind: 'code' = Field(default=...)
    'Defines the kind of structure that this definition is describing.'
    type: 'uri' = Field(default=...)
    'The type this structure describes. If the derivation kind is \'specialization\' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).  References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models, where they are required.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the structure definition.'
    status: 'code' = Field(default=...)
    'The status of this structure definition. Enables tracking the life-cycle of the content.'
    version: Optional_['string'] = Field(default=None)
    "The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. There is no expectation that versions can be placed in a lexicographical sequence, so authors are encouraged to populate the StructureDefinition.versionAlgorithm[x] element to enable comparisons. If there is no managed version available, authors can consider using ISO date/time syntax (e.g., '2023-01-01')."
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this structure definition is needed and why it has been designed as it has.'
    keyword: Sequence_['Coding'] = Field(default_factory=list)
    '(DEPRECATED) A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes.'
    mapping: Sequence_['StructureDefinitionMapping'] = Field(default_factory=list)
    'An external specification that the content is mapped to.'
    context: Sequence_['StructureDefinitionContext'] = Field(default_factory=list)
    "Identifies the types of resource or data type elements to which the extension can be applied. For more guidance on using the 'context' element, see the [defining extensions page](defining-extensions.html#context)."
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    abstract: 'boolean' = Field(default=...)
    'Whether structure this definition describes is abstract or not  - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged  between systems.'
    snapshot: Optional_['StructureDefinitionSnapshot'] = Field(default=None)
    'A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the structure definition.'
    copyright: Optional_['markdown'] = Field(default=None)
    "A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.  The short copyright declaration (e.g. (c) '2015+ xyz organization' should be sent in the copyrightLabel element."
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances.'
    derivation: Optional_['code'] = Field(default=None)
    'How the type relates to the baseDefinition.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the structure definition from a consumer's perspective."
    fhirVersion: Optional_['code'] = Field(default=None)
    'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.6.0. for this version.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the structure definition is intended to be used.'
    differential: Optional_['StructureDefinitionDifferential'] = Field(default=None)
    'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    baseDefinition: Optional_['canonical'] = Field(default=None)
    'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.'
    contextInvariant: Sequence_['string'] = Field(default_factory=list)
    'A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'


class StructureMapStructure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    url: 'canonical' = Field(default=...)
    'The canonical reference to the structure.'
    mode: 'code' = Field(default=...)
    'How the referenced structure is used in this mapping.'
    alias: Optional_['string'] = Field(default=None)
    'The name used for this type in the map.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    documentation: Optional_['string'] = Field(default=None)
    'Documentation that describes how the structure is used in the mapping.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class StructureMapGroup(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Organizes the mapping into managable chunks for human review/ease of maintenance."""
    name: 'id' = Field(default=...)
    'A unique name for the group for the convenience of human readers.'
    rule: Sequence_['StructureMapGroupRule'] = Field(default_factory=list)
    'Transform Rule from source to target.'
    input: Sequence_['StructureMapGroupInput'] = Field(default=...)
    'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.'
    extends: Optional_['id'] = Field(default=None)
    'Another group that this group adds rules to.'
    typeMode: Optional_['code'] = Field(default=None)
    'If this is the default rule set to apply for the source type or this combination of types.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    documentation: Optional_['string'] = Field(default=None)
    'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class StructureMapGroupInput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A name assigned to an instance of data. The instance must be provided when the mapping is invoked."""
    name: 'id' = Field(default=...)
    'Name for this instance of data.'
    type: Optional_['string'] = Field(default=None)
    'Type for this instance of data.'
    mode: 'code' = Field(default=...)
    'Mode for this instance of data.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    documentation: Optional_['string'] = Field(default=None)
    'Documentation for this instance of data.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class StructureMapGroupRule(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Transform Rule from source to target."""
    name: Optional_['id'] = Field(default=None)
    'Name of the rule for internal references.'
    rule: Sequence_['StructureMapGroupRule'] = Field(default_factory=list)
    'Rules contained in this rule.'
    source: Sequence_['StructureMapGroupRuleSource'] = Field(default=...)
    'Source inputs to the mapping.'
    target: Sequence_['StructureMapGroupRuleTarget'] = Field(default_factory=list)
    'Content to create because of this mapping rule.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    dependent: Sequence_['StructureMapGroupRuleDependent'] = Field(default_factory=list)
    'Which other rules to apply in the context of this rule.'
    documentation: Optional_['string'] = Field(default=None)
    'Documentation for this instance of data.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class StructureMapGroupRuleDependent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Which other rules to apply in the context of this rule."""
    name: 'id' = Field(default=...)
    'Name of a rule or group to apply.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    parameter: Sequence_['StructureMapGroupRuleTargetParameter'] = Field(default=...)
    'Parameter to pass to the rule or group.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class StructureMapGroupRuleTarget(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Content to create because of this mapping rule."""
    context: Optional_['string'] = Field(default=None)
    'Variable this rule applies to.'
    element: Optional_['string'] = Field(default=None)
    'Field to create in the context.'
    variable: Optional_['id'] = Field(default=None)
    'Named context for field, if desired, and a field is specified.'
    listMode: Sequence_['code'] = Field(default_factory=list)
    'If field is a list, how to manage the list.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    transform: Optional_['code'] = Field(default=None)
    'How the data is copied / created.'
    parameter: Sequence_['StructureMapGroupRuleTargetParameter'] = Field(default_factory=list)
    'Parameters to the transform.'
    listRuleId: Optional_['id'] = Field(default=None)
    'Internal rule reference for shared list items.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class StructureMapGroupRuleTargetParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Parameters to the transform."""
    valueId: Optional_['id'] = Field(default=None)
    'Parameter value - variable or literal.'
    valueString: Optional_['string'] = Field(default=None)
    'Parameter value - variable or literal.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'Parameter value - variable or literal.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'Parameter value - variable or literal.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'Parameter value - variable or literal.'
    valueDate: Optional_['date'] = Field(default=None)
    'Parameter value - variable or literal.'
    valueTime: Optional_['time'] = Field(default=None)
    'Parameter value - variable or literal.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'Parameter value - variable or literal.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class StructureMapGroupRuleSource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Source inputs to the mapping."""
    min: Optional_['integer'] = Field(default=None)
    'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.'
    max: Optional_['string'] = Field(default=None)
    'Specified maximum cardinality for the element - a number or a "*". This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it\'s the default value).'
    type: Optional_['string'] = Field(default=None)
    'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.'
    check: Optional_['string'] = Field(default=None)
    'FHIRPath expression  - must be true or the mapping engine throws an error instead of completing.'
    context: 'id' = Field(default=...)
    'Type or variable this rule applies to.'
    element: Optional_['string'] = Field(default=None)
    'Optional field for this source.'
    listMode: Optional_['code'] = Field(default=None)
    'How to handle the list mode for this element.'
    variable: Optional_['id'] = Field(default=None)
    'Named context for field, if a field is specified.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    condition: Optional_['string'] = Field(default=None)
    'FHIRPath expression  - must be true or the rule does not apply.'
    logMessage: Optional_['string'] = Field(default=None)
    'A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.'
    defaultValue: Optional_['string'] = Field(default=None)
    'A value to use if there is no existing value in the source object.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class StructureMapConst(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Definition of a constant value used in the map rules."""
    name: Optional_['id'] = Field(default=None)
    'Other maps used by this map (canonical URLs).'
    value: Optional_['string'] = Field(default=None)
    'A FHIRPath expression that is the value of this variable.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class StructureMap(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A Map of relationships between 2 structures that can be used to transform data."""
    resourceType: Literal_['StructureMap'] = Field(default=...)
    'A Map of relationships between 2 structures that can be used to transform data'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: 'uri' = Field(default=...)
    'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date  (and optionally time) when the structure map was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the structure map.'
    const: Sequence_['StructureMapConst'] = Field(default_factory=list)
    'Definition of a constant value used in the map rules.'
    group: Sequence_['StructureMapGroup'] = Field(default=...)
    'Organizes the mapping into managable chunks for human review/ease of maintenance.'
    status: 'code' = Field(default=...)
    'The status of this structure map. Enables tracking the life-cycle of the content.'
    import_: Sequence_['canonical'] = Field(default_factory=list, alias='import')
    'Other maps used by this map (canonical URLs).'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this structure map is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the structure map.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.'
    structure: Sequence_['StructureMapStructure'] = Field(default_factory=list)
    'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure map instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the structure map from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the structure map is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'


class SubscriptionParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Channel-dependent information to send as part of the notification (e.g., HTTP Headers)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'Parameter name for information passed to the channel for notifications, for example in the case of a REST hook wanting to pass through an authorization header, the name would be Authorization.'
    value: 'string' = Field(default=...)
    'Parameter value for information passed to the channel for notifications, for example in the case of a REST hook wanting to pass through an authorization header, the value would be `Bearer 0193...`.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubscriptionFilterBy(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The filter properties to be applied to narrow the subscription topic stream.  When multiple filters are applied, evaluates to true if all the conditions applicable to that resource are met; otherwise it returns false (i.e., logical AND)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    value: 'string' = Field(default=...)
    'The literal value or resource path as is legal in search - for example, `Patient/123` or `le1950`.'
    modifier: Optional_['code'] = Field(default=None)
    'Modifier applied to this filter parameter.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Optional_['code'] = Field(default=None)
    'Comparator applied to this filter parameter.'
    resourceType: Optional_['uri'] = Field(default=None)
    'A resource listed in the `SubscriptionTopic` this `Subscription` references (`SubscriptionTopic.canFilterBy.resource`). This element can be used to differentiate filters for topics that include more than one resource type.'
    filterParameter: 'string' = Field(default=...)
    'The filter as defined in the `SubscriptionTopic.canFilterBy.filterParameter` element.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Subscription(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The subscription resource describes a particular client's request to be notified about a SubscriptionTopic."""
    resourceType: Literal_['Subscription'] = Field(default=...)
    'Notification about a SubscriptionTopic'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    end: Optional_['instant'] = Field(default=None)
    'The time for the server to turn the subscription off.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the subscription.'
    topic: 'canonical' = Field(default=...)
    'The reference to the subscription topic to be notified about.'
    status: 'code' = Field(default=...)
    'The status of the subscription, which marks the server state for managing the subscription.'
    reason: Optional_['string'] = Field(default=None)
    'A description of why this subscription is defined.'
    contact: Sequence_['ContactPoint'] = Field(default_factory=list)
    'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.'
    timeout: Optional_['unsignedInt'] = Field(default=None)
    'If present, the maximum amount of time a server will allow before failing a notification attempt.'
    content: Optional_['code'] = Field(default=None)
    'How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    filterBy: Sequence_['SubscriptionFilterBy'] = Field(default_factory=list)
    'The filter properties to be applied to narrow the subscription topic stream.  When multiple filters are applied, evaluates to true if all the conditions applicable to that resource are met; otherwise it returns false (i.e., logical AND).'
    endpoint: Optional_['url'] = Field(default=None)
    'The url that describes the actual end-point to send notifications to.'
    maxCount: Optional_['positiveInt'] = Field(default=None)
    'If present, the maximum number of events that will be included in a notification bundle. Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    parameter: Sequence_['SubscriptionParameter'] = Field(default_factory=list)
    'Channel-dependent information to send as part of the notification (e.g., HTTP Headers).'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    channelType: 'Coding' = Field(default=...)
    'The type of channel to send notifications on.'
    contentType: Optional_['code'] = Field(default=None)
    'The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that:\n\n* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`.\n\n* additional MIME types can be allowed by channels - e.g., `text/plain` and `text/html` are defined by the Email channel.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    managingEntity: Optional_['Reference'] = Field(default=None)
    'Entity with authorization to make subsequent revisions to the Subscription and also determines what data the subscription is authorized to disclose.'
    heartbeatPeriod: Optional_['unsignedInt'] = Field(default=None)
    "If present, a 'heartbeat' notification (keep-alive) is sent via this channel with an interval period equal to this elements integer value in seconds.  If not present, a heartbeat notification is not sent."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubscriptionStatusNotificationEvent(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Detailed information about events relevant to this subscription notification."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    focus: Optional_['Reference'] = Field(default=None)
    'The focus of this event. While this will usually be a reference to the focus resource of the event, it MAY contain a reference to a non-FHIR object.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    timestamp: Optional_['instant'] = Field(default=None)
    'The actual time this event occurred on the server.'
    eventNumber: 'integer64' = Field(default=...)
    'Either the sequential number of this event in this subscription context or a relative event number for this notification.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    additionalContext: Sequence_['Reference'] = Field(default_factory=list)
    'Additional context information for this event. Generally, this will contain references to additional resources included with the event (e.g., the Patient relevant to an Encounter), however it MAY refer to non-FHIR objects.'


class SubscriptionStatus(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The SubscriptionStatus resource describes the state of a Subscription during notifications."""
    resourceType: Literal_['SubscriptionStatus'] = Field(default=...)
    'Status information about a Subscription provided during event notification'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: 'code' = Field(default=...)
    'The type of event being conveyed with this notification.'
    topic: Optional_['canonical'] = Field(default=None)
    'The reference to the SubscriptionTopic for the Subscription which generated this notification.'
    error: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A record of errors that occurred when the server processed a notification.'
    status: Optional_['code'] = Field(default=None)
    'The status of the subscription, which marks the server state for managing the subscription.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    subscription: 'Reference' = Field(default=...)
    'The reference to the Subscription which generated this notification.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    notificationEvent: Sequence_['SubscriptionStatusNotificationEvent'] = Field(default_factory=list)
    'Detailed information about events relevant to this subscription notification.'
    eventsSinceSubscriptionStart: Optional_['integer64'] = Field(default=None)
    'The total number of actual events which have been generated since the Subscription was created (inclusive of this notification) - regardless of how many have been successfully communicated.  This number is NOT incremented for handshake and heartbeat notifications.'


class SubscriptionTopicNotificationShape(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """List of properties to describe the shape (e.g., resources) included in notifications from this Subscription Topic."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    include: Sequence_['string'] = Field(default_factory=list)
    'Search-style _include directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them.  Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them.'
    resource: 'uri' = Field(default=...)
    "URL of the Resource that is the type used in this shape. This is the 'focus' resource of the topic (or one of them if there are more than one) and the root resource for this shape definition. It will be the same, a generality, or a specificity of SubscriptionTopic.resourceTrigger.resource or SubscriptionTopic.eventTrigger.resource when they are present."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    revInclude: Sequence_['string'] = Field(default_factory=list)
    'Search-style _revinclude directives, rooted in the resource for this shape. Servers SHOULD include resources listed here, if they exist and the user is authorized to receive them.  Clients SHOULD be prepared to receive these additional resources, but SHALL function properly without them.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubscriptionTopicResourceTrigger(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A definition of a resource-based event that triggers a notification based on the SubscriptionTopic. The criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression. Multiple triggers are considered OR joined (e.g., a resource update matching ANY of the definitions will trigger a notification)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    resource: 'uri' = Field(default=...)
    'URL of the Resource that is the type used in this resource trigger.  Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., http://hl7.org/fhir/StructureDefinition). For example, "Patient" maps to http://hl7.org/fhir/StructureDefinition/Patient.  For more information, see <a href="elementdefinition-definitions.html#ElementDefinition.type.code">ElementDefinition.type.code</a>.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'The human readable description of this resource trigger for the SubscriptionTopic -  for example, "An Encounter enters the \'in-progress\' state".'
    queryCriteria: Optional_['SubscriptionTopicResourceTriggerQueryCriteria'] = Field(default=None)
    'The FHIR query based rules that the server should use to determine when to trigger a notification for this subscription topic.'
    fhirPathCriteria: Optional_['string'] = Field(default=None)
    'The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    supportedInteraction: Sequence_['code'] = Field(default_factory=list)
    'The FHIR RESTful interaction which can be used to trigger a notification for the SubscriptionTopic. Multiple values are considered OR joined (e.g., CREATE or UPDATE). If not present, all supported interactions are assumed.'


class SubscriptionTopicResourceTriggerQueryCriteria(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The FHIR query based rules that the server should use to determine when to trigger a notification for this subscription topic."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    current: Optional_['string'] = Field(default=None)
    'The FHIR query based rules are applied to the current resource state (e.g., state after an update).'
    previous: Optional_['string'] = Field(default=None)
    'The FHIR query based rules are applied to the previous resource state (e.g., state before an update).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requireBoth: Optional_['boolean'] = Field(default=None)
    'If set to `true`, both the `current` and `previous` query criteria must evaluate `true` to trigger a notification for this topic.  If set to `false` or not present, a notification for this topic will be triggered if either the `current` or `previous` tests evaluate to `true`.'
    resultForCreate: Optional_['code'] = Field(default=None)
    'For `create` interactions, should the `previous` criteria count as an automatic pass or an automatic fail. If not present, the testing behavior during `create` interactions is unspecified (server discretion).'
    resultForDelete: Optional_['code'] = Field(default=None)
    "For 'delete' interactions, should the 'current' query criteria count as an automatic pass or an automatic fail. If not present, the testing behavior during `delete` interactions is unspecified (server discretion)."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubscriptionTopicEventTrigger(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Event definition which can be used to trigger the SubscriptionTopic."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    event: 'CodeableConcept' = Field(default=...)
    'A well-defined event which can be used to trigger notifications from the SubscriptionTopic.'
    resource: 'uri' = Field(default=...)
    'URL of the Resource that is the focus type used in this event trigger.  Relative URLs are relative to the StructureDefinition root of the implemented FHIR version (e.g., http://hl7.org/fhir/StructureDefinition). For example, "Patient" maps to http://hl7.org/fhir/StructureDefinition/Patient.  For more information, see <a href="elementdefinition-definitions.html#ElementDefinition.type.code">ElementDefinition.type.code</a>.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'The human readable description of an event to trigger a notification for the SubscriptionTopic - for example, "Patient Admission, as defined in HL7v2 via message ADT^A01". Multiple values are considered OR joined (e.g., matching any single event listed).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubscriptionTopicCanFilterBy(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """List of properties by which Subscriptions on the SubscriptionTopic can be filtered. May be defined Search Parameters (e.g., Encounter.patient) or parameters defined within this SubscriptionTopic context (e.g., hub.event)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    resource: Optional_['uri'] = Field(default=None)
    'URL of the Resource that is the type used in this filter. This is the "focus" of the topic (or one of them if there are more than one). It will be the same, a generality, or a specificity of SubscriptionTopic.resourceTrigger.resource or SubscriptionTopic.eventTrigger.resource when they are present.'
    modifier: Sequence_['code'] = Field(default_factory=list)
    'Modifiers allowed for the filter parameter.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    comparator: Sequence_['code'] = Field(default_factory=list)
    'Comparators allowed for the filter parameter.'
    description: Optional_['markdown'] = Field(default=None)
    'Description of how this filtering parameter is intended to be used.'
    filterParameter: 'string' = Field(default=...)
    'Either the canonical URL to a search parameter (like "http://hl7.org/fhir/SearchParameter/encounter-patient") or topic-defined parameter (like "hub.event") which is a label for the filter.'
    filterDefinition: Optional_['uri'] = Field(default=None)
    'Either the canonical URL to a search parameter (like "http://hl7.org/fhir/SearchParameter/encounter-patient") or the officially-defined URI for a shared filter concept (like "http://example.org/concepts/shared-common-event").'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubscriptionTopic(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes a stream of resource state changes or events and annotated with labels useful to filter projections from this topic."""
    resourceType: Literal_['SubscriptionTopic'] = Field(default=...)
    'The definition of a specific topic for triggering events within the Subscriptions framework'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: 'uri' = Field(default=...)
    'An absolute URI that is used to identify this subscription topic when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this subscription topic is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the subscription topic is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the subscription topic This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the subscription topic.  For example, "admission".'
    status: 'code' = Field(default=...)
    'The current state of the SubscriptionTopic.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the subscription topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explains why this Topic is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'Helps establish the "authority/credibility" of the SubscriptionTopic.  May also allow for contact.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the SubscriptionTopic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SubscriptionTopic.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this subscription topic by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions.'
    derivedFrom: Sequence_['canonical'] = Field(default_factory=list)
    'The canonical URL pointing to another FHIR-defined SubscriptionTopic that is adhered to in whole or in part by this SubscriptionTopic.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the Topic from the consumer's perspective."
    canFilterBy: Sequence_['SubscriptionTopicCanFilterBy'] = Field(default_factory=list)
    'List of properties by which Subscriptions on the SubscriptionTopic can be filtered. May be defined Search Parameters (e.g., Encounter.patient) or parameters defined within this SubscriptionTopic context (e.g., hub.event).'
    experimental: Optional_['boolean'] = Field(default=None)
    'A flag to indicate that this TopSubscriptionTopicic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A jurisdiction in which the Topic is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    eventTrigger: Sequence_['SubscriptionTopicEventTrigger'] = Field(default_factory=list)
    'Event definition which can be used to trigger the SubscriptionTopic.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    "The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date."
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the SubscriptionTopic content was or is planned to be effective.'
    resourceTrigger: Sequence_['SubscriptionTopicResourceTrigger'] = Field(default_factory=list)
    'A definition of a resource-based event that triggers a notification based on the SubscriptionTopic. The criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression. Multiple triggers are considered OR joined (e.g., a resource update matching ANY of the definitions will trigger a notification).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    notificationShape: Sequence_['SubscriptionTopicNotificationShape'] = Field(default_factory=list)
    'List of properties to describe the shape (e.g., resources) included in notifications from this Subscription Topic.'
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the subscription topic was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the subscription topic changes.'


class SubstanceIngredient(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A substance can be composed of other substances."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    quantity: Optional_['Ratio'] = Field(default=None)
    'The amount of the ingredient in the substance - a concentration ratio.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    substanceCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Another substance that is a component of this substance.'
    substanceReference: Optional_['Reference'] = Field(default=None)
    'Another substance that is a component of this substance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class Substance(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A homogeneous material with a definite composition."""
    resourceType: Literal_['Substance'] = Field(default=...)
    'A homogeneous material with a definite composition'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: Optional_['code'] = Field(default=None)
    'A code to indicate if the substance is actively used.'
    expiry: Optional_['dateTime'] = Field(default=None)
    'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    instance: 'boolean' = Field(default=...)
    'A boolean to indicate if this an instance of a substance or a kind of one (a definition).'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A code that classifies the general type of substance.  This is used  for searching, sorting and display purposes.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount of the substance.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Unique identifier for the substance. For an instance, an identifier associated with the package/container (usually a label affixed directly).'
    ingredient: Sequence_['SubstanceIngredient'] = Field(default_factory=list)
    'A substance can be composed of other substances.'
    description: Optional_['markdown'] = Field(default=None)
    'A description of the substance - its appearance, handling requirements, and other usage notes.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'CodeableReference' = Field(default=...)
    'A code (or set of codes) that identify this substance.'


class SubstanceDefinitionCharacterization(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """General specifications for this substance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    form: Optional_['CodeableConcept'] = Field(default=None)
    'Describes the nature of the chemical entity and explains, for instance, whether this is a base or a salt form.'
    file: Sequence_['Attachment'] = Field(default_factory=list)
    'The data produced by the analytical instrument or a pictorial representation of that data. Examples: a JCAMP, JDX, or ADX file, or a chromatogram or spectrum analysis.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    technique: Optional_['CodeableConcept'] = Field(default=None)
    'The method used to elucidate the characterization of the drug substance. Example: HPLC.'
    description: Optional_['markdown'] = Field(default=None)
    'The description or justification in support of the interpretation of the data file.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinitionMolecularWeight(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The average mass of a molecule of a compound compared to 1/12 the mass of carbon 12 and calculated as the sum of the atomic weights of the constituent atoms."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Type of molecular weight such as exact, average (also known as. number average), weight average.'
    method: Optional_['CodeableConcept'] = Field(default=None)
    'The method by which the molecular weight was determined.'
    amount: 'Quantity' = Field(default=...)
    'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinitionSourceMaterial(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Material or taxonomic/anatomical source for the substance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'A classification that provides the origin of the raw material. Example: cat hair would be an Animal source type.'
    part: Optional_['CodeableConcept'] = Field(default=None)
    'An anatomical origin of the source material within an organism.'
    genus: Optional_['CodeableConcept'] = Field(default=None)
    'The genus of an organism, typically referring to the Latin epithet of the genus element of the plant/animal scientific name.'
    species: Optional_['CodeableConcept'] = Field(default=None)
    'The species of an organism, typically referring to the Latin epithet of the species of the plant/animal.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    countryOfOrigin: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The country or countries where the material is harvested.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinitionRelationship(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A link between this substance and another, with details of the relationship."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'For example "salt to parent", "active moiety", "starting material", "polymorph", "impurity of".'
    source: Sequence_['Reference'] = Field(default_factory=list)
    'Supporting literature.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    amountQuantity: Optional_['Quantity'] = Field(default=None)
    'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.'
    amountRatio: Optional_['Ratio'] = Field(default=None)
    'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.'
    amountString: Optional_['string'] = Field(default=None)
    'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.'
    isDefining: Optional_['boolean'] = Field(default=None)
    'For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.'
    comparator: Optional_['CodeableConcept'] = Field(default=None)
    'An operator for the amount, for example "average", "approximately", "less than".'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    ratioHighLimitAmount: Optional_['Ratio'] = Field(default=None)
    'For use when the numeric has an uncertain range.'
    substanceDefinitionReference: Optional_['Reference'] = Field(default=None)
    'A pointer to another substance, as a resource or just a representational code.'
    substanceDefinitionCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A pointer to another substance, as a resource or just a representational code.'


class SubstanceDefinitionStructure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Structural information."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    technique: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The method used to elucidate the structure of the drug substance. Examples: X-ray, NMR, Peptide mapping, Ligand binding assay.'
    sourceDocument: Sequence_['Reference'] = Field(default_factory=list)
    'The source of information about the structure.'
    representation: Sequence_['SubstanceDefinitionStructureRepresentation'] = Field(default_factory=list)
    'A depiction of the structure of the substance.'
    stereochemistry: Optional_['CodeableConcept'] = Field(default=None)
    'Stereochemistry type.'
    opticalActivity: Optional_['CodeableConcept'] = Field(default=None)
    'Optical activity type.'
    molecularWeight: Optional_['SubstanceDefinitionMolecularWeight'] = Field(default=None)
    'The molecular weight or weight range (for proteins, polymers or nucleic acids).'
    molecularFormula: Optional_['string'] = Field(default=None)
    'An expression which states the number and type of atoms present in a molecule of a substance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    molecularFormulaByMoiety: Optional_['string'] = Field(default=None)
    'Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot.'


class SubstanceDefinitionStructureRepresentation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A depiction of the structure of the substance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The kind of structural representation (e.g. full, partial).'
    format: Optional_['CodeableConcept'] = Field(default=None)
    'The format of the representation e.g. InChI, SMILES, MOLFILE, CDX, SDF, PDB, mmCIF. The logical content type rather than the physical file format of a document.'
    document: Optional_['Reference'] = Field(default=None)
    'An attached file with the structural representation e.g. a molecular structure graphic of the substance, a JCAMP or AnIML file.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    representation: Optional_['string'] = Field(default=None)
    'The structural representation as a text string in a standard format.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinitionProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """General specifications for this substance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'CodeableConcept' = Field(default=...)
    'A code expressing the type of property.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'A value for the property.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'A value for the property.'
    valueDate: Optional_['date'] = Field(default=None)
    'A value for the property.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'A value for the property.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'A value for the property.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinitionMoiety(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Moiety, for structural modifications."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    role: Optional_['CodeableConcept'] = Field(default=None)
    'Role that the moiety is playing.'
    name: Optional_['string'] = Field(default=None)
    'Textual name for this moiety substance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    amountQuantity: Optional_['Quantity'] = Field(default=None)
    'Quantitative value for this moiety.'
    amountString: Optional_['string'] = Field(default=None)
    'Quantitative value for this moiety.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Identifier by which this moiety substance is known.'
    stereochemistry: Optional_['CodeableConcept'] = Field(default=None)
    'Stereochemistry type.'
    opticalActivity: Optional_['CodeableConcept'] = Field(default=None)
    'Optical activity type.'
    measurementType: Optional_['CodeableConcept'] = Field(default=None)
    'The measurement type of the quantitative value. In capturing the actual relative amounts of substances or molecular fragments it may be necessary to indicate whether the amount refers to, for example, a mole ratio or weight ratio.'
    molecularFormula: Optional_['string'] = Field(default=None)
    'Molecular formula for this moiety of this substance, typically using the Hill system.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinitionName(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Names applicable to this substance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'The actual name.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    "Name type, for example 'systematic',  'scientific, 'brand'."
    status: Optional_['CodeableConcept'] = Field(default=None)
    "The status of the name, for example 'current', 'proposed'."
    domain: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive.'
    source: Sequence_['Reference'] = Field(default_factory=list)
    'Supporting literature.'
    synonym: Sequence_['SubstanceDefinitionName'] = Field(default_factory=list)
    'A synonym of this particular name, by which the substance is also known.'
    language: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Human language that the name is written in.'
    official: Sequence_['SubstanceDefinitionNameOfficial'] = Field(default_factory=list)
    'Details of the official nature of this name.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    preferred: Optional_['boolean'] = Field(default=None)
    'If this is the preferred name for this substance.'
    translation: Sequence_['SubstanceDefinitionName'] = Field(default_factory=list)
    'A translation for this name into another human language.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The jurisdiction where this name applies.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinitionNameOfficial(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Details of the official nature of this name."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    date: Optional_['dateTime'] = Field(default=None)
    'Date of the official name change.'
    status: Optional_['CodeableConcept'] = Field(default=None)
    "The status of the official name, for example 'draft', 'active', 'retired'."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    authority: Optional_['CodeableConcept'] = Field(default=None)
    'Which authority uses this official name.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinitionCode(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Codes associated with the substance."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The specific code.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Any comment can be provided in this field, if necessary.'
    status: Optional_['CodeableConcept'] = Field(default=None)
    "Status of the code assignment, for example 'provisional', 'approved'."
    source: Sequence_['Reference'] = Field(default_factory=list)
    'Supporting literature.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    statusDate: Optional_['dateTime'] = Field(default=None)
    'The date at which the code status was changed as part of the terminology maintenance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceDefinition(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The detailed description of a substance, typically at a level beyond what is used for prescribing."""
    resourceType: Literal_['SubstanceDefinition'] = Field(default=...)
    'The detailed description of a substance, typically at a level beyond what is used for prescribing'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    "Textual comment about the substance's catalogue or registry record."
    name: Sequence_['SubstanceDefinitionName'] = Field(default_factory=list)
    'Names applicable to this substance.'
    grade: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The quality standard, established benchmark, to which substance complies (e.g. USP/NF, Ph. Eur, JP, BP, Company Standard).'
    status: Optional_['CodeableConcept'] = Field(default=None)
    'Status of substance within the catalogue e.g. active, retired.'
    domain: Optional_['CodeableConcept'] = Field(default=None)
    'If the substance applies to human or veterinary use.'
    moiety: Sequence_['SubstanceDefinitionMoiety'] = Field(default_factory=list)
    'Moiety, for structural modifications.'
    version: Optional_['string'] = Field(default=None)
    'A business level version identifier of the substance.'
    polymer: Optional_['Reference'] = Field(default=None)
    'Data items specific to polymers.'
    protein: Optional_['Reference'] = Field(default=None)
    'Data items specific to proteins.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    supplier: Sequence_['Reference'] = Field(default_factory=list)
    'An entity that is the source for the substance. It may be different from the manufacturer. Supplier is synonymous to a distributor.'
    property: Sequence_['SubstanceDefinitionProperty'] = Field(default_factory=list)
    'General specifications for this substance.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    structure: Optional_['SubstanceDefinitionStructure'] = Field(default=None)
    'Structural information.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier by which this substance is known.'
    description: Optional_['markdown'] = Field(default=None)
    'Textual description of the substance.'
    nucleicAcid: Optional_['Reference'] = Field(default=None)
    'Data items specific to nucleic acids.'
    manufacturer: Sequence_['Reference'] = Field(default_factory=list)
    'The entity that creates, makes, produces or fabricates the substance. This is a set of potential manufacturers but is not necessarily comprehensive.'
    relationship: Sequence_['SubstanceDefinitionRelationship'] = Field(default_factory=list)
    'A link between this substance and another, with details of the relationship.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    classification: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A high level categorization, e.g. polymer or nucleic acid, or food, chemical, biological, or a lower level such as the general types of polymer (linear or branch chain) or type of impurity (process related or contaminant).'
    sourceMaterial: Optional_['SubstanceDefinitionSourceMaterial'] = Field(default=None)
    'Material or taxonomic/anatomical source for the substance.'
    molecularWeight: Sequence_['SubstanceDefinitionMolecularWeight'] = Field(default_factory=list)
    'The average mass of a molecule of a compound compared to 1/12 the mass of carbon 12 and calculated as the sum of the atomic weights of the constituent atoms.'
    characterization: Sequence_['SubstanceDefinitionCharacterization'] = Field(default_factory=list)
    'General specifications for this substance.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    informationSource: Sequence_['Reference'] = Field(default_factory=list)
    'Supporting literature.'
    referenceInformation: Optional_['Reference'] = Field(default=None)
    'General information detailing this substance.'
    code: Sequence_['SubstanceDefinitionCode'] = Field(default_factory=list)
    'Codes associated with the substance.'


class SubstanceNucleicAcidSubunit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Subunits are listed in order of decreasing length; sequences of the same length will be ordered by molecular weight; subunits that have identical sequences will be repeated multiple times."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    sugar: Sequence_['SubstanceNucleicAcidSubunitSugar'] = Field(default_factory=list)
    '5.3.6.8.1 Sugar ID (Mandatory).'
    length: Optional_['integer'] = Field(default=None)
    'The length of the sequence shall be captured.'
    subunit: Optional_['integer'] = Field(default=None)
    'Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.'
    linkage: Sequence_['SubstanceNucleicAcidSubunitLinkage'] = Field(default_factory=list)
    'The linkages between sugar residues will also be captured.'
    sequence: Optional_['string'] = Field(default=None)
    "Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    fivePrime: Optional_['CodeableConcept'] = Field(default=None)
    "The nucleotide present at the 5’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the first position in the sequence. A separate representation would be redundant."
    threePrime: Optional_['CodeableConcept'] = Field(default=None)
    "The nucleotide present at the 3’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the last position in the sequence. A separate representation would be redundant."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    sequenceAttachment: Optional_['Attachment'] = Field(default=None)
    '(TBC).'


class SubstanceNucleicAcidSubunitLinkage(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The linkages between sugar residues will also be captured."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Each linkage will be registered as a fragment and have an ID.'
    residueSite: Optional_['string'] = Field(default=None)
    'Residues shall be captured as described in 5.3.6.8.3.'
    connectivity: Optional_['string'] = Field(default=None)
    'The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be specified.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceNucleicAcidSubunitSugar(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """5.3.6.8.1 Sugar ID (Mandatory)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'The name of the sugar or sugar-like component that make up the nucleotide.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'The Substance ID of the sugar or sugar-like component that make up the nucleotide.'
    residueSite: Optional_['string'] = Field(default=None)
    'The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5‘-3‘direction consistent with the base sequences listed above.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceNucleicAcid(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction."""
    resourceType: Literal_['SubstanceNucleicAcid'] = Field(default=...)
    'Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    subunit: Sequence_['SubstanceNucleicAcidSubunit'] = Field(default_factory=list)
    'Subunits are listed in order of decreasing length; sequences of the same length will be ordered by molecular weight; subunits that have identical sequences will be repeated multiple times.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sequenceType: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the sequence shall be specified based on a controlled vocabulary.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    numberOfSubunits: Optional_['integer'] = Field(default=None)
    'The number of linear sequences of nucleotides linked through phosphodiester bonds shall be described. Subunits would be strands of nucleic acids that are tightly associated typically through Watson-Crick base pairing. NOTE: If not specified in the reference source, the assumption is that there is 1 subunit.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    areaOfHybridisation: Optional_['string'] = Field(default=None)
    'The area of hybridisation shall be described if applicable for double stranded RNA or DNA. The number associated with the subunit followed by the number associated to the residue shall be specified in increasing order. The underscore “” shall be used as separator as follows: “Subunitnumber Residue”.'
    oligoNucleotideType: Optional_['CodeableConcept'] = Field(default=None)
    '(TBC).'


class SubstancePolymerMonomerSet(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Todo."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    ratioType: Optional_['CodeableConcept'] = Field(default=None)
    'Captures the type of ratio to the entire polymer, e.g. Monomer/Polymer ratio, SRU/Polymer Ratio.'
    startingMaterial: Sequence_['SubstancePolymerMonomerSetStartingMaterial'] = Field(default_factory=list)
    'The starting materials - monomer(s) used in the synthesis of the polymer.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstancePolymerMonomerSetStartingMaterial(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The starting materials - monomer(s) used in the synthesis of the polymer."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'The type of substance for this starting material.'
    amount: Optional_['Quantity'] = Field(default=None)
    'A percentage.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Substance high level category, e.g. chemical substance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    isDefining: Optional_['boolean'] = Field(default=None)
    'Used to specify whether the attribute described is a defining element for the unique identification of the polymer.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstancePolymerRepeat(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies and quantifies the repeated units and their configuration."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    repeatUnit: Sequence_['SubstancePolymerRepeatRepeatUnit'] = Field(default_factory=list)
    'An SRU - Structural Repeat Unit.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    repeatUnitAmountType: Optional_['CodeableConcept'] = Field(default=None)
    'How the quantitative amount of Structural Repeat Units is captured (e.g. Exact, Numeric, Average).'
    averageMolecularFormula: Optional_['string'] = Field(default=None)
    'A representation of an (average) molecular formula from a polymer.'


class SubstancePolymerRepeatRepeatUnit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An SRU - Structural Repeat Unit."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    unit: Optional_['string'] = Field(default=None)
    'Structural repeat units are essential elements for defining polymers.'
    amount: Optional_['integer'] = Field(default=None)
    'Number of repeats of this unit.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    orientation: Optional_['CodeableConcept'] = Field(default=None)
    'The orientation of the polymerisation, e.g. head-tail, head-head, random.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    degreeOfPolymerisation: Sequence_['SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisation'] = Field(default_factory=list)
    'Applies to homopolymer and block co-polymers where the degree of polymerisation within a block can be described.'
    structuralRepresentation: Sequence_['SubstancePolymerRepeatRepeatUnitStructuralRepresentation'] = Field(default_factory=list)
    'A graphical structure for this SRU.'


class SubstancePolymerRepeatRepeatUnitStructuralRepresentation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A graphical structure for this SRU."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of structure (e.g. Full, Partial, Representative).'
    format: Optional_['CodeableConcept'] = Field(default=None)
    'The format of the representation e.g. InChI, SMILES, MOLFILE, CDX, SDF, PDB, mmCIF.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    attachment: Optional_['Attachment'] = Field(default=None)
    'An attached file with the structural representation.'
    representation: Optional_['string'] = Field(default=None)
    'The structural representation as text string in a standard format e.g. InChI, SMILES, MOLFILE, CDX, SDF, PDB, mmCIF.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Applies to homopolymer and block co-polymers where the degree of polymerisation within a block can be described."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    low: Optional_['integer'] = Field(default=None)
    'A low expected limit of the amount.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the degree of polymerisation shall be described, e.g. SRU/Polymer Ratio.'
    high: Optional_['integer'] = Field(default=None)
    'A high expected limit of the amount.'
    average: Optional_['integer'] = Field(default=None)
    'An average amount of polymerisation.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstancePolymer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Properties of a substance specific to it being a polymer."""
    resourceType: Literal_['SubstancePolymer'] = Field(default=...)
    'Properties of a substance specific to it being a polymer'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    class_: Optional_['CodeableConcept'] = Field(default=None, alias='class')
    'Overall type of the polymer.'
    repeat: Sequence_['SubstancePolymerRepeat'] = Field(default_factory=list)
    'Specifies and quantifies the repeated units and their configuration.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    geometry: Optional_['CodeableConcept'] = Field(default=None)
    'Polymer geometry, e.g. linear, branched, cross-linked, network or dendritic.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'A business idenfier for this polymer, but typically this is handled by a SubstanceDefinition identifier.'
    monomerSet: Sequence_['SubstancePolymerMonomerSet'] = Field(default_factory=list)
    'Todo.'
    modification: Optional_['string'] = Field(default=None)
    'Todo - this is intended to connect to a repeating full modification structure, also used by Protein and Nucleic Acid . String is just a placeholder.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    copolymerConnectivity: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descrtibes the copolymer sequence type (polymer connectivity).'


class SubstanceProteinSubunit(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This subclause refers to the description of each subunit constituting the SubstanceProtein. A subunit is a linear sequence of amino acids linked through peptide bonds. The Subunit information shall be provided when the finished SubstanceProtein is a complex of multiple sequences; subunits are not used to delineate domains within a single sequence. Subunits are listed in order of decreasing length; sequences of the same length will be ordered by decreasing molecular weight; subunits that have identical sequences will be repeated multiple times."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    length: Optional_['integer'] = Field(default=None)
    'Length of linear sequences of amino acids contained in the subunit.'
    subunit: Optional_['integer'] = Field(default=None)
    'Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.'
    sequence: Optional_['string'] = Field(default=None)
    'The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    sequenceAttachment: Optional_['Attachment'] = Field(default=None)
    'The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.'
    nTerminalModification: Optional_['string'] = Field(default=None)
    'The name of the fragment modified at the N-terminal of the SubstanceProtein shall be specified.'
    cTerminalModification: Optional_['string'] = Field(default=None)
    'The modification at the C-terminal shall be specified.'
    nTerminalModificationId: Optional_['Identifier'] = Field(default=None)
    'Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID.'
    cTerminalModificationId: Optional_['Identifier'] = Field(default=None)
    'Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID.'


class SubstanceProtein(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators."""
    resourceType: Literal_['SubstanceProtein'] = Field(default=...)
    'A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    subunit: Sequence_['SubstanceProteinSubunit'] = Field(default_factory=list)
    'This subclause refers to the description of each subunit constituting the SubstanceProtein. A subunit is a linear sequence of amino acids linked through peptide bonds. The Subunit information shall be provided when the finished SubstanceProtein is a complex of multiple sequences; subunits are not used to delineate domains within a single sequence. Subunits are listed in order of decreasing length; sequences of the same length will be ordered by decreasing molecular weight; subunits that have identical sequences will be repeated multiple times.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sequenceType: Optional_['CodeableConcept'] = Field(default=None)
    'The SubstanceProtein descriptive elements will only be used when a complete or partial amino acid sequence is available or derivable from a nucleic acid sequence.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    numberOfSubunits: Optional_['integer'] = Field(default=None)
    'Number of linear sequences of amino acids linked through peptide bonds. The number of subunits constituting the SubstanceProtein shall be described. It is possible that the number of subunits can be variable.'
    disulfideLinkage: Sequence_['string'] = Field(default_factory=list)
    'The disulphide bond between two cysteine residues either on the same subunit or on two different subunits shall be described. The position of the disulfide bonds in the SubstanceProtein shall be listed in increasing order of subunit number and position within subunit followed by the abbreviation of the amino acids involved. The disulfide linkage positions shall actually contain the amino acid Cysteine at the respective positions.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceReferenceInformationGeneElement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Todo."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Todo.'
    source: Sequence_['Reference'] = Field(default_factory=list)
    'Todo.'
    element: Optional_['Identifier'] = Field(default=None)
    'Todo.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceReferenceInformationTarget(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Todo."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Todo.'
    target: Optional_['Identifier'] = Field(default=None)
    'Todo.'
    source: Sequence_['Reference'] = Field(default_factory=list)
    'Todo.'
    organism: Optional_['CodeableConcept'] = Field(default=None)
    'Todo.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    amountQuantity: Optional_['Quantity'] = Field(default=None)
    'Todo.'
    amountRange: Optional_['Range'] = Field(default=None)
    'Todo.'
    amountString: Optional_['string'] = Field(default=None)
    'Todo.'
    amountType: Optional_['CodeableConcept'] = Field(default=None)
    'Todo.'
    interaction: Optional_['CodeableConcept'] = Field(default=None)
    'Todo.'
    organismType: Optional_['CodeableConcept'] = Field(default=None)
    'Todo.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceReferenceInformationGene(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Todo."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    gene: Optional_['CodeableConcept'] = Field(default=None)
    'Todo.'
    source: Sequence_['Reference'] = Field(default_factory=list)
    'Todo.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    geneSequenceOrigin: Optional_['CodeableConcept'] = Field(default=None)
    'Todo.'


class SubstanceReferenceInformation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Todo."""
    resourceType: Literal_['SubstanceReferenceInformation'] = Field(default=...)
    'Todo'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    gene: Sequence_['SubstanceReferenceInformationGene'] = Field(default_factory=list)
    'Todo.'
    target: Sequence_['SubstanceReferenceInformationTarget'] = Field(default_factory=list)
    'Todo.'
    comment: Optional_['string'] = Field(default=None)
    'Todo.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    geneElement: Sequence_['SubstanceReferenceInformationGeneElement'] = Field(default_factory=list)
    'Todo.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceSourceMaterialFractionDescription(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    fraction: Optional_['string'] = Field(default=None)
    'This element is capturing information about the fraction of a plant part, or human plasma for fractionation.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    materialType: Optional_['CodeableConcept'] = Field(default=None)
    'The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceSourceMaterialPartDescription(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """To do."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    part: Optional_['CodeableConcept'] = Field(default=None)
    'Entity of anatomical origin of source material within an organism.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    partLocation: Optional_['CodeableConcept'] = Field(default=None)
    'The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceSourceMaterialOrganism(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    genus: Optional_['CodeableConcept'] = Field(default=None)
    'The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies.'
    family: Optional_['CodeableConcept'] = Field(default=None)
    'The family of an organism shall be specified.'
    author: Sequence_['SubstanceSourceMaterialOrganismAuthor'] = Field(default_factory=list)
    '4.9.13.6.1 Author type (Conditional).'
    hybrid: Optional_['SubstanceSourceMaterialOrganismHybrid'] = Field(default=None)
    '4.9.13.8.1 Hybrid species maternal organism ID (Optional).'
    species: Optional_['CodeableConcept'] = Field(default=None)
    'The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    organismGeneral: Optional_['SubstanceSourceMaterialOrganismOrganismGeneral'] = Field(default=None)
    '4.9.13.7.1 Kingdom (Conditional).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    intraspecificType: Optional_['CodeableConcept'] = Field(default=None)
    'The Intraspecific type of an organism shall be specified.'
    intraspecificDescription: Optional_['string'] = Field(default=None)
    'The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.'


class SubstanceSourceMaterialOrganismOrganismGeneral(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """4.9.13.7.1 Kingdom (Conditional)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    class_: Optional_['CodeableConcept'] = Field(default=None, alias='class')
    'The class of an organism shall be specified.'
    order: Optional_['CodeableConcept'] = Field(default=None)
    'The order of an organism shall be specified,.'
    phylum: Optional_['CodeableConcept'] = Field(default=None)
    'The phylum of an organism shall be specified.'
    kingdom: Optional_['CodeableConcept'] = Field(default=None)
    'The kingdom of an organism shall be specified.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SubstanceSourceMaterialOrganismHybrid(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """4.9.13.8.1 Hybrid species maternal organism ID (Optional)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    hybridType: Optional_['CodeableConcept'] = Field(default=None)
    'The hybrid type of an organism shall be specified.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    maternalOrganismId: Optional_['string'] = Field(default=None)
    'The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.'
    paternalOrganismId: Optional_['string'] = Field(default=None)
    'The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.'
    maternalOrganismName: Optional_['string'] = Field(default=None)
    'The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.'
    paternalOrganismName: Optional_['string'] = Field(default=None)
    'The name of the paternal species constituting the hybrid organism shall be specified.'


class SubstanceSourceMaterialOrganismAuthor(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """4.9.13.6.1 Author type (Conditional)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    authorType: Optional_['CodeableConcept'] = Field(default=None)
    'The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    authorDescription: Optional_['string'] = Field(default=None)
    'The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).'


class SubstanceSourceMaterial(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex."""
    resourceType: Literal_['SubstanceSourceMaterial'] = Field(default=...)
    'Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    organism: Optional_['SubstanceSourceMaterialOrganism'] = Field(default=None)
    'This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    organismId: Optional_['Identifier'] = Field(default=None)
    'The unique identifier associated with the source material parent organism shall be specified.'
    organismName: Optional_['string'] = Field(default=None)
    'The organism accepted Scientific name shall be provided based on the organism taxonomy.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    countryOfOrigin: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate.'
    partDescription: Sequence_['SubstanceSourceMaterialPartDescription'] = Field(default_factory=list)
    'To do.'
    developmentStage: Optional_['CodeableConcept'] = Field(default=None)
    'Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    parentSubstanceId: Sequence_['Identifier'] = Field(default_factory=list)
    'The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant).'
    sourceMaterialType: Optional_['CodeableConcept'] = Field(default=None)
    'The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent.'
    sourceMaterialClass: Optional_['CodeableConcept'] = Field(default=None)
    'General high level classification of the source material specific to the origin of the material.'
    sourceMaterialState: Optional_['CodeableConcept'] = Field(default=None)
    'The state of the source material when extracted.'
    parentSubstanceName: Sequence_['string'] = Field(default_factory=list)
    'The parent substance of the Herbal Drug, or Herbal preparation.'
    fractionDescription: Sequence_['SubstanceSourceMaterialFractionDescription'] = Field(default_factory=list)
    'Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels.'
    geographicalLocation: Sequence_['string'] = Field(default_factory=list)
    'The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.'


class SupplyDeliverySuppliedItem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The item that is being delivered or has been supplied."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    itemCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.'
    itemReference: Optional_['Reference'] = Field(default=None)
    'Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.'
    quantity: Optional_['Quantity'] = Field(default=None)
    'The amount of the item that has been supplied.  Unit of measure may be included.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SupplyDelivery(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Record of delivery of what is supplied."""
    resourceType: Literal_['SupplyDelivery'] = Field(default=...)
    'Delivery of bulk Supplies'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    type: Optional_['CodeableConcept'] = Field(default=None)
    'Indicates the type of supply being provided.  Examples include: Medication, Device, Biologically Derived Product.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular event is a component or step.'
    status: Optional_['code'] = Field(default=None)
    'A code specifying the state of the dispense event.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'A plan, proposal or order that is fulfilled in whole or in part by this event.'
    patient: Optional_['Reference'] = Field(default=None)
    'A link to a resource representing the person whom the delivered item is for.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    supplier: Optional_['Reference'] = Field(default=None)
    'The individual or organization responsible for supplying the delivery.'
    receiver: Sequence_['Reference'] = Field(default_factory=list)
    'Identifies the individual or organization that received the delivery.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier for the supply delivery event that is used to identify it across multiple disparate systems.'
    destination: Optional_['Reference'] = Field(default=None)
    'Identification of the facility/location where the delivery was shipped to.'
    suppliedItem: Sequence_['SupplyDeliverySuppliedItem'] = Field(default_factory=list)
    'The item that is being delivered or has been supplied.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'The date or time(s) the activity occurred.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'The date or time(s) the activity occurred.'
    occurrenceTiming: Optional_['Timing'] = Field(default=None)
    'The date or time(s) the activity occurred.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SupplyRequestParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specific parameters for the ordered item.  For example, the size of the indicated item."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A code or string that identifies the device detail being asserted.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the device detail.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the device detail.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the device detail.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the device detail.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class SupplyRequest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A record of a request to deliver a medication, substance or device used in the healthcare setting to a particular destination for a particular person or organization."""
    resourceType: Literal_['SupplyRequest'] = Field(default=...)
    'Request for a medication, substance or device'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    item: 'CodeableReference' = Field(default=...)
    'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.'
    status: Optional_['code'] = Field(default=None)
    'Status of the supply request.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The reason why the supply item was requested.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'Plan/proposal/order fulfilled by this request.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Optional_['CodeableConcept'] = Field(default=None)
    'Category of supply, e.g.  central, non-stock, etc. This is used to support work flows associated with the supply process.'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.'
    quantity: 'Quantity' = Field(default=...)
    'The amount that is being ordered of the indicated item.'
    supplier: Sequence_['Reference'] = Field(default_factory=list)
    'Who is intended to fulfill the request.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    parameter: Sequence_['SupplyRequestParameter'] = Field(default_factory=list)
    'Specific parameters for the ordered item.  For example, the size of the indicated item.'
    requester: Optional_['Reference'] = Field(default=None)
    'The device, practitioner, etc. who initiated the request.'
    deliverTo: Optional_['Reference'] = Field(default=None)
    'Where the supply is destined to go.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.'
    deliverFor: Optional_['Reference'] = Field(default=None)
    'The patient to whom the supply will be given or for whom they will be used.'
    authoredOn: Optional_['dateTime'] = Field(default=None)
    'When the request was made.'
    deliverFrom: Optional_['Reference'] = Field(default=None)
    'Where the supply is expected to come from.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    occurrenceDateTime: Optional_['dateTime'] = Field(default=None)
    'When the request should be fulfilled.'
    occurrencePeriod: Optional_['Period'] = Field(default=None)
    'When the request should be fulfilled.'
    occurrenceTiming: Optional_['Timing'] = Field(default=None)
    'When the request should be fulfilled.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TaskRestriction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    period: Optional_['Period'] = Field(default=None)
    'The time-period for which fulfillment is sought. This must fall within the overall time period authorized in the referenced request.  E.g. ServiceRequest.occurance[x].'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    recipient: Sequence_['Reference'] = Field(default_factory=list)
    'For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.'
    repetitions: Optional_['positiveInt'] = Field(default=None)
    'Indicates the number of times the requested action should occur.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TaskPerformer(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The entity who performed the requested task."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    actor: 'Reference' = Field(default=...)
    'The actor or entity who performed the task.'
    function: Optional_['CodeableConcept'] = Field(default=None)
    'A code or description of the performer of the task.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TaskOutput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Outputs produced by the Task."""
    type: 'CodeableConcept' = Field(default=...)
    'The name of the Output parameter.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCanonical: Optional_['canonical'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCode: Optional_['code'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDate: Optional_['date'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueId: Optional_['id'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueInstant: Optional_['instant'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueInteger64: Optional_['integer64'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueOid: Optional_['oid'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueTime: Optional_['time'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUri: Optional_['uri'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUrl: Optional_['url'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUuid: Optional_['uuid'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAddress: Optional_['Address'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAge: Optional_['Age'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAnnotation: Optional_['Annotation'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCount: Optional_['Count'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDistance: Optional_['Distance'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueHumanName: Optional_['HumanName'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueMoney: Optional_['Money'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueRatioRange: Optional_['RatioRange'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueSignature: Optional_['Signature'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueTiming: Optional_['Timing'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueExpression: Optional_['Expression'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUsageContext: Optional_['UsageContext'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAvailability: Optional_['Availability'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDosage: Optional_['Dosage'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueMeta: Optional_['Meta'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class TaskInput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional information that may be needed in the execution of the task."""
    type: 'CodeableConcept' = Field(default=...)
    'A code or description indicating how the input is intended to be used as part of the task execution.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCanonical: Optional_['canonical'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCode: Optional_['code'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDate: Optional_['date'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueId: Optional_['id'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueInstant: Optional_['instant'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueInteger64: Optional_['integer64'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueOid: Optional_['oid'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueTime: Optional_['time'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUri: Optional_['uri'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUrl: Optional_['url'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUuid: Optional_['uuid'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAddress: Optional_['Address'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAge: Optional_['Age'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAnnotation: Optional_['Annotation'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCount: Optional_['Count'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDistance: Optional_['Distance'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueHumanName: Optional_['HumanName'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueMoney: Optional_['Money'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueRatioRange: Optional_['RatioRange'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueSignature: Optional_['Signature'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueTiming: Optional_['Timing'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueExpression: Optional_['Expression'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUsageContext: Optional_['UsageContext'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAvailability: Optional_['Availability'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDosage: Optional_['Dosage'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueMeta: Optional_['Meta'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class Task(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A task to be performed."""
    resourceType: Literal_['Task'] = Field(default=...)
    'A task to be performed'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    for_: Optional_['Reference'] = Field(default=None, alias='for')
    'The entity who benefits from the performance of the service specified in the task (e.g., the patient).'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Free-text information captured about the task as it progresses.'
    focus: Optional_['Reference'] = Field(default=None)
    'The request being fulfilled or the resource being manipulated (changed, suspended, etc.) by this task.'
    owner: Optional_['Reference'] = Field(default=None)
    'Party responsible for managing task execution.'
    input: Sequence_['TaskInput'] = Field(default_factory=list)
    'Additional information that may be needed in the execution of the task.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'Task that this particular task is part of.'
    status: 'code' = Field(default=...)
    'The current status of the task.'
    intent: 'code' = Field(default=...)
    'Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.'
    reason: Sequence_['CodeableReference'] = Field(default_factory=list)
    'A description, code, or reference indicating why this task needs to be performed.'
    output: Sequence_['TaskOutput'] = Field(default_factory=list)
    'Outputs produced by the Task.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a "request" resource such as a ServiceRequest, MedicationRequest, CarePlan, etc. which is distinct from the "request" resource the task is seeking to fulfill.  This latter resource is referenced by focus.  For example, based on a CarePlan (= basedOn), a task is created to fulfill a ServiceRequest ( = focus ) to collect a specimen from a patient.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the Task should be addressed with respect to other requests.'
    location: Optional_['Reference'] = Field(default=None)
    'Principal physical location where this task is performed.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created.'
    requester: Optional_['Reference'] = Field(default=None)
    'The creator of the task.'
    performer: Sequence_['TaskPerformer'] = Field(default_factory=list)
    'The entity who performed the requested task.'
    insurance: Sequence_['Reference'] = Field(default_factory=list)
    'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'The business identifier for this task.'
    authoredOn: Optional_['dateTime'] = Field(default=None)
    'The date and time this task was created.'
    description: Optional_['string'] = Field(default=None)
    'A free-text description of what is to be performed.'
    restriction: Optional_['TaskRestriction'] = Field(default=None)
    'If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.'
    statusReason: Optional_['CodeableReference'] = Field(default=None)
    'An explanation as to why this task is held, failed, was refused, etc.'
    doNotPerform: Optional_['boolean'] = Field(default=None)
    'If true indicates that the Task is asking for the specified action to *not* occur.'
    lastModified: Optional_['dateTime'] = Field(default=None)
    'The date and time of last modification to this task.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    businessStatus: Optional_['CodeableConcept'] = Field(default=None)
    'Contains business-specific nuances of the business state.'
    instantiatesUri: Optional_['uri'] = Field(default=None)
    'The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.'
    groupIdentifier: Optional_['Identifier'] = Field(default=None)
    'A shared identifier common to multiple independent Task and Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.'
    requestedPeriod: Optional_['Period'] = Field(default=None)
    'Indicates the start and/or end of the period of time when completion of the task is desired to take place.'
    executionPeriod: Optional_['Period'] = Field(default=None)
    'Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).'
    relevantHistory: Sequence_['Reference'] = Field(default_factory=list)
    'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    requestedPerformer: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The kind of participant or specific participant that should perform the task.'
    instantiatesCanonical: Optional_['canonical'] = Field(default=None)
    'The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A name or code (or both) briefly describing what the task involves.'


class TerminologyCapabilitiesImplementation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies a specific implementation instance that is described by the terminology capability statement - i.e. a particular installation, rather than the capabilities of a software program."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: 'string' = Field(default=...)
    'Information about the specific installation that this terminology capability statement relates to.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    url: Optional_['url'] = Field(default=None)
    'An absolute base URL for the implementation.'


class TerminologyCapabilitiesValidateCode(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    translations: 'boolean' = Field(default=...)
    'Whether translations are validated.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TerminologyCapabilitiesTranslation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    needsMap: 'boolean' = Field(default=...)
    'Whether the client must identify the map.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TerminologyCapabilitiesCodeSystem(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Identifies a code system that is supported by the server. If there is a no code system URL, then this declares the general assumptions a client can make about support for any CodeSystem resource."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    uri: Optional_['canonical'] = Field(default=None)
    'Canonical identifier for the code system, represented as a URI.'
    version: Sequence_['TerminologyCapabilitiesCodeSystemVersion'] = Field(default_factory=list)
    'For the code system, a list of versions that are supported by the server.'
    content: 'code' = Field(default=...)
    'The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    subsumption: Optional_['boolean'] = Field(default=None)
    'True if subsumption is supported for this version of the code system.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TerminologyCapabilitiesCodeSystemVersion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """For the code system, a list of versions that are supported by the server."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    filter: Sequence_['TerminologyCapabilitiesCodeSystemVersionFilter'] = Field(default_factory=list)
    'Filter Properties supported.'
    language: Sequence_['code'] = Field(default_factory=list)
    'Language Displays supported.'
    property: Sequence_['code'] = Field(default_factory=list)
    'Properties supported for $lookup.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    isDefault: Optional_['boolean'] = Field(default=None)
    'If this is the default version for this code system.'
    compositional: Optional_['boolean'] = Field(default=None)
    'If the compositional grammar defined by the code system is supported.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['string'] = Field(default=None)
    'For version-less code systems, there should be a single version with no identifier.'


class TerminologyCapabilitiesCodeSystemVersionFilter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Filter Properties supported."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    op: Sequence_['code'] = Field(default=...)
    'Operations supported for the property.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'Code of the property supported.'


class TerminologyCapabilitiesExpansion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the [ValueSet/$expand](valueset-operation-expand.html) operation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    paging: Optional_['boolean'] = Field(default=None)
    'Whether the server supports paging on expansion.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    parameter: Sequence_['TerminologyCapabilitiesExpansionParameter'] = Field(default_factory=list)
    'Supported expansion parameter.'
    incomplete: Optional_['boolean'] = Field(default=None)
    'True if requests for incomplete expansions are allowed.'
    textFilter: Optional_['markdown'] = Field(default=None)
    'Documentation about text searching works.'
    hierarchical: Optional_['boolean'] = Field(default=None)
    'Whether the server can return nested value sets.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TerminologyCapabilitiesExpansionParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Supported expansion parameter."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'code' = Field(default=...)
    'Name of the supported expansion parameter.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    documentation: Optional_['string'] = Field(default=None)
    'Description of support for parameter.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TerminologyCapabilitiesSoftware(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Software that is covered by this terminology capability statement.  It is used when the statement describes the capabilities of a particular software version, independent of an installation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'Name the software is known by.'
    version: Optional_['string'] = Field(default=None)
    'The version identifier for the software covered by this statement.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TerminologyCapabilitiesClosure(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Whether the $closure operation is supported."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    translation: Optional_['boolean'] = Field(default=None)
    'If cross-system closure is supported.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TerminologyCapabilities(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."""
    resourceType: Literal_['TerminologyCapabilities'] = Field(default=...)
    'A statement of system capabilities'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: 'dateTime' = Field(default=...)
    'The date  (and optionally time) when the terminology capabilities was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes.'
    kind: 'code' = Field(default=...)
    'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the terminology capabilities.'
    status: 'code' = Field(default=...)
    'The status of this terminology capabilities. Enables tracking the life-cycle of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this terminology capabilities is needed and why it has been designed as it has.'
    closure: Optional_['TerminologyCapabilitiesClosure'] = Field(default=None)
    'Whether the $closure operation is supported.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    software: Optional_['TerminologyCapabilitiesSoftware'] = Field(default=None)
    'Software that is covered by this terminology capability statement.  It is used when the statement describes the capabilities of a particular software version, independent of an installation.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the terminology capabilities.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the terminology capabilities.'
    expansion: Optional_['TerminologyCapabilitiesExpansion'] = Field(default=None)
    'Information about the [ValueSet/$expand](valueset-operation-expand.html) operation.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this terminology capabilities when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate terminology capabilities instances.'
    lockedDate: Optional_['boolean'] = Field(default=None)
    'Whether the server supports lockedDate.'
    codeSystem: Sequence_['TerminologyCapabilitiesCodeSystem'] = Field(default_factory=list)
    'Identifies a code system that is supported by the server. If there is a no code system URL, then this declares the general assumptions a client can make about support for any CodeSystem resource.'
    codeSearch: Optional_['code'] = Field(default=None)
    'The degree to which the server supports the code search parameter on ValueSet, if it is supported.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP."
    translation: Optional_['TerminologyCapabilitiesTranslation'] = Field(default=None)
    'Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the terminology capabilities is intended to be used.'
    validateCode: Optional_['TerminologyCapabilitiesValidateCode'] = Field(default=None)
    'Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    implementation: Optional_['TerminologyCapabilitiesImplementation'] = Field(default=None)
    'Identifies a specific implementation instance that is described by the terminology capability statement - i.e. a particular installation, rather than the capabilities of a software program.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'


class TestPlanDependency(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The required criteria to execute the test plan - e.g. preconditions, previous tests..."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'A textual description of the criterium - what is needed for the dependency to be considered met.'
    predecessor: Optional_['Reference'] = Field(default=None)
    'Predecessor test plans - those that are expected to be successfully performed as a dependency for the execution of this test plan.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestPlanTestCase(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The individual test cases that are part of this plan, when they they are made explicit."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    scope: Sequence_['Reference'] = Field(default_factory=list)
    'The scope or artifact covered by the case, when the individual test case is associated with a testable artifact.'
    testRun: Sequence_['TestPlanTestCaseTestRun'] = Field(default_factory=list)
    'The actual test to be executed.'
    sequence: Optional_['integer'] = Field(default=None)
    'Sequence of test case - an ordinal number that indicates the order for the present test case in the test plan.'
    testData: Sequence_['TestPlanTestCaseTestData'] = Field(default_factory=list)
    'The test data used in the test case.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    assertion: Sequence_['TestPlanTestCaseAssertion'] = Field(default_factory=list)
    'The test assertions - the expectations of test results from the execution of the test case.'
    dependency: Sequence_['TestPlanTestCaseDependency'] = Field(default_factory=list)
    'The required criteria to execute the test case - e.g. preconditions, previous tests.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestPlanTestCaseDependency(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The required criteria to execute the test case - e.g. preconditions, previous tests."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['markdown'] = Field(default=None)
    'Description of the criteria.'
    predecessor: Optional_['Reference'] = Field(default=None)
    'Link to predecessor test plans.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestPlanTestCaseAssertion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The test assertions - the expectations of test results from the execution of the test case."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    "The test assertion type - this can be used to group assertions as 'required' or 'optional', or can be used for other classification of the assertion."
    object: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The focus or object of the assertion i.e. a resource.'
    result: Sequence_['CodeableReference'] = Field(default_factory=list)
    'The test assertion - the expected outcome from the test case execution.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestPlanTestCaseTestData(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The test data used in the test case."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'Coding' = Field(default=...)
    "The type of test data description, e.g. 'synthea'."
    content: Optional_['Reference'] = Field(default=None)
    'The actual test resources when they exist.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sourceString: Optional_['string'] = Field(default=None)
    'Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc.'
    sourceReference: Optional_['Reference'] = Field(default=None)
    'Pointer to a definition of test resources - narrative or structured e.g. synthetic data generation, etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestPlanTestCaseTestRun(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The actual test to be executed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    script: Optional_['TestPlanTestCaseTestRunScript'] = Field(default=None)
    'The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    narrative: Optional_['markdown'] = Field(default=None)
    'The narrative description of the tests.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestPlanTestCaseTestRunScript(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The test cases in a structured language e.g. gherkin, Postman, or FHIR TestScript."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    language: Optional_['CodeableConcept'] = Field(default=None)
    "The language for the test cases e.g. 'gherkin', 'testscript'."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    sourceString: Optional_['string'] = Field(default=None)
    'The actual content of the cases - references to TestScripts or externally defined content.'
    sourceReference: Optional_['Reference'] = Field(default=None)
    'The actual content of the cases - references to TestScripts or externally defined content.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestPlan(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A plan for executing testing on an artifact or specifications."""
    resourceType: Literal_['TestPlan'] = Field(default=...)
    'Description of intented testing'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this test plan when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this test plan is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test plan is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the test plan. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the test plan was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test plan changes.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the test plan.'
    scope: Sequence_['Reference'] = Field(default_factory=list)
    'What is being tested with this Test Plan - a conformance resource, or narrative criteria, or an external reference...'
    status: 'code' = Field(default=...)
    'The status of this test plan. Enables tracking the life-cycle of the content.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the test plan when it is referenced in a specification, model, design or instance.  This is an arbitrary value managed by the test plan author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this test plan is needed and why it has been designed as it has.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    category: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The category of the Test Plan - can be acceptance, unit, performance, etc.'
    testCase: Sequence_['TestPlanTestCase'] = Field(default_factory=list)
    'The individual test cases that are part of this plan, when they they are made explicit.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the test plan.'
    copyright: Optional_['markdown'] = Field(default=None)
    "A copyright statement relating to the test plan and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test plan. The short copyright declaration (e.g. (c) '2015+ xyz organization' should be sent in the copyrightLabel element."
    testTools: Optional_['markdown'] = Field(default=None)
    'A description of test tools to be used in the test plan.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this test plan when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test plan instances.'
    dependency: Sequence_['TestPlanDependency'] = Field(default_factory=list)
    'The required criteria to execute the test plan - e.g. preconditions, previous tests...'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the test plan from a consumer's perspective."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this test plan is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the test plan is intended to be used.'
    exitCriteria: Optional_['markdown'] = Field(default=None)
    'The threshold or criteria for the test plan to be considered successfully executed - narrative.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'


class TestReportParticipant(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A participant in the test execution, either the execution engine, a client, or a server."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    type: 'code' = Field(default=...)
    'The type of participant.'
    display: Optional_['string'] = Field(default=None)
    'The display name of the participant.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    uri: 'uri' = Field(default=...)
    'The uri of the participant. An absolute URL is preferred.'


class TestReportTeardown(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The results of the series of operations required to clean up after all the tests were executed (successfully or otherwise)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    action: Sequence_['TestReportTeardownAction'] = Field(default=...)
    'The teardown action will only contain an operation.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReportTeardownAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The teardown action will only contain an operation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: 'TestReportSetupActionOperation' = Field(default=...)
    'An operation would involve a REST request to a server.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReportSetup(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The results of the series of required setup operations before the tests were executed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    action: Sequence_['TestReportSetupAction'] = Field(default=...)
    'Action would contain either an operation or an assertion.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReportSetupAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Action would contain either an operation or an assertion."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    assert_: Optional_['TestReportSetupActionAssert'] = Field(default=None, alias='assert')
    'The results of the assertion performed on the previous operations.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Optional_['TestReportSetupActionOperation'] = Field(default=None)
    'The operation performed.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReportSetupActionOperation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The operation performed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    result: 'code' = Field(default=...)
    'The result of this operation.'
    detail: Optional_['uri'] = Field(default=None)
    'A link to further details on the result.'
    message: Optional_['markdown'] = Field(default=None)
    'An explanatory message associated with the result.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReportSetupActionAssert(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The results of the assertion performed on the previous operations."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    result: 'code' = Field(default=...)
    'The result of this assertion.'
    detail: Optional_['string'] = Field(default=None)
    'A link to further details on the result.'
    message: Optional_['markdown'] = Field(default=None)
    'An explanatory message associated with the result.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requirement: Sequence_['TestReportSetupActionAssertRequirement'] = Field(default_factory=list)
    'Links or references providing traceability to the testing requirements for this assert.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReportSetupActionAssertRequirement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Links or references providing traceability to the testing requirements for this assert."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    linkUri: Optional_['uri'] = Field(default=None)
    'Link or reference providing traceability to the testing requirement for this test.'
    linkCanonical: Optional_['canonical'] = Field(default=None)
    'Link or reference providing traceability to the testing requirement for this test.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReportTest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A test executed from the test script."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'The name of this test used for tracking/logging purposes by test engines.'
    action: Sequence_['TestReportTestAction'] = Field(default=...)
    'Action would contain either an operation or an assertion.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'A short description of the test used by test engines for tracking and reporting purposes.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReportTestAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Action would contain either an operation or an assertion."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    assert_: Optional_['TestReportSetupActionAssert'] = Field(default=None, alias='assert')
    'The results of the assertion performed on the previous operations.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Optional_['TestReportSetupActionOperation'] = Field(default=None)
    'An operation would involve a REST request to a server.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestReport(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A summary of information based on the results of executing a TestScript."""
    resourceType: Literal_['TestReport'] = Field(default=...)
    'Describes the results of a TestScript execution'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A free text natural language name identifying the executed TestReport.'
    test: Sequence_['TestReportTest'] = Field(default_factory=list)
    'A test executed from the test script.'
    score: Optional_['decimal'] = Field(default=None)
    'The final score (percentage of tests passed) resulting from the execution of the TestScript.'
    setup: Optional_['TestReportSetup'] = Field(default=None)
    'The results of the series of required setup operations before the tests were executed.'
    status: 'code' = Field(default=...)
    'The current state of this test report.'
    result: 'code' = Field(default=...)
    'The overall result from the execution of the TestScript.'
    tester: Optional_['string'] = Field(default=None)
    'Name of the tester producing this report (Organization or individual).'
    issued: Optional_['dateTime'] = Field(default=None)
    'When the TestScript was executed and this TestReport was generated.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    teardown: Optional_['TestReportTeardown'] = Field(default=None)
    'The results of the series of operations required to clean up after all the tests were executed (successfully or otherwise).'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    identifier: Optional_['Identifier'] = Field(default=None)
    'Identifier for the TestReport assigned for external purposes outside the context of FHIR.'
    testScript: 'canonical' = Field(default=...)
    'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.'
    participant: Sequence_['TestReportParticipant'] = Field(default_factory=list)
    'A participant in the test execution, either the execution engine, a client, or a server.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptDestination(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An abstract server used in operations within this test script in the destination element."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    index: 'integer' = Field(default=...)
    'Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.'
    profile: 'Coding' = Field(default=...)
    'The type of destination profile the test system supports.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    url: Optional_['url'] = Field(default=None)
    'The explicit url path of the destination server used in this test script.'


class TestScriptTeardown(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A series of operations required to clean up after all the tests are executed (successfully or otherwise)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    action: Sequence_['TestScriptTeardownAction'] = Field(default=...)
    'The teardown action will only contain an operation.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptTeardownAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The teardown action will only contain an operation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: 'TestScriptSetupActionOperation' = Field(default=...)
    'An operation would involve a REST request to a server.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptVariable(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Variable is set based either on element value in response body or on header field value in the response headers."""
    name: 'string' = Field(default=...)
    'Descriptive name for this variable.'
    hint: Optional_['string'] = Field(default=None)
    'Displayable text string with hint help information to the user when entering a default value.'
    path: Optional_['string'] = Field(default=None)
    'XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.'
    sourceId: Optional_['id'] = Field(default=None)
    'Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    expression: Optional_['string'] = Field(default=None)
    'The FHIRPath expression for a specific value to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.'
    description: Optional_['string'] = Field(default=None)
    'A free text natural language description of the variable and its purpose.'
    headerField: Optional_['string'] = Field(default=None)
    'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.'
    defaultValue: Optional_['string'] = Field(default=None)
    'A default, hard-coded, or user-defined value for this variable.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class TestScriptMetadata(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The required capability must exist and are assumed to function correctly on the FHIR server being tested."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    link: Sequence_['TestScriptMetadataLink'] = Field(default_factory=list)
    'A link to the FHIR specification that this test is covering.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    capability: Sequence_['TestScriptMetadataCapability'] = Field(default=...)
    'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptMetadataCapability(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Capabilities that must exist and are assumed to function correctly on the FHIR server being tested."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    link: Sequence_['uri'] = Field(default_factory=list)
    'Links to the FHIR specification that describes this interaction and the resources involved in more detail.'
    origin: Sequence_['integer'] = Field(default_factory=list)
    'Which origin server these requirements apply to.'
    required: 'boolean' = Field(default=...)
    'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    validated: 'boolean' = Field(default=...)
    'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.'
    description: Optional_['string'] = Field(default=None)
    'Description of the capabilities that this test script is requiring the server to support.'
    destination: Optional_['integer'] = Field(default=None)
    'Which server these requirements apply to.'
    capabilities: 'canonical' = Field(default=...)
    'Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptMetadataLink(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A link to the FHIR specification that this test is covering."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    url: 'uri' = Field(default=...)
    'URL to a particular requirement or feature within the FHIR specification.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'Short description of the link.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptFixture(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    resource: Optional_['Reference'] = Field(default=None)
    'Reference to the resource (containing the contents of the resource needed for operations). This is allowed to be a Parameters resource.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    autocreate: 'boolean' = Field(default=...)
    'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.'
    autodelete: 'boolean' = Field(default=...)
    'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptOrigin(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An abstract server used in operations within this test script in the origin element."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    index: 'integer' = Field(default=...)
    'Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.'
    profile: 'Coding' = Field(default=...)
    'The type of origin profile the test system supports.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    url: Optional_['url'] = Field(default=None)
    'The explicit url path of the origin server used in this test script.'


class TestScriptSetup(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A series of required setup operations before tests are executed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    action: Sequence_['TestScriptSetupAction'] = Field(default=...)
    'Action would contain either an operation or an assertion.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptSetupAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Action would contain either an operation or an assertion."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    assert_: Optional_['TestScriptSetupActionAssert'] = Field(default=None, alias='assert')
    'Evaluates the results of previous operations to determine if the server under test behaves appropriately.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Optional_['TestScriptSetupActionOperation'] = Field(default=None)
    'The operation to perform.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptSetupActionOperation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The operation to perform."""
    url: Optional_['string'] = Field(default=None)
    'Complete request URL.'
    type: Optional_['Coding'] = Field(default=None)
    'Server interaction or operation type.'
    label: Optional_['string'] = Field(default=None)
    'The label would be used for tracking/logging purposes by test engines.'
    accept: Optional_['code'] = Field(default=None)
    "The mime-type to use for RESTful operation in the 'Accept' header."
    method: Optional_['code'] = Field(default=None)
    'The HTTP method the test engine MUST use for this operation regardless of any other operation details.'
    origin: Optional_['integer'] = Field(default=None)
    'The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.'
    params: Optional_['string'] = Field(default=None)
    'Path plus parameters after [type].  Used to set parts of the request URL explicitly.'
    resource: Optional_['uri'] = Field(default=None)
    'The type of the FHIR resource. See the [resource list](resourcelist.html). Data type of uri is needed when non-HL7 artifacts are identified.'
    sourceId: Optional_['id'] = Field(default=None)
    'The id of the fixture used as the body of a PUT or POST request.'
    targetId: Optional_['id'] = Field(default=None)
    'Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    requestId: Optional_['id'] = Field(default=None)
    'The fixture id (maybe new) to map to the request.'
    responseId: Optional_['id'] = Field(default=None)
    'The fixture id (maybe new) to map to the response.'
    description: Optional_['string'] = Field(default=None)
    'The description would be used by test engines for tracking and reporting purposes.'
    contentType: Optional_['code'] = Field(default=None)
    "The mime-type to use for RESTful operation in the 'Content-Type' header."
    destination: Optional_['integer'] = Field(default=None)
    'The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.'
    requestHeader: Sequence_['TestScriptSetupActionOperationRequestHeader'] = Field(default_factory=list)
    'Header elements would be used to set HTTP headers.'
    encodeRequestUrl: 'boolean' = Field(default=...)
    'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class TestScriptSetupActionOperationRequestHeader(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Header elements would be used to set HTTP headers."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    field: 'string' = Field(default=...)
    'The HTTP header field e.g. "Accept".'
    value: 'string' = Field(default=...)
    'The value of the header e.g. "application/fhir+xml".'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptSetupActionAssert(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Evaluates the results of previous operations to determine if the server under test behaves appropriately."""
    path: Optional_['string'] = Field(default=None)
    'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.'
    label: Optional_['string'] = Field(default=None)
    'The label would be used for tracking/logging purposes by test engines.'
    value: Optional_['string'] = Field(default=None)
    'The value to compare to.'
    operator: Optional_['code'] = Field(default=None)
    'The operator type defines the conditional behavior of the assert.'
    resource: Optional_['uri'] = Field(default=None)
    'The type of the resource.  See the [resource list](resourcelist.html).'
    response: Optional_['code'] = Field(default=None)
    'continue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported.'
    sourceId: Optional_['id'] = Field(default=None)
    'Fixture to evaluate the XPath/JSONPath expression or the headerField  against.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    direction: Optional_['code'] = Field(default=None)
    'The direction to use for the assertion.'
    minimumId: Optional_['string'] = Field(default=None)
    'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.'
    expression: Optional_['string'] = Field(default=None)
    'The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.'
    requestURL: Optional_['string'] = Field(default=None)
    'The value to use in a comparison against the request URL path string.'
    description: Optional_['string'] = Field(default=None)
    'The description would be used by test engines for tracking and reporting purposes.'
    contentType: Optional_['code'] = Field(default=None)
    "The mime-type contents to compare against the request or response message 'Content-Type' header."
    headerField: Optional_['string'] = Field(default=None)
    "The HTTP header field name e.g. 'Location'."
    warningOnly: 'boolean' = Field(default=...)
    'Whether or not the test execution will produce a warning only on error for this assert.'
    requirement: Sequence_['TestScriptSetupActionAssertRequirement'] = Field(default_factory=list)
    'Links or references providing traceability to the testing requirements for this assert.'
    responseCode: Optional_['string'] = Field(default=None)
    'The value of the HTTP response code to be tested.'
    requestMethod: Optional_['code'] = Field(default=None)
    'The request method or HTTP operation code to compare against that used by the client system under test.'
    stopTestOnFail: 'boolean' = Field(default=...)
    'Whether or not the current test execution will stop on failure for this assert.'
    navigationLinks: Optional_['boolean'] = Field(default=None)
    'Whether or not the test execution performs validation on the bundle navigation links.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    compareToSourceId: Optional_['string'] = Field(default=None)
    'Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.'
    validateProfileId: Optional_['id'] = Field(default=None)
    'The ID of the Profile to validate against.'
    compareToSourcePath: Optional_['string'] = Field(default=None)
    'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.'
    defaultManualCompletion: Optional_['code'] = Field(default=None)
    'The default manual completion outcome applied to this assertion.'
    compareToSourceExpression: Optional_['string'] = Field(default=None)
    'The FHIRPath expression for a specific value to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.'
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class TestScriptSetupActionAssertRequirement(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Links or references providing traceability to the testing requirements for this assert."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    linkUri: Optional_['uri'] = Field(default=None)
    'Link or reference providing traceability to the testing requirement for this test.'
    linkCanonical: Optional_['canonical'] = Field(default=None)
    'Link or reference providing traceability to the testing requirement for this test.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptScope(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The scope indicates a conformance artifact that is tested by the test(s) within this test case and the expectation of the test outcome(s) as well as the intended test phase inclusion."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    phase: Optional_['CodeableConcept'] = Field(default=None)
    'The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data).'
    artifact: 'canonical' = Field(default=...)
    'The specific conformance artifact being tested. The canonical reference can be version-specific.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    conformance: Optional_['CodeableConcept'] = Field(default=None)
    'The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failure.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptTest(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A test in this script."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: Optional_['string'] = Field(default=None)
    'The name of this test used for tracking/logging purposes by test engines.'
    action: Sequence_['TestScriptTestAction'] = Field(default=...)
    'Action would contain either an operation or an assertion.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    description: Optional_['string'] = Field(default=None)
    'A short description of the test used by test engines for tracking and reporting purposes.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScriptTestAction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Action would contain either an operation or an assertion."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    assert_: Optional_['TestScriptSetupActionAssert'] = Field(default=None, alias='assert')
    'Evaluates the results of previous operations to determine if the server under test behaves appropriately.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    operation: Optional_['TestScriptSetupActionOperation'] = Field(default=None)
    'An operation would involve a REST request to a server.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TestScript(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification."""
    resourceType: Literal_['TestScript'] = Field(default=...)
    'Describes a set of tests'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: 'string' = Field(default=...)
    'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the test script was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.'
    test: Sequence_['TestScriptTest'] = Field(default_factory=list)
    'A test in this script.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the test script.'
    scope: Sequence_['TestScriptScope'] = Field(default_factory=list)
    'The scope indicates a conformance artifact that is tested by the test(s) within this test case and the expectation of the test outcome(s) as well as the intended test phase inclusion.'
    setup: Optional_['TestScriptSetup'] = Field(default=None)
    'A series of required setup operations before tests are executed.'
    status: 'code' = Field(default=...)
    'The status of this test script. Enables tracking the life-cycle of the content.'
    origin: Sequence_['TestScriptOrigin'] = Field(default_factory=list)
    'An abstract server used in operations within this test script in the origin element.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this test script is needed and why it has been designed as it has.'
    fixture: Sequence_['TestScriptFixture'] = Field(default_factory=list)
    'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.'
    profile: Sequence_['canonical'] = Field(default_factory=list)
    'Reference to the profile to be used for validation.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    metadata: Optional_['TestScriptMetadata'] = Field(default=None)
    'The required capability must exist and are assumed to function correctly on the FHIR server being tested.'
    variable: Sequence_['TestScriptVariable'] = Field(default_factory=list)
    'Variable is set based either on element value in response body or on header field value in the response headers.'
    teardown: Optional_['TestScriptTeardown'] = Field(default=None)
    'A series of operations required to clean up after all the tests are executed (successfully or otherwise).'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the test script.'
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the test script from a consumer's perspective."
    destination: Sequence_['TestScriptDestination'] = Field(default_factory=list)
    'An abstract server used in operations within this test script in the destination element.'
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the test script is intended to be used.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which is more current.'


class TransportRestriction(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """If the Transport.focus is a request resource and the transport is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    period: Optional_['Period'] = Field(default=None)
    'Over what time-period is fulfillment sought.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    recipient: Sequence_['Reference'] = Field(default_factory=list)
    'For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.'
    repetitions: Optional_['positiveInt'] = Field(default=None)
    'Indicates the number of times the requested action should occur.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class TransportOutput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Outputs produced by the Transport."""
    type: 'CodeableConcept' = Field(default=...)
    'The name of the Output parameter.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCanonical: Optional_['canonical'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCode: Optional_['code'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDate: Optional_['date'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueId: Optional_['id'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueInstant: Optional_['instant'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueInteger64: Optional_['integer64'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueOid: Optional_['oid'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueTime: Optional_['time'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUri: Optional_['uri'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUrl: Optional_['url'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUuid: Optional_['uuid'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAddress: Optional_['Address'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAge: Optional_['Age'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAnnotation: Optional_['Annotation'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueCount: Optional_['Count'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDistance: Optional_['Distance'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueHumanName: Optional_['HumanName'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueMoney: Optional_['Money'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueRatioRange: Optional_['RatioRange'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueSignature: Optional_['Signature'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueTiming: Optional_['Timing'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueExpression: Optional_['Expression'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueUsageContext: Optional_['UsageContext'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueAvailability: Optional_['Availability'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueDosage: Optional_['Dosage'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    valueMeta: Optional_['Meta'] = Field(default=None)
    'The value of the Output parameter as a basic type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class TransportInput(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional information that may be needed in the execution of the transport."""
    type: 'CodeableConcept' = Field(default=...)
    'A code or description indicating how the input is intended to be used as part of the transport execution.'
    valueBase64Binary: Optional_['base64Binary'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCanonical: Optional_['canonical'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCode: Optional_['code'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDate: Optional_['date'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueId: Optional_['id'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueInstant: Optional_['instant'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueInteger64: Optional_['integer64'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueMarkdown: Optional_['markdown'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueOid: Optional_['oid'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valuePositiveInt: Optional_['positiveInt'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueTime: Optional_['time'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUnsignedInt: Optional_['unsignedInt'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUri: Optional_['uri'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUrl: Optional_['url'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUuid: Optional_['uuid'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAddress: Optional_['Address'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAge: Optional_['Age'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAnnotation: Optional_['Annotation'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAttachment: Optional_['Attachment'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCodeableConcept: Optional_['CodeableConcept'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCodeableReference: Optional_['CodeableReference'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueContactPoint: Optional_['ContactPoint'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueCount: Optional_['Count'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDistance: Optional_['Distance'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDuration: Optional_['Duration'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueHumanName: Optional_['HumanName'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueIdentifier: Optional_['Identifier'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueMoney: Optional_['Money'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valuePeriod: Optional_['Period'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueQuantity: Optional_['Quantity'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueRange: Optional_['Range'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueRatio: Optional_['Ratio'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueRatioRange: Optional_['RatioRange'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueReference: Optional_['Reference'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueSampledData: Optional_['SampledData'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueSignature: Optional_['Signature'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueTiming: Optional_['Timing'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueContactDetail: Optional_['ContactDetail'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDataRequirement: Optional_['DataRequirement'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueExpression: Optional_['Expression'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueParameterDefinition: Optional_['ParameterDefinition'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueRelatedArtifact: Optional_['RelatedArtifact'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueTriggerDefinition: Optional_['TriggerDefinition'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueUsageContext: Optional_['UsageContext'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueAvailability: Optional_['Availability'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueExtendedContactDetail: Optional_['ExtendedContactDetail'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueDosage: Optional_['Dosage'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    valueMeta: Optional_['Meta'] = Field(default=None)
    'The value of the input parameter as a basic type.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'


class Transport(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Record of transport of item."""
    resourceType: Literal_['Transport'] = Field(default=...)
    'Delivery of item'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    for_: Optional_['Reference'] = Field(default=None, alias='for')
    'The entity who benefits from the performance of the service specified in the transport (e.g., the patient).'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Free-text information captured about the transport as it progresses.'
    focus: Optional_['Reference'] = Field(default=None)
    'The request being actioned or the resource being manipulated by this transport.'
    owner: Optional_['Reference'] = Field(default=None)
    'Individual organization or Device currently responsible for transport execution.'
    input: Sequence_['TransportInput'] = Field(default_factory=list)
    'Additional information that may be needed in the execution of the transport.'
    partOf: Sequence_['Reference'] = Field(default_factory=list)
    'A larger event of which this particular event is a component or step.'
    status: Optional_['code'] = Field(default=None)
    'A code specifying the state of the transport event.'
    intent: 'code' = Field(default=...)
    'Indicates the "level" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc.'
    output: Sequence_['TransportOutput'] = Field(default_factory=list)
    'Outputs produced by the Transport.'
    reason: Optional_['CodeableReference'] = Field(default=None)
    'A resource reference indicating why this transport needs to be performed.'
    basedOn: Sequence_['Reference'] = Field(default_factory=list)
    'BasedOn refers to a higher-level authorization that triggered the creation of the transport.  It references a "request" resource such as a ServiceRequest or Transport, which is distinct from the "request" resource the Transport is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a transport is created to fulfill a procedureRequest ( = FocusOn ) to transport a specimen to the lab.'
    history: Optional_['Reference'] = Field(default=None)
    'The transport event prior to this one.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    priority: Optional_['code'] = Field(default=None)
    'Indicates how quickly the Transport should be addressed with respect to other requests.'
    location: Optional_['Reference'] = Field(default=None)
    'Principal physical location where this transport is performed.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'The healthcare event  (e.g. a patient and healthcare provider interaction) during which this transport was created.'
    requester: Optional_['Reference'] = Field(default=None)
    'The creator of the transport.'
    insurance: Sequence_['Reference'] = Field(default_factory=list)
    'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Transport.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'Identifier for the transport event that is used to identify it across multiple disparate systems.'
    authoredOn: Optional_['dateTime'] = Field(default=None)
    'The date and time this transport was created.'
    description: Optional_['string'] = Field(default=None)
    'A free-text description of what is to be performed.'
    restriction: Optional_['TransportRestriction'] = Field(default=None)
    'If the Transport.focus is a request resource and the transport is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.'
    statusReason: Optional_['CodeableConcept'] = Field(default=None)
    'An explanation as to why this transport is held, failed, was refused, etc.'
    lastModified: Optional_['dateTime'] = Field(default=None)
    'The date and time of last modification to this transport.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    performerType: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The kind of participant that should perform the transport.'
    completionTime: Optional_['dateTime'] = Field(default=None)
    'Identifies the completion time of the event (the occurrence).'
    instantiatesUri: Optional_['uri'] = Field(default=None)
    'The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.'
    groupIdentifier: Optional_['Identifier'] = Field(default=None)
    'A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.'
    relevantHistory: Sequence_['Reference'] = Field(default_factory=list)
    'Links to Provenance records for past versions of this Transport that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the transport.'
    currentLocation: 'Reference' = Field(default=...)
    'The current location for the entity to be transported.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    requestedLocation: 'Reference' = Field(default=...)
    'The desired or final location for the transport.'
    instantiatesCanonical: Optional_['canonical'] = Field(default=None)
    'The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.'
    code: Optional_['CodeableConcept'] = Field(default=None)
    'A name or code (or both) briefly describing what the transport involves.'


class ValueSetExpansion(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    next: Optional_['uri'] = Field(default=None)
    'As per paging Search results, the next URLs are opaque to the client, have no dictated structure, and only the server understands them.'
    total: Optional_['integer'] = Field(default=None)
    'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.'
    offset: Optional_['integer'] = Field(default=None)
    'If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.'
    property: Sequence_['ValueSetExpansionProperty'] = Field(default_factory=list)
    'A property defines an additional slot through which additional information can be provided about a concept.'
    contains: Sequence_['ValueSetExpansionContains'] = Field(default_factory=list)
    'The codes that are contained in the value set expansion.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    timestamp: 'dateTime' = Field(default=...)
    'The time at which the expansion was produced by the expanding system.'
    parameter: Sequence_['ValueSetExpansionParameter'] = Field(default_factory=list)
    'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.'
    identifier: Optional_['uri'] = Field(default=None)
    'An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ValueSetExpansionParameter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    name: 'string' = Field(default=...)
    'Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of the parameter.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of the parameter.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of the parameter.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of the parameter.'
    valueUri: Optional_['uri'] = Field(default=None)
    'The value of the parameter.'
    valueCode: Optional_['code'] = Field(default=None)
    'The value of the parameter.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of the parameter.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ValueSetExpansionContains(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """The codes that are contained in the value set expansion."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    system: Optional_['uri'] = Field(default=None)
    'An absolute URI which is the code system in which the code for this item in the expansion is defined.'
    version: Optional_['string'] = Field(default=None)
    'The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.'
    display: Optional_['string'] = Field(default=None)
    'The recommended display for this item in the expansion.'
    abstract: Optional_['boolean'] = Field(default=None)
    'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.'
    inactive: Optional_['boolean'] = Field(default=None)
    'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether a concept is inactive (and it may depend on the context of use).'
    property: Sequence_['ValueSetExpansionContainsProperty'] = Field(default_factory=list)
    'A property value for this concept.'
    contains: Sequence_['ValueSetExpansionContains'] = Field(default_factory=list)
    'Other codes and entries contained under this entry in the hierarchy.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    designation: Sequence_['ValueSetComposeIncludeConceptDesignation'] = Field(default_factory=list)
    'Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: Optional_['code'] = Field(default=None)
    'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.'


class ValueSetExpansionContainsProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A property value for this concept."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueCode: Optional_['code'] = Field(default=None)
    'The value of this property.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The value of this property.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of this property.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of this property.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of this property.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of this property.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of this property.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    subProperty: Sequence_['ValueSetExpansionContainsPropertySubProperty'] = Field(default_factory=list)
    'A subproperty value for this concept.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'A code that is a reference to ValueSet.expansion.property.code.'


class ValueSetExpansionContainsPropertySubProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A subproperty value for this concept."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    valueCode: Optional_['code'] = Field(default=None)
    'The value of this subproperty.'
    valueCoding: Optional_['Coding'] = Field(default=None)
    'The value of this subproperty.'
    valueString: Optional_['string'] = Field(default=None)
    'The value of this subproperty.'
    valueInteger: Optional_['integer'] = Field(default=None)
    'The value of this subproperty.'
    valueBoolean: Optional_['boolean'] = Field(default=None)
    'The value of this subproperty.'
    valueDateTime: Optional_['dateTime'] = Field(default=None)
    'The value of this subproperty.'
    valueDecimal: Optional_['decimal'] = Field(default=None)
    'The value of this subproperty.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'A code that is a reference to ValueSet.expansion.property.code.'


class ValueSetExpansionProperty(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A property defines an additional slot through which additional information can be provided about a concept."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    uri: Optional_['uri'] = Field(default=None)
    'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.'
    code: 'code' = Field(default=...)
    'A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.'


class ValueSetCompose(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    include: Sequence_['ValueSetComposeInclude'] = Field(default=...)
    'Include one or more codes from a code system or other value set(s).'
    exclude: Sequence_['ValueSetComposeInclude'] = Field(default_factory=list)
    'Exclude one or more codes from the value set based on code system filters and/or other value sets.'
    inactive: Optional_['boolean'] = Field(default=None)
    'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).'
    property: Sequence_['string'] = Field(default_factory=list)
    "A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server."
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    lockedDate: Optional_['date'] = Field(default=None)
    'The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ValueSetComposeInclude(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Include one or more codes from a code system or other value set(s)."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    system: Optional_['uri'] = Field(default=None)
    'An absolute URI which is the code system from which the selected codes come from.'
    filter: Sequence_['ValueSetComposeIncludeFilter'] = Field(default_factory=list)
    'Select concepts by specifying a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified within the include, they SHALL all be true.'
    version: Optional_['string'] = Field(default=None)
    "The version of the code system that the codes are selected from, or the special version '*' for all versions."
    concept: Sequence_['ValueSetComposeIncludeConcept'] = Field(default_factory=list)
    'Specifies a concept to be included or excluded.'
    valueSet: Sequence_['canonical'] = Field(default_factory=list)
    'Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the intersection of the contents of all of the referenced value sets.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    copyright: Optional_['string'] = Field(default=None)
    "A copyright statement for the specific code system asserted by the containing ValueSet.compose.include element's system value (if the associated ValueSet.compose.include.version element is not present); or the code system and version combination (if the associated ValueSet.compose.include.version element is present)."
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ValueSetComposeIncludeConcept(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Specifies a concept to be included or excluded."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    display: Optional_['string'] = Field(default=None)
    'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    designation: Sequence_['ValueSetComposeIncludeConceptDesignation'] = Field(default_factory=list)
    'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    code: 'code' = Field(default=...)
    'Specifies a code for the concept to be included or excluded.'


class ValueSetComposeIncludeConceptDesignation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    use: Optional_['Coding'] = Field(default=None)
    'A code that represents types of uses of designations.'
    value: 'string' = Field(default=...)
    'The text value for this designation.'
    language: Optional_['code'] = Field(default=None)
    'The language this designation is defined for.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    additionalUse: Sequence_['Coding'] = Field(default_factory=list)
    'Additional codes that detail how this designation would be used, if there is more than one use.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ValueSetComposeIncludeFilter(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Select concepts by specifying a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified within the include, they SHALL all be true."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    op: 'code' = Field(default=...)
    'The kind of operation to perform as a part of the filter criteria.'
    value: 'string' = Field(default=...)
    "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'."
    property: 'code' = Field(default=...)
    'A code that identifies a property or a filter defined in the code system.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class ValueSetScope(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Description of the semantic space the Value Set Expansion is intended to cover and should further clarify the text in ValueSet.description."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    inclusionCriteria: Optional_['string'] = Field(default=None)
    'Criteria describing which concepts or codes should be included and why.'
    exclusionCriteria: Optional_['string'] = Field(default=None)
    'Criteria describing which concepts or codes should be excluded and why.'


class ValueSet(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html)."""
    resourceType: Literal_['ValueSet'] = Field(default=...)
    'A set of codes drawn from one or more code systems'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    url: Optional_['uri'] = Field(default=None)
    'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    name: Optional_['string'] = Field(default=None)
    'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.'
    title: Optional_['string'] = Field(default=None)
    'A short, descriptive, user-friendly title for the value set.'
    topic: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Descriptions related to the content of the ValueSet. Topics provide a high-level categorization as well as keywords for the ValueSet that can be useful for filtering and searching.'
    scope: Optional_['ValueSetScope'] = Field(default=None)
    'Description of the semantic space the Value Set Expansion is intended to cover and should further clarify the text in ValueSet.description.'
    status: 'code' = Field(default=...)
    'The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.'
    author: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individiual or organization primarily involved in the creation and maintenance of the ValueSet.'
    editor: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization primarily responsible for internal coherence of the ValueSet.'
    version: Optional_['string'] = Field(default=None)
    'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.'
    contact: Sequence_['ContactDetail'] = Field(default_factory=list)
    'Contact details to assist a user in finding and communicating with the publisher.'
    purpose: Optional_['markdown'] = Field(default=None)
    'Explanation of why this value set is needed and why it has been designed as it has.'
    compose: Optional_['ValueSetCompose'] = Field(default=None)
    'A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    reviewer: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the ValueSet.'
    endorser: Sequence_['ContactDetail'] = Field(default_factory=list)
    'An individual or organization asserted by the publisher to be responsible for officially endorsing the ValueSet for use in some setting.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    publisher: Optional_['string'] = Field(default=None)
    'The name of the organization or individual responsible for the release and ongoing maintenance of the value set.'
    immutable: Optional_['boolean'] = Field(default=None)
    "If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change."
    copyright: Optional_['markdown'] = Field(default=None)
    'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.'
    expansion: Optional_['ValueSetExpansion'] = Field(default=None)
    'A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.'
    useContext: Sequence_['UsageContext'] = Field(default_factory=list)
    'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.'
    description: Optional_['markdown'] = Field(default=None)
    "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set."
    experimental: Optional_['boolean'] = Field(default=None)
    'A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.'
    jurisdiction: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'A legal or geographic region in which the value set is intended to be used.'
    approvalDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    copyrightLabel: Optional_['string'] = Field(default=None)
    "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')."
    lastReviewDate: Optional_['date'] = Field(default=None)
    'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.'
    effectivePeriod: Optional_['Period'] = Field(default=None)
    'The period during which the ValueSet content was or is planned to be in active use.'
    relatedArtifact: Sequence_['RelatedArtifact'] = Field(default_factory=list)
    'Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    versionAlgorithmString: Optional_['string'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which ValueSet is more current.'
    versionAlgorithmCoding: Optional_['Coding'] = Field(default=None)
    'Indicates the mechanism used to compare versions to determine which ValueSet is more current.'
    date: Optional_['dateTime'] = Field(default=None)
    'The date (and optionally time) when the value set metadata or content logical definition (.compose) was created or revised.'


class VerificationResultPrimarySource(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the primary source(s) involved in validation."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    who: Optional_['Reference'] = Field(default=None)
    'Reference to the primary source.'
    type: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    validationDate: Optional_['dateTime'] = Field(default=None)
    'When the target was validated against the primary source.'
    canPushUpdates: Optional_['CodeableConcept'] = Field(default=None)
    'Ability of the primary source to push updates/alerts (yes; no; undetermined).'
    validationStatus: Optional_['CodeableConcept'] = Field(default=None)
    'Status of the validation of the target against the primary source (successful; failed; unknown).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    pushTypeAvailable: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).'
    communicationMethod: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'Method for communicating with the primary source (manual; API; Push).'


class VerificationResultAttestation(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the entity attesting to information."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    who: Optional_['Reference'] = Field(default=None)
    'The individual or organization attesting to information.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    onBehalfOf: Optional_['Reference'] = Field(default=None)
    'When the who is asserting on behalf of another (organization or individual).'
    proxySignature: Optional_['Signature'] = Field(default=None)
    'Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.'
    sourceSignature: Optional_['Signature'] = Field(default=None)
    'Signed assertion by the attestation source that they have attested to the information.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    communicationMethod: Optional_['CodeableConcept'] = Field(default=None)
    'The method by which attested information was submitted/retrieved (manual; API; Push).'
    proxyIdentityCertificate: Optional_['string'] = Field(default=None)
    'A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.'
    sourceIdentityCertificate: Optional_['string'] = Field(default=None)
    'A digital identity certificate associated with the attestation source.'
    date: Optional_['date'] = Field(default=None)
    'The date the information was attested to.'


class VerificationResultValidator(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Information about the entity validating information."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    organization: 'Reference' = Field(default=...)
    'Reference to the organization validating information.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    identityCertificate: Optional_['string'] = Field(default=None)
    'A digital identity certificate associated with the validator.'
    attestationSignature: Optional_['Signature'] = Field(default=None)
    'Signed assertion by the validator that they have validated the information.'


class VerificationResult(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Describes validation requirements, source(s), status and dates for one or more elements."""
    resourceType: Literal_['VerificationResult'] = Field(default=...)
    'Describes validation requirements, source(s), status and dates for one or more elements'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    need: Optional_['CodeableConcept'] = Field(default=None)
    'The frequency with which the target must be validated (none; initial; periodic).'
    target: Sequence_['Reference'] = Field(default_factory=list)
    'A resource that was validated.'
    status: 'code' = Field(default=...)
    'The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    frequency: Optional_['Timing'] = Field(default=None)
    'Frequency of revalidation.'
    validator: Sequence_['VerificationResultValidator'] = Field(default_factory=list)
    'Information about the entity validating information.'
    statusDate: Optional_['dateTime'] = Field(default=None)
    'When the validation status was updated.'
    attestation: Optional_['VerificationResultAttestation'] = Field(default=None)
    'Information about the entity attesting to information.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    lastPerformed: Optional_['dateTime'] = Field(default=None)
    'The date/time validation was last completed (including failed validations).'
    nextScheduled: Optional_['date'] = Field(default=None)
    'The date when target is next validated, if appropriate.'
    failureAction: Optional_['CodeableConcept'] = Field(default=None)
    'The result if validation fails (fatal; warning; record only; none).'
    primarySource: Sequence_['VerificationResultPrimarySource'] = Field(default_factory=list)
    'Information about the primary source(s) involved in validation.'
    targetLocation: Sequence_['string'] = Field(default_factory=list)
    'The fhirpath location(s) within the resource that was validated.'
    validationType: Optional_['CodeableConcept'] = Field(default=None)
    'What the target is validated against (nothing; primary source; multiple sources).'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    validationProcess: Sequence_['CodeableConcept'] = Field(default_factory=list)
    'The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).'


class VisionPrescriptionLensSpecification(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    eye: 'code' = Field(default=...)
    'The eye for which the lens specification applies.'
    add: Optional_['decimal'] = Field(default=None)
    'Power adjustment for multifocal lenses measured in dioptres (0.25 units).'
    axis: Optional_['integer'] = Field(default=None)
    'Adjustment for astigmatism measured in integer degrees.'
    note: Sequence_['Annotation'] = Field(default_factory=list)
    'Notes for special requirements such as coatings and lens materials.'
    prism: Sequence_['VisionPrescriptionLensSpecificationPrism'] = Field(default_factory=list)
    'Allows for adjustment on two axis.'
    power: Optional_['decimal'] = Field(default=None)
    'Contact lens power measured in dioptres (0.25 units).'
    color: Optional_['string'] = Field(default=None)
    'Special color or pattern.'
    brand: Optional_['string'] = Field(default=None)
    'Brand recommendations or restrictions.'
    sphere: Optional_['decimal'] = Field(default=None)
    'Lens power measured in dioptres (0.25 units).'
    product: 'CodeableConcept' = Field(default=...)
    'Identifies the type of vision correction product which is required for the patient.'
    cylinder: Optional_['decimal'] = Field(default=None)
    'Power adjustment for astigmatism measured in dioptres (0.25 units).'
    diameter: Optional_['decimal'] = Field(default=None)
    'Contact lens diameter measured in millimetres.'
    duration: Optional_['Quantity'] = Field(default=None)
    'The recommended maximum wear period for the lens.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    backCurve: Optional_['decimal'] = Field(default=None)
    'Back curvature measured in millimetres.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class VisionPrescriptionLensSpecificationPrism(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """Allows for adjustment on two axis."""
    id: Optional_['str'] = Field(default=None)
    'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.'
    base: 'code' = Field(default=...)
    'The relative base, or reference lens edge, for the prism.'
    amount: 'decimal' = Field(default=...)
    'Amount of prism to compensate for eye alignment in fractional units.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."


class VisionPrescription(BaseModel, extra=Extra.ignore, validate_assignment=True):
    """An authorization for the provision of glasses and/or contact lenses to a patient."""
    resourceType: Literal_['VisionPrescription'] = Field(default=...)
    'Prescription for vision correction products for a patient'
    id: Optional_['str'] = Field(default=None)
    'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.'
    meta: Optional_['Meta'] = Field(default=None)
    'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.'
    text: Optional_['Narrative'] = Field(default=None)
    'A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.'
    status: 'code' = Field(default=...)
    'The status of the resource instance.'
    created: 'dateTime' = Field(default=...)
    'The date this resource was created.'
    patient: 'Reference' = Field(default=...)
    'A resource reference to the person to whom the vision prescription applies.'
    language: Optional_['code'] = Field(default=None)
    'The base language in which the resource is written.'
    contained: Sequence_['AnyResource'] = Field(default_factory=list)
    'These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.'
    extension: Sequence_['Extension'] = Field(default_factory=list)
    'May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.'
    encounter: Optional_['Reference'] = Field(default=None)
    'A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.'
    identifier: Sequence_['Identifier'] = Field(default_factory=list)
    'A unique identifier assigned to this vision prescription.'
    prescriber: 'Reference' = Field(default=...)
    'The healthcare professional responsible for authorizing the prescription.'
    dateWritten: 'dateTime' = Field(default=...)
    'The date (and perhaps time) when the prescription was written.'
    implicitRules: Optional_['uri'] = Field(default=None)
    'A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.'
    modifierExtension: Sequence_['Extension'] = Field(default_factory=list)
    "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
    lensSpecification: Sequence_['VisionPrescriptionLensSpecification'] = Field(default=...)
    'Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals.'


AnyResource = Annotated_[Account | ActivityDefinition | ActorDefinition | AdministrableProductDefinition | AdverseEvent | AllergyIntolerance | Appointment | AppointmentResponse | ArtifactAssessment | AuditEvent | Basic | Binary | BiologicallyDerivedProduct | BiologicallyDerivedProductDispense | BodyStructure | Bundle | CapabilityStatement | CarePlan | CareTeam | ChargeItem | ChargeItemDefinition | Citation | Claim | ClaimResponse | ClinicalImpression | ClinicalUseDefinition | CodeSystem | Communication | CommunicationRequest | CompartmentDefinition | Composition | ConceptMap | Condition | ConditionDefinition | Consent | Contract | Coverage | CoverageEligibilityRequest | CoverageEligibilityResponse | DetectedIssue | Device | DeviceAssociation | DeviceDefinition | DeviceDispense | DeviceMetric | DeviceRequest | DeviceUsage | DiagnosticReport | DocumentReference | Encounter | EncounterHistory | Endpoint | EnrollmentRequest | EnrollmentResponse | EpisodeOfCare | EventDefinition | Evidence | EvidenceReport | EvidenceVariable | ExampleScenario | ExplanationOfBenefit | FamilyMemberHistory | Flag | FormularyItem | GenomicStudy | Goal | GraphDefinition | Group | GuidanceResponse | HealthcareService | ImagingSelection | ImagingStudy | Immunization | ImmunizationEvaluation | ImmunizationRecommendation | ImplementationGuide | Ingredient | InsurancePlan | InventoryItem | InventoryReport | Invoice | Library | Linkage | List | Location | ManufacturedItemDefinition | Measure | MeasureReport | Medication | MedicationAdministration | MedicationDispense | MedicationKnowledge | MedicationRequest | MedicationStatement | MedicinalProductDefinition | MessageDefinition | MessageHeader | MolecularSequence | NamingSystem | NutritionIntake | NutritionOrder | NutritionProduct | Observation | ObservationDefinition | OperationDefinition | OperationOutcome | Organization | OrganizationAffiliation | PackagedProductDefinition | Parameters | Patient | PaymentNotice | PaymentReconciliation | Permission | Person | PlanDefinition | Practitioner | PractitionerRole | Procedure | Provenance | Questionnaire | QuestionnaireResponse | RegulatedAuthorization | RelatedPerson | RequestOrchestration | Requirements | ResearchStudy | ResearchSubject | RiskAssessment | Schedule | SearchParameter | ServiceRequest | Slot | Specimen | SpecimenDefinition | StructureDefinition | StructureMap | Subscription | SubscriptionStatus | SubscriptionTopic | Substance | SubstanceDefinition | SubstanceNucleicAcid | SubstancePolymer | SubstanceProtein | SubstanceReferenceInformation | SubstanceSourceMaterial | SupplyDelivery | SupplyRequest | Task | TerminologyCapabilities | TestPlan | TestReport | TestScript | Transport | ValueSet | VerificationResult | VisionPrescription, Field(..., discriminator='resourceType')]


Element.update_forward_refs()


BackboneElement.update_forward_refs()


Address.update_forward_refs()


Age.update_forward_refs()


Annotation.update_forward_refs()


Attachment.update_forward_refs()


AvailabilityNotAvailableTime.update_forward_refs()


AvailabilityAvailableTime.update_forward_refs()


Availability.update_forward_refs()


BackboneType.update_forward_refs()


Base.update_forward_refs()


CodeableConcept.update_forward_refs()


CodeableReference.update_forward_refs()


Coding.update_forward_refs()


ContactDetail.update_forward_refs()


ContactPoint.update_forward_refs()


Contributor.update_forward_refs()


Count.update_forward_refs()


DataRequirementValueFilter.update_forward_refs()


DataRequirementDateFilter.update_forward_refs()


DataRequirementCodeFilter.update_forward_refs()


DataRequirementSort.update_forward_refs()


DataRequirement.update_forward_refs()


DataType.update_forward_refs()


Distance.update_forward_refs()


DosageDoseAndRate.update_forward_refs()


Dosage.update_forward_refs()


Duration.update_forward_refs()


ElementDefinitionConstraint.update_forward_refs()


ElementDefinitionMapping.update_forward_refs()


ElementDefinitionBinding.update_forward_refs()


ElementDefinitionBindingAdditional.update_forward_refs()


ElementDefinitionExample.update_forward_refs()


ElementDefinitionSlicing.update_forward_refs()


ElementDefinitionSlicingDiscriminator.update_forward_refs()


ElementDefinitionType.update_forward_refs()


ElementDefinitionBase.update_forward_refs()


ElementDefinition.update_forward_refs()


Expression.update_forward_refs()


ExtendedContactDetail.update_forward_refs()


Extension.update_forward_refs()


HumanName.update_forward_refs()


Identifier.update_forward_refs()


MarketingStatus.update_forward_refs()


Meta.update_forward_refs()


MonetaryComponent.update_forward_refs()


Money.update_forward_refs()


Narrative.update_forward_refs()


ParameterDefinition.update_forward_refs()


Period.update_forward_refs()


PrimitiveType.update_forward_refs()


ProductShelfLife.update_forward_refs()


Quantity.update_forward_refs()


Range.update_forward_refs()


Ratio.update_forward_refs()


RatioRange.update_forward_refs()


Reference.update_forward_refs()


RelatedArtifact.update_forward_refs()


SampledData.update_forward_refs()


Signature.update_forward_refs()


TimingRepeat.update_forward_refs()


Timing.update_forward_refs()


TriggerDefinition.update_forward_refs()


UsageContext.update_forward_refs()


VirtualServiceDetail.update_forward_refs()


MoneyQuantity.update_forward_refs()


SimpleQuantity.update_forward_refs()


Resource.update_forward_refs()


AccountRelatedAccount.update_forward_refs()


AccountProcedure.update_forward_refs()


AccountDiagnosis.update_forward_refs()


AccountGuarantor.update_forward_refs()


AccountCoverage.update_forward_refs()


AccountBalance.update_forward_refs()


Account.update_forward_refs()


ActivityDefinitionDynamicValue.update_forward_refs()


ActivityDefinitionParticipant.update_forward_refs()


ActivityDefinition.update_forward_refs()


ActorDefinition.update_forward_refs()


AdministrableProductDefinitionRouteOfAdministration.update_forward_refs()


AdministrableProductDefinitionRouteOfAdministrationTargetSpecies.update_forward_refs()


AdministrableProductDefinitionRouteOfAdministrationTargetSpeciesWithdrawalPeriod.update_forward_refs()


AdministrableProductDefinitionProperty.update_forward_refs()


AdministrableProductDefinition.update_forward_refs()


AdverseEventContributingFactor.update_forward_refs()


AdverseEventMitigatingAction.update_forward_refs()


AdverseEventPreventiveAction.update_forward_refs()


AdverseEventSupportingInfo.update_forward_refs()


AdverseEventSuspectEntity.update_forward_refs()


AdverseEventSuspectEntityCausality.update_forward_refs()


AdverseEventParticipant.update_forward_refs()


AdverseEvent.update_forward_refs()


AllergyIntoleranceParticipant.update_forward_refs()


AllergyIntoleranceReaction.update_forward_refs()


AllergyIntolerance.update_forward_refs()


AppointmentRecurrenceTemplate.update_forward_refs()


AppointmentRecurrenceTemplateMonthlyTemplate.update_forward_refs()


AppointmentRecurrenceTemplateYearlyTemplate.update_forward_refs()


AppointmentRecurrenceTemplateWeeklyTemplate.update_forward_refs()


AppointmentParticipant.update_forward_refs()


Appointment.update_forward_refs()


AppointmentResponse.update_forward_refs()


ArtifactAssessmentContent.update_forward_refs()


ArtifactAssessment.update_forward_refs()


AuditEventOutcome.update_forward_refs()


AuditEventEntity.update_forward_refs()


AuditEventEntityDetail.update_forward_refs()


AuditEventSource.update_forward_refs()


AuditEventAgent.update_forward_refs()


AuditEvent.update_forward_refs()


Basic.update_forward_refs()


Binary.update_forward_refs()


BiologicallyDerivedProductCollection.update_forward_refs()


BiologicallyDerivedProductProperty.update_forward_refs()


BiologicallyDerivedProduct.update_forward_refs()


BiologicallyDerivedProductDispensePerformer.update_forward_refs()


BiologicallyDerivedProductDispense.update_forward_refs()


BodyStructureIncludedStructure.update_forward_refs()


BodyStructureIncludedStructureBodyLandmarkOrientation.update_forward_refs()


BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmark.update_forward_refs()


BodyStructure.update_forward_refs()


BundleEntry.update_forward_refs()


BundleEntryResponse.update_forward_refs()


BundleEntryRequest.update_forward_refs()


BundleEntrySearch.update_forward_refs()


BundleLink.update_forward_refs()


Bundle.update_forward_refs()


CanonicalResource.update_forward_refs()


CapabilityStatementImplementation.update_forward_refs()


CapabilityStatementMessaging.update_forward_refs()


CapabilityStatementMessagingSupportedMessage.update_forward_refs()


CapabilityStatementMessagingEndpoint.update_forward_refs()


CapabilityStatementDocument.update_forward_refs()


CapabilityStatementSoftware.update_forward_refs()


CapabilityStatementRest.update_forward_refs()


CapabilityStatementRestInteraction.update_forward_refs()


CapabilityStatementRestResource.update_forward_refs()


CapabilityStatementRestResourceSearchParam.update_forward_refs()


CapabilityStatementRestResourceInteraction.update_forward_refs()


CapabilityStatementRestResourceOperation.update_forward_refs()


CapabilityStatementRestSecurity.update_forward_refs()


CapabilityStatement.update_forward_refs()


CarePlanActivity.update_forward_refs()


CarePlan.update_forward_refs()


CareTeamParticipant.update_forward_refs()


CareTeam.update_forward_refs()


ChargeItemPerformer.update_forward_refs()


ChargeItem.update_forward_refs()


ChargeItemDefinitionPropertyGroup.update_forward_refs()


ChargeItemDefinitionApplicability.update_forward_refs()


ChargeItemDefinition.update_forward_refs()


CitationClassification.update_forward_refs()


CitationCitedArtifact.update_forward_refs()


CitationCitedArtifactContributorship.update_forward_refs()


CitationCitedArtifactContributorshipSummary.update_forward_refs()


CitationCitedArtifactContributorshipEntry.update_forward_refs()


CitationCitedArtifactContributorshipEntryContributionInstance.update_forward_refs()


CitationCitedArtifactPublicationForm.update_forward_refs()


CitationCitedArtifactPublicationFormPublishedIn.update_forward_refs()


CitationCitedArtifactClassification.update_forward_refs()


CitationCitedArtifactWebLocation.update_forward_refs()


CitationCitedArtifactStatusDate.update_forward_refs()


CitationCitedArtifactRelatesTo.update_forward_refs()


CitationCitedArtifactAbstract.update_forward_refs()


CitationCitedArtifactVersion.update_forward_refs()


CitationCitedArtifactTitle.update_forward_refs()


CitationCitedArtifactPart.update_forward_refs()


CitationStatusDate.update_forward_refs()


CitationSummary.update_forward_refs()


Citation.update_forward_refs()


ClaimSupportingInfo.update_forward_refs()


ClaimInsurance.update_forward_refs()


ClaimProcedure.update_forward_refs()


ClaimDiagnosis.update_forward_refs()


ClaimAccident.update_forward_refs()


ClaimCareTeam.update_forward_refs()


ClaimRelated.update_forward_refs()


ClaimEvent.update_forward_refs()


ClaimPayee.update_forward_refs()


ClaimItem.update_forward_refs()


ClaimItemBodySite.update_forward_refs()


ClaimItemDetail.update_forward_refs()


ClaimItemDetailSubDetail.update_forward_refs()


Claim.update_forward_refs()


ClaimResponseProcessNote.update_forward_refs()


ClaimResponseInsurance.update_forward_refs()


ClaimResponsePayment.update_forward_refs()


ClaimResponseAddItem.update_forward_refs()


ClaimResponseAddItemBodySite.update_forward_refs()


ClaimResponseAddItemDetail.update_forward_refs()


ClaimResponseAddItemDetailSubDetail.update_forward_refs()


ClaimResponseError.update_forward_refs()


ClaimResponseTotal.update_forward_refs()


ClaimResponseEvent.update_forward_refs()


ClaimResponseItem.update_forward_refs()


ClaimResponseItemReviewOutcome.update_forward_refs()


ClaimResponseItemAdjudication.update_forward_refs()


ClaimResponseItemDetail.update_forward_refs()


ClaimResponseItemDetailSubDetail.update_forward_refs()


ClaimResponse.update_forward_refs()


ClinicalImpressionFinding.update_forward_refs()


ClinicalImpression.update_forward_refs()


ClinicalUseDefinitionUndesirableEffect.update_forward_refs()


ClinicalUseDefinitionContraindication.update_forward_refs()


ClinicalUseDefinitionContraindicationOtherTherapy.update_forward_refs()


ClinicalUseDefinitionInteraction.update_forward_refs()


ClinicalUseDefinitionInteractionInteractant.update_forward_refs()


ClinicalUseDefinitionIndication.update_forward_refs()


ClinicalUseDefinitionWarning.update_forward_refs()


ClinicalUseDefinition.update_forward_refs()


CodeSystemProperty.update_forward_refs()


CodeSystemConcept.update_forward_refs()


CodeSystemConceptDesignation.update_forward_refs()


CodeSystemConceptProperty.update_forward_refs()


CodeSystemFilter.update_forward_refs()


CodeSystem.update_forward_refs()


CommunicationPayload.update_forward_refs()


Communication.update_forward_refs()


CommunicationRequestPayload.update_forward_refs()


CommunicationRequest.update_forward_refs()


CompartmentDefinitionResource.update_forward_refs()


CompartmentDefinition.update_forward_refs()


CompositionAttester.update_forward_refs()


CompositionSection.update_forward_refs()


CompositionEvent.update_forward_refs()


Composition.update_forward_refs()


ConceptMapAdditionalAttribute.update_forward_refs()


ConceptMapProperty.update_forward_refs()


ConceptMapGroup.update_forward_refs()


ConceptMapGroupUnmapped.update_forward_refs()


ConceptMapGroupElement.update_forward_refs()


ConceptMapGroupElementTarget.update_forward_refs()


ConceptMapGroupElementTargetDependsOn.update_forward_refs()


ConceptMapGroupElementTargetProperty.update_forward_refs()


ConceptMap.update_forward_refs()


ConditionParticipant.update_forward_refs()


ConditionStage.update_forward_refs()


Condition.update_forward_refs()


ConditionDefinitionQuestionnaire.update_forward_refs()


ConditionDefinitionPrecondition.update_forward_refs()


ConditionDefinitionObservation.update_forward_refs()


ConditionDefinitionMedication.update_forward_refs()


ConditionDefinitionPlan.update_forward_refs()


ConditionDefinition.update_forward_refs()


ConsentVerification.update_forward_refs()


ConsentPolicyBasis.update_forward_refs()


ConsentProvision.update_forward_refs()


ConsentProvisionActor.update_forward_refs()


ConsentProvisionData.update_forward_refs()


Consent.update_forward_refs()


ContractContentDefinition.update_forward_refs()


ContractFriendly.update_forward_refs()


ContractSigner.update_forward_refs()


ContractLegal.update_forward_refs()


ContractRule.update_forward_refs()


ContractTerm.update_forward_refs()


ContractTermSecurityLabel.update_forward_refs()


ContractTermAction.update_forward_refs()


ContractTermActionSubject.update_forward_refs()


ContractTermAsset.update_forward_refs()


ContractTermAssetValuedItem.update_forward_refs()


ContractTermAssetContext.update_forward_refs()


ContractTermOffer.update_forward_refs()


ContractTermOfferAnswer.update_forward_refs()


ContractTermOfferParty.update_forward_refs()


Contract.update_forward_refs()


CoverageCostToBeneficiary.update_forward_refs()


CoverageCostToBeneficiaryException.update_forward_refs()


CoveragePaymentBy.update_forward_refs()


CoverageClass.update_forward_refs()


Coverage.update_forward_refs()


CoverageEligibilityRequestSupportingInfo.update_forward_refs()


CoverageEligibilityRequestInsurance.update_forward_refs()


CoverageEligibilityRequestEvent.update_forward_refs()


CoverageEligibilityRequestItem.update_forward_refs()


CoverageEligibilityRequestItemDiagnosis.update_forward_refs()


CoverageEligibilityRequest.update_forward_refs()


CoverageEligibilityResponseInsurance.update_forward_refs()


CoverageEligibilityResponseInsuranceItem.update_forward_refs()


CoverageEligibilityResponseInsuranceItemBenefit.update_forward_refs()


CoverageEligibilityResponseError.update_forward_refs()


CoverageEligibilityResponseEvent.update_forward_refs()


CoverageEligibilityResponse.update_forward_refs()


DetectedIssueMitigation.update_forward_refs()


DetectedIssueEvidence.update_forward_refs()


DetectedIssue.update_forward_refs()


DeviceConformsTo.update_forward_refs()


DeviceUdiCarrier.update_forward_refs()


DeviceProperty.update_forward_refs()


DeviceVersion.update_forward_refs()


DeviceName.update_forward_refs()


Device.update_forward_refs()


DeviceAssociationOperation.update_forward_refs()


DeviceAssociation.update_forward_refs()


DeviceDefinitionRegulatoryIdentifier.update_forward_refs()


DeviceDefinitionUdiDeviceIdentifier.update_forward_refs()


DeviceDefinitionUdiDeviceIdentifierMarketDistribution.update_forward_refs()


DeviceDefinitionCorrectiveAction.update_forward_refs()


DeviceDefinitionClassification.update_forward_refs()


DeviceDefinitionChargeItem.update_forward_refs()


DeviceDefinitionConformsTo.update_forward_refs()


DeviceDefinitionDeviceName.update_forward_refs()


DeviceDefinitionGuideline.update_forward_refs()


DeviceDefinitionPackaging.update_forward_refs()


DeviceDefinitionPackagingDistributor.update_forward_refs()


DeviceDefinitionMaterial.update_forward_refs()


DeviceDefinitionProperty.update_forward_refs()


DeviceDefinitionVersion.update_forward_refs()


DeviceDefinitionHasPart.update_forward_refs()


DeviceDefinitionLink.update_forward_refs()


DeviceDefinition.update_forward_refs()


DeviceDispensePerformer.update_forward_refs()


DeviceDispense.update_forward_refs()


DeviceMetricCalibration.update_forward_refs()


DeviceMetric.update_forward_refs()


DeviceRequestParameter.update_forward_refs()


DeviceRequest.update_forward_refs()


DeviceUsageAdherence.update_forward_refs()


DeviceUsage.update_forward_refs()


DiagnosticReportSupportingInfo.update_forward_refs()


DiagnosticReportMedia.update_forward_refs()


DiagnosticReport.update_forward_refs()


DocumentReferenceRelatesTo.update_forward_refs()


DocumentReferenceAttester.update_forward_refs()


DocumentReferenceContent.update_forward_refs()


DocumentReferenceContentProfile.update_forward_refs()


DocumentReference.update_forward_refs()


DomainResource.update_forward_refs()


EncounterParticipant.update_forward_refs()


EncounterAdmission.update_forward_refs()


EncounterDiagnosis.update_forward_refs()


EncounterLocation.update_forward_refs()


EncounterReason.update_forward_refs()


Encounter.update_forward_refs()


EncounterHistoryLocation.update_forward_refs()


EncounterHistory.update_forward_refs()


EndpointPayload.update_forward_refs()


Endpoint.update_forward_refs()


EnrollmentRequest.update_forward_refs()


EnrollmentResponse.update_forward_refs()


EpisodeOfCareStatusHistory.update_forward_refs()


EpisodeOfCareDiagnosis.update_forward_refs()


EpisodeOfCareReason.update_forward_refs()


EpisodeOfCare.update_forward_refs()


EventDefinition.update_forward_refs()


EvidenceVariableDefinition.update_forward_refs()


EvidenceCertainty.update_forward_refs()


EvidenceStatistic.update_forward_refs()


EvidenceStatisticModelCharacteristic.update_forward_refs()


EvidenceStatisticModelCharacteristicVariable.update_forward_refs()


EvidenceStatisticAttributeEstimate.update_forward_refs()


EvidenceStatisticSampleSize.update_forward_refs()


Evidence.update_forward_refs()


EvidenceReportRelatesTo.update_forward_refs()


EvidenceReportRelatesToTarget.update_forward_refs()


EvidenceReportSection.update_forward_refs()


EvidenceReportSubject.update_forward_refs()


EvidenceReportSubjectCharacteristic.update_forward_refs()


EvidenceReport.update_forward_refs()


EvidenceVariableCharacteristic.update_forward_refs()


EvidenceVariableCharacteristicDefinitionByTypeAndValue.update_forward_refs()


EvidenceVariableCharacteristicDefinitionByCombination.update_forward_refs()


EvidenceVariableCharacteristicTimeFromEvent.update_forward_refs()


EvidenceVariableCategory.update_forward_refs()


EvidenceVariable.update_forward_refs()


ExampleScenarioInstance.update_forward_refs()


ExampleScenarioInstanceContainedInstance.update_forward_refs()


ExampleScenarioInstanceVersion.update_forward_refs()


ExampleScenarioProcess.update_forward_refs()


ExampleScenarioProcessStep.update_forward_refs()


ExampleScenarioProcessStepAlternative.update_forward_refs()


ExampleScenarioProcessStepOperation.update_forward_refs()


ExampleScenarioActor.update_forward_refs()


ExampleScenario.update_forward_refs()


ExplanationOfBenefitBenefitBalance.update_forward_refs()


ExplanationOfBenefitBenefitBalanceFinancial.update_forward_refs()


ExplanationOfBenefitSupportingInfo.update_forward_refs()


ExplanationOfBenefitProcessNote.update_forward_refs()


ExplanationOfBenefitInsurance.update_forward_refs()


ExplanationOfBenefitProcedure.update_forward_refs()


ExplanationOfBenefitDiagnosis.update_forward_refs()


ExplanationOfBenefitAccident.update_forward_refs()


ExplanationOfBenefitCareTeam.update_forward_refs()


ExplanationOfBenefitPayment.update_forward_refs()


ExplanationOfBenefitAddItem.update_forward_refs()


ExplanationOfBenefitAddItemBodySite.update_forward_refs()


ExplanationOfBenefitAddItemDetail.update_forward_refs()


ExplanationOfBenefitAddItemDetailSubDetail.update_forward_refs()


ExplanationOfBenefitRelated.update_forward_refs()


ExplanationOfBenefitTotal.update_forward_refs()


ExplanationOfBenefitPayee.update_forward_refs()


ExplanationOfBenefitEvent.update_forward_refs()


ExplanationOfBenefitItem.update_forward_refs()


ExplanationOfBenefitItemReviewOutcome.update_forward_refs()


ExplanationOfBenefitItemAdjudication.update_forward_refs()


ExplanationOfBenefitItemBodySite.update_forward_refs()


ExplanationOfBenefitItemDetail.update_forward_refs()


ExplanationOfBenefitItemDetailSubDetail.update_forward_refs()


ExplanationOfBenefit.update_forward_refs()


FamilyMemberHistoryParticipant.update_forward_refs()


FamilyMemberHistoryProcedure.update_forward_refs()


FamilyMemberHistoryCondition.update_forward_refs()


FamilyMemberHistory.update_forward_refs()


Flag.update_forward_refs()


FormularyItem.update_forward_refs()


GenomicStudyAnalysis.update_forward_refs()


GenomicStudyAnalysisPerformer.update_forward_refs()


GenomicStudyAnalysisDevice.update_forward_refs()


GenomicStudyAnalysisOutput.update_forward_refs()


GenomicStudyAnalysisInput.update_forward_refs()


GenomicStudy.update_forward_refs()


GoalTarget.update_forward_refs()


Goal.update_forward_refs()


GraphDefinitionLink.update_forward_refs()


GraphDefinitionLinkCompartment.update_forward_refs()


GraphDefinitionNode.update_forward_refs()


GraphDefinition.update_forward_refs()


GroupCharacteristic.update_forward_refs()


GroupMember.update_forward_refs()


Group.update_forward_refs()


GuidanceResponse.update_forward_refs()


HealthcareServiceEligibility.update_forward_refs()


HealthcareService.update_forward_refs()


ImagingSelectionPerformer.update_forward_refs()


ImagingSelectionInstance.update_forward_refs()


ImagingSelectionInstanceImageRegion3D.update_forward_refs()


ImagingSelectionInstanceImageRegion2D.update_forward_refs()


ImagingSelection.update_forward_refs()


ImagingStudySeries.update_forward_refs()


ImagingStudySeriesPerformer.update_forward_refs()


ImagingStudySeriesInstance.update_forward_refs()


ImagingStudy.update_forward_refs()


ImmunizationProgramEligibility.update_forward_refs()


ImmunizationProtocolApplied.update_forward_refs()


ImmunizationPerformer.update_forward_refs()


ImmunizationReaction.update_forward_refs()


Immunization.update_forward_refs()


ImmunizationEvaluation.update_forward_refs()


ImmunizationRecommendationRecommendation.update_forward_refs()


ImmunizationRecommendationRecommendationDateCriterion.update_forward_refs()


ImmunizationRecommendation.update_forward_refs()


ImplementationGuideDefinition.update_forward_refs()


ImplementationGuideDefinitionParameter.update_forward_refs()


ImplementationGuideDefinitionTemplate.update_forward_refs()


ImplementationGuideDefinitionResource.update_forward_refs()


ImplementationGuideDefinitionGrouping.update_forward_refs()


ImplementationGuideDefinitionPage.update_forward_refs()


ImplementationGuideDependsOn.update_forward_refs()


ImplementationGuideManifest.update_forward_refs()


ImplementationGuideManifestResource.update_forward_refs()


ImplementationGuideManifestPage.update_forward_refs()


ImplementationGuideGlobal.update_forward_refs()


ImplementationGuide.update_forward_refs()


IngredientManufacturer.update_forward_refs()


IngredientSubstance.update_forward_refs()


IngredientSubstanceStrength.update_forward_refs()


IngredientSubstanceStrengthReferenceStrength.update_forward_refs()


Ingredient.update_forward_refs()


InsurancePlanCoverage.update_forward_refs()


InsurancePlanCoverageBenefit.update_forward_refs()


InsurancePlanCoverageBenefitLimit.update_forward_refs()


InsurancePlanPlan.update_forward_refs()


InsurancePlanPlanSpecificCost.update_forward_refs()


InsurancePlanPlanSpecificCostBenefit.update_forward_refs()


InsurancePlanPlanSpecificCostBenefitCost.update_forward_refs()


InsurancePlanPlanGeneralCost.update_forward_refs()


InsurancePlan.update_forward_refs()


InventoryItemResponsibleOrganization.update_forward_refs()


InventoryItemCharacteristic.update_forward_refs()


InventoryItemAssociation.update_forward_refs()


InventoryItemDescription.update_forward_refs()


InventoryItemInstance.update_forward_refs()


InventoryItemName.update_forward_refs()


InventoryItem.update_forward_refs()


InventoryReportInventoryListing.update_forward_refs()


InventoryReportInventoryListingItem.update_forward_refs()


InventoryReport.update_forward_refs()


InvoiceParticipant.update_forward_refs()


InvoiceLineItem.update_forward_refs()


Invoice.update_forward_refs()


Library.update_forward_refs()


LinkageItem.update_forward_refs()


Linkage.update_forward_refs()


ListEntry.update_forward_refs()


List.update_forward_refs()


LocationPosition.update_forward_refs()


Location.update_forward_refs()


ManufacturedItemDefinitionComponent.update_forward_refs()


ManufacturedItemDefinitionComponentConstituent.update_forward_refs()


ManufacturedItemDefinitionProperty.update_forward_refs()


ManufacturedItemDefinition.update_forward_refs()


MeasureSupplementalData.update_forward_refs()


MeasureGroup.update_forward_refs()


MeasureGroupStratifier.update_forward_refs()


MeasureGroupStratifierComponent.update_forward_refs()


MeasureGroupPopulation.update_forward_refs()


MeasureTerm.update_forward_refs()


Measure.update_forward_refs()


MeasureReportGroup.update_forward_refs()


MeasureReportGroupStratifier.update_forward_refs()


MeasureReportGroupStratifierStratum.update_forward_refs()


MeasureReportGroupStratifierStratumPopulation.update_forward_refs()


MeasureReportGroupStratifierStratumComponent.update_forward_refs()


MeasureReportGroupPopulation.update_forward_refs()


MeasureReport.update_forward_refs()


MedicationIngredient.update_forward_refs()


MedicationBatch.update_forward_refs()


Medication.update_forward_refs()


MedicationAdministrationPerformer.update_forward_refs()


MedicationAdministrationDosage.update_forward_refs()


MedicationAdministration.update_forward_refs()


MedicationDispenseSubstitution.update_forward_refs()


MedicationDispensePerformer.update_forward_refs()


MedicationDispense.update_forward_refs()


MedicationKnowledgeRelatedMedicationKnowledge.update_forward_refs()


MedicationKnowledgeMedicineClassification.update_forward_refs()


MedicationKnowledgeIndicationGuideline.update_forward_refs()


MedicationKnowledgeIndicationGuidelineDosingGuideline.update_forward_refs()


MedicationKnowledgeIndicationGuidelineDosingGuidelinePatientCharacteristic.update_forward_refs()


MedicationKnowledgeIndicationGuidelineDosingGuidelineDosage.update_forward_refs()


MedicationKnowledgeMonitoringProgram.update_forward_refs()


MedicationKnowledgeStorageGuideline.update_forward_refs()


MedicationKnowledgeStorageGuidelineEnvironmentalSetting.update_forward_refs()


MedicationKnowledgeDefinitional.update_forward_refs()


MedicationKnowledgeDefinitionalDrugCharacteristic.update_forward_refs()


MedicationKnowledgeDefinitionalIngredient.update_forward_refs()


MedicationKnowledgeRegulatory.update_forward_refs()


MedicationKnowledgeRegulatorySubstitution.update_forward_refs()


MedicationKnowledgeRegulatoryMaxDispense.update_forward_refs()


MedicationKnowledgePackaging.update_forward_refs()


MedicationKnowledgeMonograph.update_forward_refs()


MedicationKnowledgeCost.update_forward_refs()


MedicationKnowledge.update_forward_refs()


MedicationRequestDispenseRequest.update_forward_refs()


MedicationRequestDispenseRequestInitialFill.update_forward_refs()


MedicationRequestSubstitution.update_forward_refs()


MedicationRequest.update_forward_refs()


MedicationStatementAdherence.update_forward_refs()


MedicationStatement.update_forward_refs()


MedicinalProductDefinitionCharacteristic.update_forward_refs()


MedicinalProductDefinitionCrossReference.update_forward_refs()


MedicinalProductDefinitionOperation.update_forward_refs()


MedicinalProductDefinitionContact.update_forward_refs()


MedicinalProductDefinitionName.update_forward_refs()


MedicinalProductDefinitionNameUsage.update_forward_refs()


MedicinalProductDefinitionNamePart.update_forward_refs()


MedicinalProductDefinition.update_forward_refs()


MessageDefinitionAllowedResponse.update_forward_refs()


MessageDefinitionFocus.update_forward_refs()


MessageDefinition.update_forward_refs()


MessageHeaderDestination.update_forward_refs()


MessageHeaderResponse.update_forward_refs()


MessageHeaderSource.update_forward_refs()


MessageHeader.update_forward_refs()


MetadataResource.update_forward_refs()


MolecularSequenceRelative.update_forward_refs()


MolecularSequenceRelativeStartingSequence.update_forward_refs()


MolecularSequenceRelativeEdit.update_forward_refs()


MolecularSequence.update_forward_refs()


NamingSystemUniqueId.update_forward_refs()


NamingSystem.update_forward_refs()


NutritionIntakeIngredientLabel.update_forward_refs()


NutritionIntakeConsumedItem.update_forward_refs()


NutritionIntakePerformer.update_forward_refs()


NutritionIntake.update_forward_refs()


NutritionOrderEnteralFormula.update_forward_refs()


NutritionOrderEnteralFormulaAdministration.update_forward_refs()


NutritionOrderEnteralFormulaAdministrationSchedule.update_forward_refs()


NutritionOrderEnteralFormulaAdditive.update_forward_refs()


NutritionOrderSupplement.update_forward_refs()


NutritionOrderSupplementSchedule.update_forward_refs()


NutritionOrderOralDiet.update_forward_refs()


NutritionOrderOralDietNutrient.update_forward_refs()


NutritionOrderOralDietSchedule.update_forward_refs()


NutritionOrderOralDietTexture.update_forward_refs()


NutritionOrder.update_forward_refs()


NutritionProductCharacteristic.update_forward_refs()


NutritionProductIngredient.update_forward_refs()


NutritionProductInstance.update_forward_refs()


NutritionProductNutrient.update_forward_refs()


NutritionProduct.update_forward_refs()


ObservationReferenceRange.update_forward_refs()


ObservationTriggeredBy.update_forward_refs()


ObservationComponent.update_forward_refs()


Observation.update_forward_refs()


ObservationDefinitionQualifiedValue.update_forward_refs()


ObservationDefinitionComponent.update_forward_refs()


ObservationDefinition.update_forward_refs()


OperationDefinitionParameter.update_forward_refs()


OperationDefinitionParameterReferencedFrom.update_forward_refs()


OperationDefinitionParameterBinding.update_forward_refs()


OperationDefinitionOverload.update_forward_refs()


OperationDefinition.update_forward_refs()


OperationOutcomeIssue.update_forward_refs()


OperationOutcome.update_forward_refs()


OrganizationQualification.update_forward_refs()


Organization.update_forward_refs()


OrganizationAffiliation.update_forward_refs()


PackagedProductDefinitionLegalStatusOfSupply.update_forward_refs()


PackagedProductDefinitionPackaging.update_forward_refs()


PackagedProductDefinitionPackagingContainedItem.update_forward_refs()


PackagedProductDefinitionPackagingProperty.update_forward_refs()


PackagedProductDefinition.update_forward_refs()


ParametersParameter.update_forward_refs()


Parameters.update_forward_refs()


PatientCommunication.update_forward_refs()


PatientContact.update_forward_refs()


PatientLink.update_forward_refs()


Patient.update_forward_refs()


PaymentNotice.update_forward_refs()


PaymentReconciliationProcessNote.update_forward_refs()


PaymentReconciliationAllocation.update_forward_refs()


PaymentReconciliation.update_forward_refs()


PermissionJustification.update_forward_refs()


PermissionRule.update_forward_refs()


PermissionRuleActivity.update_forward_refs()


PermissionRuleData.update_forward_refs()


PermissionRuleDataResource.update_forward_refs()


Permission.update_forward_refs()


PersonCommunication.update_forward_refs()


PersonLink.update_forward_refs()


Person.update_forward_refs()


PlanDefinitionAction.update_forward_refs()


PlanDefinitionActionRelatedAction.update_forward_refs()


PlanDefinitionActionDynamicValue.update_forward_refs()


PlanDefinitionActionParticipant.update_forward_refs()


PlanDefinitionActionCondition.update_forward_refs()


PlanDefinitionActionOutput.update_forward_refs()


PlanDefinitionActionInput.update_forward_refs()


PlanDefinitionActor.update_forward_refs()


PlanDefinitionActorOption.update_forward_refs()


PlanDefinitionGoal.update_forward_refs()


PlanDefinitionGoalTarget.update_forward_refs()


PlanDefinition.update_forward_refs()


PractitionerCommunication.update_forward_refs()


PractitionerQualification.update_forward_refs()


Practitioner.update_forward_refs()


PractitionerRole.update_forward_refs()


ProcedureFocalDevice.update_forward_refs()


ProcedurePerformer.update_forward_refs()


Procedure.update_forward_refs()


ProvenanceEntity.update_forward_refs()


ProvenanceAgent.update_forward_refs()


Provenance.update_forward_refs()


QuestionnaireItem.update_forward_refs()


QuestionnaireItemAnswerOption.update_forward_refs()


QuestionnaireItemEnableWhen.update_forward_refs()


QuestionnaireItemInitial.update_forward_refs()


Questionnaire.update_forward_refs()


QuestionnaireResponseItem.update_forward_refs()


QuestionnaireResponseItemAnswer.update_forward_refs()


QuestionnaireResponse.update_forward_refs()


RegulatedAuthorizationCase.update_forward_refs()


RegulatedAuthorization.update_forward_refs()


RelatedPersonCommunication.update_forward_refs()


RelatedPerson.update_forward_refs()


RequestOrchestrationAction.update_forward_refs()


RequestOrchestrationActionRelatedAction.update_forward_refs()


RequestOrchestrationActionDynamicValue.update_forward_refs()


RequestOrchestrationActionParticipant.update_forward_refs()


RequestOrchestrationActionCondition.update_forward_refs()


RequestOrchestrationActionOutput.update_forward_refs()


RequestOrchestrationActionInput.update_forward_refs()


RequestOrchestration.update_forward_refs()


RequirementsStatement.update_forward_refs()


Requirements.update_forward_refs()


ResearchStudyComparisonGroup.update_forward_refs()


ResearchStudyAssociatedParty.update_forward_refs()


ResearchStudyOutcomeMeasure.update_forward_refs()


ResearchStudyProgressStatus.update_forward_refs()


ResearchStudyRecruitment.update_forward_refs()


ResearchStudyObjective.update_forward_refs()


ResearchStudyLabel.update_forward_refs()


ResearchStudy.update_forward_refs()


ResearchSubjectProgress.update_forward_refs()


ResearchSubject.update_forward_refs()


RiskAssessmentPrediction.update_forward_refs()


RiskAssessment.update_forward_refs()


Schedule.update_forward_refs()


SearchParameterComponent.update_forward_refs()


SearchParameter.update_forward_refs()


ServiceRequestPatientInstruction.update_forward_refs()


ServiceRequestOrderDetail.update_forward_refs()


ServiceRequestOrderDetailParameter.update_forward_refs()


ServiceRequest.update_forward_refs()


Slot.update_forward_refs()


SpecimenProcessing.update_forward_refs()


SpecimenCollection.update_forward_refs()


SpecimenContainer.update_forward_refs()


SpecimenFeature.update_forward_refs()


Specimen.update_forward_refs()


SpecimenDefinitionTypeTested.update_forward_refs()


SpecimenDefinitionTypeTestedContainer.update_forward_refs()


SpecimenDefinitionTypeTestedContainerAdditive.update_forward_refs()


SpecimenDefinitionTypeTestedHandling.update_forward_refs()


SpecimenDefinition.update_forward_refs()


StructureDefinitionDifferential.update_forward_refs()


StructureDefinitionSnapshot.update_forward_refs()


StructureDefinitionContext.update_forward_refs()


StructureDefinitionMapping.update_forward_refs()


StructureDefinition.update_forward_refs()


StructureMapStructure.update_forward_refs()


StructureMapGroup.update_forward_refs()


StructureMapGroupInput.update_forward_refs()


StructureMapGroupRule.update_forward_refs()


StructureMapGroupRuleDependent.update_forward_refs()


StructureMapGroupRuleTarget.update_forward_refs()


StructureMapGroupRuleTargetParameter.update_forward_refs()


StructureMapGroupRuleSource.update_forward_refs()


StructureMapConst.update_forward_refs()


StructureMap.update_forward_refs()


SubscriptionParameter.update_forward_refs()


SubscriptionFilterBy.update_forward_refs()


Subscription.update_forward_refs()


SubscriptionStatusNotificationEvent.update_forward_refs()


SubscriptionStatus.update_forward_refs()


SubscriptionTopicNotificationShape.update_forward_refs()


SubscriptionTopicResourceTrigger.update_forward_refs()


SubscriptionTopicResourceTriggerQueryCriteria.update_forward_refs()


SubscriptionTopicEventTrigger.update_forward_refs()


SubscriptionTopicCanFilterBy.update_forward_refs()


SubscriptionTopic.update_forward_refs()


SubstanceIngredient.update_forward_refs()


Substance.update_forward_refs()


SubstanceDefinitionCharacterization.update_forward_refs()


SubstanceDefinitionMolecularWeight.update_forward_refs()


SubstanceDefinitionSourceMaterial.update_forward_refs()


SubstanceDefinitionRelationship.update_forward_refs()


SubstanceDefinitionStructure.update_forward_refs()


SubstanceDefinitionStructureRepresentation.update_forward_refs()


SubstanceDefinitionProperty.update_forward_refs()


SubstanceDefinitionMoiety.update_forward_refs()


SubstanceDefinitionName.update_forward_refs()


SubstanceDefinitionNameOfficial.update_forward_refs()


SubstanceDefinitionCode.update_forward_refs()


SubstanceDefinition.update_forward_refs()


SubstanceNucleicAcidSubunit.update_forward_refs()


SubstanceNucleicAcidSubunitLinkage.update_forward_refs()


SubstanceNucleicAcidSubunitSugar.update_forward_refs()


SubstanceNucleicAcid.update_forward_refs()


SubstancePolymerMonomerSet.update_forward_refs()


SubstancePolymerMonomerSetStartingMaterial.update_forward_refs()


SubstancePolymerRepeat.update_forward_refs()


SubstancePolymerRepeatRepeatUnit.update_forward_refs()


SubstancePolymerRepeatRepeatUnitStructuralRepresentation.update_forward_refs()


SubstancePolymerRepeatRepeatUnitDegreeOfPolymerisation.update_forward_refs()


SubstancePolymer.update_forward_refs()


SubstanceProteinSubunit.update_forward_refs()


SubstanceProtein.update_forward_refs()


SubstanceReferenceInformationGeneElement.update_forward_refs()


SubstanceReferenceInformationTarget.update_forward_refs()


SubstanceReferenceInformationGene.update_forward_refs()


SubstanceReferenceInformation.update_forward_refs()


SubstanceSourceMaterialFractionDescription.update_forward_refs()


SubstanceSourceMaterialPartDescription.update_forward_refs()


SubstanceSourceMaterialOrganism.update_forward_refs()


SubstanceSourceMaterialOrganismOrganismGeneral.update_forward_refs()


SubstanceSourceMaterialOrganismHybrid.update_forward_refs()


SubstanceSourceMaterialOrganismAuthor.update_forward_refs()


SubstanceSourceMaterial.update_forward_refs()


SupplyDeliverySuppliedItem.update_forward_refs()


SupplyDelivery.update_forward_refs()


SupplyRequestParameter.update_forward_refs()


SupplyRequest.update_forward_refs()


TaskRestriction.update_forward_refs()


TaskPerformer.update_forward_refs()


TaskOutput.update_forward_refs()


TaskInput.update_forward_refs()


Task.update_forward_refs()


TerminologyCapabilitiesImplementation.update_forward_refs()


TerminologyCapabilitiesValidateCode.update_forward_refs()


TerminologyCapabilitiesTranslation.update_forward_refs()


TerminologyCapabilitiesCodeSystem.update_forward_refs()


TerminologyCapabilitiesCodeSystemVersion.update_forward_refs()


TerminologyCapabilitiesCodeSystemVersionFilter.update_forward_refs()


TerminologyCapabilitiesExpansion.update_forward_refs()


TerminologyCapabilitiesExpansionParameter.update_forward_refs()


TerminologyCapabilitiesSoftware.update_forward_refs()


TerminologyCapabilitiesClosure.update_forward_refs()


TerminologyCapabilities.update_forward_refs()


TestPlanDependency.update_forward_refs()


TestPlanTestCase.update_forward_refs()


TestPlanTestCaseDependency.update_forward_refs()


TestPlanTestCaseAssertion.update_forward_refs()


TestPlanTestCaseTestData.update_forward_refs()


TestPlanTestCaseTestRun.update_forward_refs()


TestPlanTestCaseTestRunScript.update_forward_refs()


TestPlan.update_forward_refs()


TestReportParticipant.update_forward_refs()


TestReportTeardown.update_forward_refs()


TestReportTeardownAction.update_forward_refs()


TestReportSetup.update_forward_refs()


TestReportSetupAction.update_forward_refs()


TestReportSetupActionOperation.update_forward_refs()


TestReportSetupActionAssert.update_forward_refs()


TestReportSetupActionAssertRequirement.update_forward_refs()


TestReportTest.update_forward_refs()


TestReportTestAction.update_forward_refs()


TestReport.update_forward_refs()


TestScriptDestination.update_forward_refs()


TestScriptTeardown.update_forward_refs()


TestScriptTeardownAction.update_forward_refs()


TestScriptVariable.update_forward_refs()


TestScriptMetadata.update_forward_refs()


TestScriptMetadataCapability.update_forward_refs()


TestScriptMetadataLink.update_forward_refs()


TestScriptFixture.update_forward_refs()


TestScriptOrigin.update_forward_refs()


TestScriptSetup.update_forward_refs()


TestScriptSetupAction.update_forward_refs()


TestScriptSetupActionOperation.update_forward_refs()


TestScriptSetupActionOperationRequestHeader.update_forward_refs()


TestScriptSetupActionAssert.update_forward_refs()


TestScriptSetupActionAssertRequirement.update_forward_refs()


TestScriptScope.update_forward_refs()


TestScriptTest.update_forward_refs()


TestScriptTestAction.update_forward_refs()


TestScript.update_forward_refs()


TransportRestriction.update_forward_refs()


TransportOutput.update_forward_refs()


TransportInput.update_forward_refs()


Transport.update_forward_refs()


ValueSetExpansion.update_forward_refs()


ValueSetExpansionParameter.update_forward_refs()


ValueSetExpansionContains.update_forward_refs()


ValueSetExpansionContainsProperty.update_forward_refs()


ValueSetExpansionContainsPropertySubProperty.update_forward_refs()


ValueSetExpansionProperty.update_forward_refs()


ValueSetCompose.update_forward_refs()


ValueSetComposeInclude.update_forward_refs()


ValueSetComposeIncludeConcept.update_forward_refs()


ValueSetComposeIncludeConceptDesignation.update_forward_refs()


ValueSetComposeIncludeFilter.update_forward_refs()


ValueSetScope.update_forward_refs()


ValueSet.update_forward_refs()


VerificationResultPrimarySource.update_forward_refs()


VerificationResultAttestation.update_forward_refs()


VerificationResultValidator.update_forward_refs()


VerificationResult.update_forward_refs()


VisionPrescriptionLensSpecification.update_forward_refs()


VisionPrescriptionLensSpecificationPrism.update_forward_refs()


VisionPrescription.update_forward_refs()