Add a label above each completed timeline diamond and a baseline tick at
each completed step date, retaining the dotted line and day annotations.
Group each study and metric into one alterations block with its fields,
head map and age norm. Name the centile bands, shorten the norm title,
explain the head-map z scale and use Puntas paroxísticas consistently in
the shared biomarker labels. Update the logic and page expectations.
Choices left open by the spec:
- Use label annotations shifted upward by 26 pixels and a 40-pixel top
margin; retain the existing categorical axis and pending annotations.
Use the completed dates as explicit date-axis ticks.
- Add an optional charts array for the grouped row while retaining chart
for standalone plots. Put the map first and norm second, omit absent
figures, and keep a block even when neither figure is available.
- Use two equal grid columns with the existing space-4 gap, stacking at
800 pixels. Separate adjacent blocks with the existing border color,
space-6 margin and space-4 padding.
- Keep grouped figures in the PDF export's existing sequential image
order, consuming one image for each figure.
- Make bandFill's final name parameter optional and show its legend only
when a name is supplied, preserving unnamed governance bands.
- Keep the existing lighter outer/darker inner band drawing order.
- Keep tea-data.ts unchanged: its spike title already matches the required
Puntas paroxísticas. Preserve the existing spike exclusion in loadNorms.
Verification: git diff --check passed. Prettier skipped because this
worktree has no WebApp/node_modules/.bin/prettier. Angular tests/build and
browser page tests were not run on the saturated lab server, as specified.
No API signatures, schemas or endpoints changed.
Replace the risk introduction with the reviewed text, name severe ADOS-2
probabilities in the risk section and record table, and place the TEA
clarification below the risk probability table through section content.
Use one shared decimal log-axis builder in the patient forest and both
governance OR charts. Add builder and patient logic coverage and update
the page case for the section, column headers and clarification.
Choices left open by the spec:
- Name the builder logAxis and mirror valueAxis's iterable input signature;
put its logic spec in indicadores/figures.spec.ts beside the builder.
- Generate the 1-2-3-5-7 sequence from the floor of the minimum log10 to
the ceiling of the maximum log10, including only 1 in the last decade.
Whole-decade bounds retain labels for narrow and single-value ranges.
- Ignore missing, nonfinite and nonpositive input; return empty tick
arrays when no positive finite data remain. Discard generated zero or
nonfinite ticks at floating-point limits.
- Construct tick values from decimal exponent strings to avoid binary
multiplication artifacts; use explicit array ticks and SHORT hovers.
- Let the existing private decimal formatter accept optional Intl options,
retaining its existing defaults. For log labels use its es-MX locale,
one significant digit and no grouping, preserving small decimals and
avoiding scientific notation and trailing zeros.
- Include estimates and confidence bounds in each chart's input, plus 1
in the two charts that draw the reference line.
- Represent the risk table note as a following text block so the existing
page and PDF renderers both place it below the table.
- Cover decimal sequences, whole-decade bounds, singleton and iterable
input, invalid input, small and large labels, patient confidence bounds,
probability labels and the clarification's PDF inclusion in logic tests.
Add page assertions for the probability headers and clarification.
Validation: ruff check . passed; ruff format --check . passed (144 files);
git diff --check passed. A Node smoke check of the source logAxis function
passed nine assertions. Prettier was skipped because this worktree has no
WebApp/node_modules/.bin/prettier. Angular tests/build and Playwright page
tests were not run here, as the spec reserves them for milkpc/the VM.
Python imports and the API did not change; lint-imports and API generation
were not needed.
Render the worklist stepper from the Patient stage and read M-CHAT, CSS
and alteration count from its FHIR extensions. Keep the compact stepper
private to Seguimiento and share the dated screening logic with the
patient record. Use the first dated event for each step, require prior
steps, and use the later date when an event predates its prerequisite.
Only a good-quality EEG completes that stage.
Use horizontal Plotly bars on the destination rows for elapsed spans,
diamonds for completed steps, and labels for pending steps. Keep the
screening order on the axis and show 30 days on either side when all
completed steps share one date. Reuse the registered bar and scatter
traces and the rebuild palette.
Use completed months at the applied cutoff and show the marked headline
association with the reference formatting. Resolve item labels from
the model's ADOS-2 observation and fall back to the item code. Move the
existing detail and risk actions into the patient-name cell to keep the
requested ten columns. Keep raw association numbers and separate CI
bounds in Excel and keep the screening dates in the follow-up export.
Update the two logic specs and the follow-up, risk and record page
assertions. All 34 targeted Vitest cases passed with Plotly rendering
stubbed. The local TypeScript check reached the existing PDF export
code and reported missing pdfmake typings. Angular and page runs are
reserved for the test machines.
Removed the legacy indicator layout, unused chart helpers, styles and
exports, the card-actions component, fetch-all and explanatory comments;
one pager shared by the four worklists, shared filter-row styles, one
FHIR name and CURP reader, downloads through export/, the concept-map
editor on Material controls.
Paciente renders the TEA record and, on the risk route, the risk page with
the same frame as CaCu and CaMa: back link, title with id, identity block
from the FHIR Patient (name, birth date, sex, one row per identifier
system), sections as one card component, Material controls for the
altered-zones toggle and the pair choice, export button in rebuild's style.
tea-patient.ts, tea-record.html, tea-risk.html and tea-section.html/scss are
deleted; the logic specs follow the new structure.
The patient record ADOS-2 table and the Seguimiento ADOS-2 card list only
the module's items, in the order of core.tea.ados2_items as the FHIR
aggregate Observation carries them: each module item component has the
module's item code and exact title as a second coding (and code.text), and
ados2-domain / ados2-subdomain extensions. Components without those
(items outside the module) are not listed. Association titles and the
concordance look the item up by catalog field instead of by row index, so
they do not depend on which items the module has. ADOS2_ITEMS moves to a
shared src/app/ados2.ts.
Keep the TEA record branch inside Paciente and lazy-load the risk route.
Separate FHIR adaptation, figures, shared section rendering, and PDF
content under paciente. Use the existing section cards, tables, and
buttons, with flexible summary fields and scrollable detail tables.
Read the Patient by _id with Observation, DiagnosticReport, and
RiskAssessment reverse includes. Group neurology observations by
encounter, use aggregate ADOS-2 evaluations, and use the lab-record
observation for EEG dates without reports. Order the timeline and exams
newest first and use the RiskAssessment headline flag for pair order.
Render absent fields and empty tables with an em dash.
Use a normalized 10–20 layout and a 41-by-41 inverse-distance weighted
contour clipped to the head outline, with symmetric z colors and
electrode labels. Keep the head outline and markers when no site has a
score. Request each aggregate champion's version once per record load,
draw the median and p5–p95 band with banded(), and place the observed
value at the EEG's age. Omit unavailable bands and count-rate bands.
Use the RiskAssessment's EEG for z and pair status, falling back to the
newest EEG with z scores for the bars when needed. Use site outside flags
for the forest filter, aggregate scores for global and posterior-rhythm
pairs, and show the unit-OR line and available CI bounds. Select the
headline pair by default. The current RiskAssessment carries no logistic
coefficients, so the view shows patient and reference points at the
served z and at zero. Keep the optional logistic figure input independent
of the FHIR mapping. Link to Seguimiento with the agreed query parameter.
Share section data with the PDF and include snapshots of the rendered
figures. Use the existing safe seguimiento and riesgos filename tokens
with the UTC date. Format values for es-MX and size categorical charts
to their row count.
Add Vitest coverage for the head map, norm and point, forest filtering,
z band, probability fallback, ADOS-2 rows, PDF content, included data,
and the domain branch. Static TypeScript and Angular template checks
passed with a temporary PDF type shim. The Angular build, Vitest runtime
and Playwright run on the test machines.