25 lines
953 B
Python
25 lines
953 B
Python
"""Import schema for `core.cama.models.Mastografia`."""
|
|
from typing import Optional
|
|
|
|
from core.cama.enums import BIRADS, BIRADS_ALIAS
|
|
from webapi.imports.schemas.base import ImportSchema
|
|
from webapi.imports.schemas.coercion import Catalog, CatalogValue, FlexDate, RequiredHospitalId
|
|
|
|
_BIRADS_CATALOG = Catalog(BIRADS, BIRADS_ALIAS)
|
|
|
|
|
|
class MastografiaImportSchema(ImportSchema):
|
|
# The source's own id, kept so rows that reference it by id (not by a
|
|
# natural key) still point at this record.
|
|
mast_id: Optional[int] = None
|
|
pac_id: Optional[int] = None
|
|
pac_id_hospital: RequiredHospitalId
|
|
ord_id: Optional[int] = None
|
|
ord_numero_hospital: Optional[int] = None
|
|
mast_fecha_toma: FlexDate = None
|
|
mast_fecha_reporte: FlexDate = None
|
|
mast_calidad_imagen: Optional[str] = None
|
|
mast_birads: CatalogValue(_BIRADS_CATALOG) = None
|
|
mast_dicom_blob: Optional[bytes] = None
|
|
mast_interpretacion: Optional[str] = None
|