ISARIC FHIR extensions#

Extensions to the base FHIR resources package that are ISARIC specific.

class fhirflat.resources.extensions.Age(*, resource_type: str = 'Age', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'age', valueQuantity: QuantityType = None)#

An ISARIC extension collecting data on the age of a patient.

class fhirflat.resources.extensions.Duration(*, resource_type: str = 'Duration', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'duration', valueQuantity: QuantityType = None)#

An ISARIC extension for recording the length of an event (e.g. 5 days) where duration is not an option in the base FHIR specification.

class fhirflat.resources.extensions.Race(*, resource_type: str = 'Race', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'race', valueCodeableConcept: CodeableConceptType = None)#

An ISARIC extension collecting data on the race of a patient.

class fhirflat.resources.extensions.approximateDate(*, resource_type: str = 'approximateDate', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'approximateDate', valueDate: Date = None, valueString: String = None)#

An ISARIC extension for recording the approximate date (if the true date is unknown) or timeframe of an event.

E.g. a Follow-up encounter that occured 3 months after admission would have an approximateDate extension with a valueString of “3 months”.

classmethod validate_one_of_many_1136(values: dict[str, Any]) dict[str, Any]#

https://www.hl7.org/fhir/formats.html#choice A few elements have a choice of more than one data type for their content. All such elements have a name that takes the form nnn[x]. The “nnn” part of the name is constant, and the “[x]” is replaced with the title-cased name of the type that is actually used. The table view shows each of these names explicitly.

Elements that have a choice of data type cannot repeat - they must have a maximum cardinality of 1. When constructing an instance of an element with a choice of types, the authoring system must create a single element with a data type chosen from among the list of permitted data types.

class fhirflat.resources.extensions.birthSex(*, resource_type: str = 'birthSex', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'birthSex', valueCodeableConcept: CodeableConceptType = None)#

An ISARIC extension collecting data on the birth sex of a patient.

class fhirflat.resources.extensions.dateTimeExtension(*, resource_type: str = 'dateTimeExtension', fhir_comments: str | List[str] = None, id: String = None, extension: list[approximateDateType | relativeDayType | ExtensionType] = None)#

A G.Health specific extension to the FHIR dateTime type Allows dates to be specified as either approximate, and/or number of days relative to the current date.

class fhirflat.resources.extensions.presenceAbsence(*, resource_type: str = 'presenceAbsence', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'presenceAbsence', valueCodeableConcept: CodeableConceptType = None)#

An ISARIC extension to indicate if a clinical finding is present, absent or unknown.

class fhirflat.resources.extensions.prespecifiedQuery(*, resource_type: str = 'prespecifiedQuery', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'prespecifiedQuery', valueBoolean: bool = None)#

An ISARIC extension to indicate if a finding is the result of a prespecified query.

class fhirflat.resources.extensions.relativeDay(*, resource_type: str = 'relativeDay', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'relativeDay', valueInteger: Integer = None)#

An ISARIC extension recording the day an event occurred relative to the admission date. For a resources such as Encounter or Procedure, use relativePeriod to record both the relative start and end dates instead.

class fhirflat.resources.extensions.relativeEnd(*, resource_type: str = 'relativeEnd', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'relativeEnd', valueInteger: Integer = None)#

An ISARIC extension for use inside the complex relativePeriod extension.

class fhirflat.resources.extensions.relativePeriod(*, resource_type: str = 'relativePeriod', fhir_comments: str | List[str] = None, extension: list[relativeStartType | relativeEndType] = None, id: String = None, url: str = 'relativePeriod')#

An ISARIC extension recording the start and end dates an event occurred relative to the admission date.

relativePeriod is comprised of two components: relativeStart, denoting the start of the period and relativeEnd, denoting the end of the period.

E.g. a an Encounter that starts on the 5th of Jan, the same day as admission, and ends on the 10th, would have a relativePeriod extension where relativeStart is 1 and relativeEnd is 5.

class fhirflat.resources.extensions.relativeStart(*, resource_type: str = 'relativeStart', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'relativeStart', valueInteger: Integer = None)#

An ISARIC extension for use inside the complex relativePeriod extension.

class fhirflat.resources.extensions.timingDetail(*, resource_type: str = 'timingDetail', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'timingDetail', valueRange: RangeType = None, valueCodeableConcept: CodeableConceptType = None, valueString: String = None)#

An ISARIC extension collecting more detail on the timingPhase. This is typically means providing a range of days relative to the admission date (valueRange), noting that this covers a period since the last encounter (valueCodeableConcept), or note that this is for the last 12 months (valueString).

To denote a range before the timingPhase, use a negative number. e.g. -1 to -3 would denote 1 to 3 days before the timingPhase.

classmethod validate_one_of_many_1136(values: dict[str, Any]) dict[str, Any]#

https://www.hl7.org/fhir/formats.html#choice A few elements have a choice of more than one data type for their content. All such elements have a name that takes the form nnn[x]. The “nnn” part of the name is constant, and the “[x]” is replaced with the title-cased name of the type that is actually used. The table view shows each of these names explicitly.

Elements that have a choice of data type cannot repeat - they must have a maximum cardinality of 1. When constructing an instance of an element with a choice of types, the authoring system must create a single element with a data type chosen from among the list of permitted data types.

class fhirflat.resources.extensions.timingPhase(*, resource_type: str = 'timingPhase', fhir_comments: str | List[str] = None, extension: List[ExtensionType] = None, id: String = None, url: str = 'timingPhase', valueCodeableConcept: CodeableConceptType = None)#

An ISARIC extension collecting data on the phase of admission an event occurred. This is typically one of: - Pre-admission - Admission (i.e. during the hospital stay) - Follow-up with an appropriate SNOMED (or similar) code.

class fhirflat.resources.extensions.timingPhaseDetail(*, resource_type: str = 'timingPhaseDetail', fhir_comments: str | List[str] = None, extension: list[timingPhaseType | timingDetailType] = None, id: String = None, url: str = 'timingPhaseDetail')#

An ISARIC extension collecting data on the phase of admission an event occurred. This combines the timingPhase, timingDetail and timingPoint to bundle the responses relative to eachother.