Automático: several studies per layout, loose markers, joins only across documents, unreadable answers held

This commit is contained in:
Roberto Treviño
2026-12-03 15:22:16 -06:00
parent a2a9eb7af3
commit 0c8ca048df
9 changed files with 354 additions and 115 deletions
+7 -3
View File
@@ -5,7 +5,7 @@ column's date format, and the site's codes as a ConceptMap the platform accepts.
from core import concept_map
from core.drafting import codes_schema, layout_schema, table_schema
from models.draft import fields
from models.draft.documents import layouts
from models.draft.layouts import layouts
FORM = (
"SOLICITUD DE CITOLOGÍA CERVICAL\nNombre: {name}\nFecha de recepción: {date}\n"
@@ -63,8 +63,12 @@ def test_a_columns_dates_get_the_format_every_value_parses_with():
def test_answers_are_held_to_the_platforms_terms():
layout = layout_schema()["properties"]["entity"]["enum"]
assert "cervical_cytology" in layout and "none" in layout and "identity" not in layout
layout = layout_schema(3)["$defs"]["Study"]["properties"]
assert (
"cervical_cytology" in layout["entity"]["enum"]
and "identity" not in layout["entity"]["enum"]
)
assert layout["documents"]["items"]["enum"] == [1, 2, 3]
codes = codes_schema(["NEGATIVO", "BAJO GRADO"], ["NILM", "LSIL"])
one = codes["$defs"]["Code"]["properties"]
assert one["raw"]["enum"] == ["NEGATIVO", "BAJO GRADO"]