care.emr.resources.specimen_definition.spec module¶
- class SpecimenDefinitionStatusOptions(*values)¶
-
Status options for specimen definition
- draft = 'draft'¶
- active = 'active'¶
- retired = 'retired'¶
- class PreferenceOptions(*values)¶
-
Preference options for specimen type testing
- preferred = 'preferred'¶
- alternate = 'alternate'¶
- class QuantitySpec(*, value: float, unit: Coding)¶
Bases:
BaseModel
Represents a quantity with value and unit
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'unit': FieldInfo(annotation=Coding, required=True), 'value': FieldInfo(annotation=float, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class MinimumVolumeSpec(*, quantity: QuantitySpec | None = None, string: str | None = None)¶
Bases:
BaseModel
Specification for minimum volume with support for quantity or string representation
- quantity: QuantitySpec | None¶
- validate_minimum_volume()¶
Validates that only one minimum volume field is provided
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'quantity': FieldInfo(annotation=Union[QuantitySpec, NoneType], required=False, default=None), 'string': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class ContainerSpec(*, description: str | None = None, capacity: ~care.emr.resources.specimen_definition.spec.QuantitySpec | None = None, minimum_volume: ~care.emr.resources.specimen_definition.spec.MinimumVolumeSpec | None = None, cap: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding | None = None, preparation: str | None = None)¶
Bases:
BaseModel
Container specification for specimen collection
- capacity: QuantitySpec | None¶
- minimum_volume: MinimumVolumeSpec | None¶
- cap: BoundCoding | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'cap': FieldInfo(annotation=Union[ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, NoneType], required=False, default=None), 'capacity': FieldInfo(annotation=Union[QuantitySpec, NoneType], required=False, default=None), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'minimum_volume': FieldInfo(annotation=Union[MinimumVolumeSpec, NoneType], required=False, default=None), 'preparation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class DurationSpec(*, value: int, unit: Coding)¶
Bases:
BaseModel
Duration specification using value and unit
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'unit': FieldInfo(annotation=Coding, required=True), 'value': FieldInfo(annotation=int, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class TypeTestedSpec(*, is_derived: bool, preference: PreferenceOptions, container: ContainerSpec | None = None, requirement: str | None = None, retention_time: DurationSpec | None = None, single_use: bool | None = None)¶
Bases:
BaseModel
Specification for tested specimen types
- preference: PreferenceOptions¶
- container: ContainerSpec | None¶
- retention_time: DurationSpec | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'container': FieldInfo(annotation=Union[ContainerSpec, NoneType], required=False, default=None), 'is_derived': FieldInfo(annotation=bool, required=True), 'preference': FieldInfo(annotation=PreferenceOptions, required=True), 'requirement': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'retention_time': FieldInfo(annotation=Union[DurationSpec, NoneType], required=False, default=None), 'single_use': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class BaseSpecimenDefinitionSpec(*, meta: dict = {}, id: ~typing.Annotated[~uuid.UUID, ~pydantic.types.UuidVersion(uuid_version=4)] | None = None, title: str, derived_from_uri: str | None = None, status: ~care.emr.resources.specimen_definition.spec.SpecimenDefinitionStatusOptions, description: str, type_collected: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, patient_preparation: list[~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding] = [], collection: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding | None = None, type_tested: ~care.emr.resources.specimen_definition.spec.TypeTestedSpec | None = None)¶
Bases:
EMRResource
Base model for specimen definition
- status: SpecimenDefinitionStatusOptions¶
- type_collected: BoundCoding¶
- patient_preparation: list[~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding]¶
- collection: BoundCoding | None¶
- type_tested: TypeTestedSpec | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'collection': FieldInfo(annotation=Union[ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, NoneType], required=False, default=None), 'derived_from_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=Union[Annotated[UUID, UuidVersion], NoneType], required=False, default=None), 'meta': FieldInfo(annotation=dict, required=False, default={}), 'patient_preparation': FieldInfo(annotation=list[ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding], required=False, default=[]), 'status': FieldInfo(annotation=SpecimenDefinitionStatusOptions, required=True), 'title': FieldInfo(annotation=str, required=True), 'type_collected': FieldInfo(annotation=ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, required=True), 'type_tested': FieldInfo(annotation=Union[TypeTestedSpec, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class SpecimenDefinitionWriteSpec(*, meta: dict = {}, id: ~typing.Annotated[~uuid.UUID, ~pydantic.types.UuidVersion(uuid_version=4)] | None = None, title: str, derived_from_uri: str | None = None, status: ~care.emr.resources.specimen_definition.spec.SpecimenDefinitionStatusOptions, description: str, type_collected: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, patient_preparation: list[~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding] = [], collection: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding | None = None, type_tested: ~care.emr.resources.specimen_definition.spec.TypeTestedSpec | None = None, slug_value: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=5), ~annotated_types.MaxLen(max_length=25), ~pydantic.functional_validators.AfterValidator(func=~care.emr.utils.slug_type.slug_validator)])¶
Bases:
BaseSpecimenDefinitionSpec
- slug_value: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=25)]), AfterValidator(func=slug_validator)]¶
- perform_extra_deserialization(is_update, obj)¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'collection': FieldInfo(annotation=Union[ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, NoneType], required=False, default=None), 'derived_from_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=Union[Annotated[UUID, UuidVersion], NoneType], required=False, default=None), 'meta': FieldInfo(annotation=dict, required=False, default={}), 'patient_preparation': FieldInfo(annotation=list[ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding], required=False, default=[]), 'slug_value': FieldInfo(annotation=str, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=25), AfterValidator(func=<function slug_validator>)]), 'status': FieldInfo(annotation=SpecimenDefinitionStatusOptions, required=True), 'title': FieldInfo(annotation=str, required=True), 'type_collected': FieldInfo(annotation=ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, required=True), 'type_tested': FieldInfo(annotation=Union[TypeTestedSpec, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class SpecimenDefinitionReadSpec(*, meta: dict = {}, id: ~typing.Annotated[~uuid.UUID, ~pydantic.types.UuidVersion(uuid_version=4)] | None = None, title: str, derived_from_uri: str | None = None, status: ~care.emr.resources.specimen_definition.spec.SpecimenDefinitionStatusOptions, description: str, type_collected: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, patient_preparation: list[~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding] = [], collection: ~care.emr.utils.valueset_coding_type.ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding | None = None, type_tested: ~care.emr.resources.specimen_definition.spec.TypeTestedSpec | None = None, version: int | None = None, slug_config: dict, slug: str)¶
Bases:
BaseSpecimenDefinitionSpec
Specimen definition read specification
- classmethod perform_extra_serialization(mapping, obj)¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'collection': FieldInfo(annotation=Union[ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, NoneType], required=False, default=None), 'derived_from_uri': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=Union[Annotated[UUID, UuidVersion], NoneType], required=False, default=None), 'meta': FieldInfo(annotation=dict, required=False, default={}), 'patient_preparation': FieldInfo(annotation=list[ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding], required=False, default=[]), 'slug': FieldInfo(annotation=str, required=True), 'slug_config': FieldInfo(annotation=dict, required=True), 'status': FieldInfo(annotation=SpecimenDefinitionStatusOptions, required=True), 'title': FieldInfo(annotation=str, required=True), 'type_collected': FieldInfo(annotation=ValueSetBoundCoding.__class_getitem__.<locals>.BoundCoding, required=True), 'type_tested': FieldInfo(annotation=Union[TypeTestedSpec, NoneType], required=False, default=None), 'version': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.