9a62ddcdaf
The patient takes the menopausal state, molecular and clinical subtype, integrative cluster, cellularity, mutation load, Ki-67 category and source of the record; a new import entity carries the recurrence and the last contact; hormone and anti-HER2 therapy are treatments. The route serves each cohort's scenarios, a scenario's figure and a patient's scenarios over the live cohort build, computing the models and the bootstrap in the background and caching them per build. Includes the survival import work this builds on. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
28 lines
1.1 KiB
Python
28 lines
1.1 KiB
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
|
|
mast_densidad: Optional[str] = None
|
|
mast_margen_masa: Optional[str] = None
|
|
mast_tipo_hallazgo: Optional[str] = None
|