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>
40 lines
1.6 KiB
Python
40 lines
1.6 KiB
Python
"""Import schema for `core.cama.models.BiopsiaMama`."""
|
|
from typing import Optional
|
|
|
|
from core.cama.enums import GradoHistologicoMama
|
|
from webapi.imports.schemas.base import ImportSchema
|
|
from webapi.imports.schemas.coercion import Catalog, CatalogValue, FlexDate, RequiredHospitalId
|
|
|
|
_GRADO_HISTOLOGICO_MAMA_CATALOG = Catalog(GradoHistologicoMama)
|
|
|
|
|
|
class BiopsiaMamaImportSchema(ImportSchema):
|
|
pac_id: Optional[int] = None
|
|
pac_id_hospital: RequiredHospitalId
|
|
ord_id: Optional[int] = None
|
|
ord_numero_hospital: Optional[int] = None
|
|
mast_id: Optional[int] = None
|
|
bx_fecha_solicitud: FlexDate = None
|
|
bx_fecha_reporte: FlexDate = None
|
|
bx_grado_histologico: CatalogValue(_GRADO_HISTOLOGICO_MAMA_CATALOG) = None
|
|
bx_pdf_blob: Optional[bytes] = None
|
|
bx_ocr_confianza: Optional[float] = None
|
|
bx_tipo_histologico: Optional[str] = None
|
|
bx_grado_nottingham: Optional[str] = None
|
|
bx_receptor_estrogeno: Optional[str] = None
|
|
bx_receptor_estrogeno_pct: Optional[float] = None
|
|
bx_receptor_progesterona: Optional[str] = None
|
|
bx_receptor_progesterona_pct: Optional[float] = None
|
|
bx_her2: Optional[str] = None
|
|
bx_her2_fish: Optional[str] = None
|
|
bx_ki67_pct: Optional[float] = None
|
|
bx_tamano_tumor_mm: Optional[float] = None
|
|
bx_ganglios_positivos: Optional[float] = None
|
|
bx_invasion_linfovascular: Optional[str] = None
|
|
bx_multifocalidad: Optional[str] = None
|
|
bx_margenes: Optional[str] = None
|
|
bx_pt: Optional[str] = None
|
|
bx_pn: Optional[str] = None
|
|
bx_lateralidad: Optional[str] = None
|
|
bx_localizacion: Optional[str] = None
|