3f6fa28590
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.