Cover CaCu cytology fields in the silver gate

Adapted to rebuild, preserving its existing fields. Based on 1f0d38d, 7b6ffe1, 1dc681f, 8908184, 0fcbe95 and a93292f.
This commit is contained in:
2026-11-30 16:00:32 -06:00
committed by Angel Capetillo Zavala
parent 3a749ba8d1
commit 55fa6ddd9f
+49 -3
View File
@@ -17,9 +17,55 @@ from datetime import date
from core import catalog
ADOS2_SCORES = tuple(f for f, d in catalog.studies()["ados2"].fields.items() if d.type == "number")
GYN = (
"gyn_puerperium",
"gyn_pregnancy",
"gyn_iud",
"gyn_hormonal_treatment",
"gyn_other_treatment",
"gyn_postmenopause",
"gyn_hysterectomy",
"gyn_not_applicable",
)
PRESENTS = (
"presents_discharge",
"presents_vulvar_pruritus",
"presents_abnormal_bleeding",
"presents_none",
)
CYTO = (
"cyto_inflammation",
"cyto_reactive_changes",
"cyto_bacterial_vaginosis_flora",
"cyto_candida",
"cyto_bacillary_flora_cytolysis",
"cyto_intermediate_cytolysis",
"cyto_trichomonas",
"cyto_leptothrix",
"cyto_actinomyces_organisms",
"cyto_actinomyces_changes",
"cyto_herpes_simplex_changes",
"cyto_squamous_tubular_metaplasia",
"cyto_keratotic_changes",
"cyto_pregnancy_changes",
"cyto_atrophy",
"cyto_hypoestrogenism",
"cyto_radiotherapy_effect",
"cyto_iud_changes",
"cyto_post_hysterectomy_glandular_cells",
"cyto_bacteria",
"cyto_herpes_image",
"cyto_fungi",
"cyto_radiation",
"cyto_repair",
"cyto_iud_effect",
"cyto_endometrial_cells_40_plus",
"cyto_findings_none",
)
FIELDS = {
"cervical_cytology": ("sample_date", "report_date", "adequacy", "result", "hpv", "hpv_16",
"hpv_18"),
"cervical_cytology": ("sample_date", "screening_history", *GYN, *PRESENTS,
"cervix_exam", "report_date", "adequacy", "result", "hpv", "hpv_16",
"hpv_18", "cyto_findings_text", *CYTO),
"cervical_biopsy": ("request_date", "report_date", "histology"),
"mammography": ("exam_date", "report_date", "adequacy", "birads"),
"breast_biopsy": ("request_date", "report_date", "histology", "histologic_type", "grade",
@@ -32,7 +78,7 @@ FIELDS = {
"ados2": ("evaluation_date", "module", *ADOS2_SCORES),
"eeg": ("study_date", "lab_record_id", "edf"),
} # fmt: skip
BOOLS = {"hpv", "hpv_16", "hpv_18"}
BOOLS = {"hpv", "hpv_16", "hpv_18", *GYN, *PRESENTS, *CYTO}
NUMBERS = {"ki67_pct", "size_mm", "positive_nodes", "score", *ADOS2_SCORES}