Compare commits

...

6 Commits

Author SHA1 Message Date
edgar a93292f3dd Silver gate: findings as the cytologist confirmed them
No inflammation grade field; one endometrial-cells field (40 or more).
Not run yet: tests are deferred until all the new fields are in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmQxVJFdw3mNQ5GUFgzwz1
2026-11-27 16:03:20 -06:00
edgar 0fcbe95c90 Silver gate checks the cytologist's additional findings
The synthetic cytology form now has a free-text findings section; its text,
the inflammation grade and each stated finding are expected, the rest unknown.
Not run yet: tests are deferred until all the new fields are in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmQxVJFdw3mNQ5GUFgzwz1
2026-11-27 15:42:46 -06:00
edgar 8908184093 Silver gate checks the cytology's cervix_exam
The synthetic cytology form now records one of the three exploration answers.
Not run yet: tests are deferred until all the new fields are in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmQxVJFdw3mNQ5GUFgzwz1
2026-11-27 15:38:33 -06:00
edgar 1dc681fb5a Silver gate checks the cytology's presents_ answers
The synthetic cytology form records one "actualmente presenta" answer; only
that field is expected true, the others stay unknown.
Not run yet: tests are deferred until all the new fields are in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-27 14:50:23 -06:00
edgar 7b6ffe17f5 Silver gate checks the cytology's gyn_ conditions
The synthetic cytology form records one gynaecological/obstetric condition;
only that field is expected true, the others stay unknown.
Not run yet: tests are deferred until all the new fields are in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-27 14:36:07 -06:00
edgar 1f0d38de3c Silver gate checks the cytology's screening_history
The synthetic cytology form now says one of the four detection answers, and
the gate compares screening_history with the rest of the cytology's fields.
Not run yet: tests are deferred until all the new fields are in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-27 14:33:32 -06:00
+23 -3
View File
@@ -14,9 +14,29 @@ from datetime import date
from core import catalog
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",
@@ -24,7 +44,7 @@ FIELDS = {
"breast_treatment": ("start_date", "kind"),
"clinical_note": ("note_date", "specialty", "icd10"),
} # fmt: skip
BOOLS = {"hpv", "hpv_16", "hpv_18"}
BOOLS = {"hpv", "hpv_16", "hpv_18", *GYN, *PRESENTS, *CYTO}
NUMBERS = {"ki67_pct", "size_mm"}