ADOS-2 items shown by the child's module, grouped by domain and subdomain
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.
This commit is contained in:
@@ -5,6 +5,7 @@ import type {
|
||||
Patient,
|
||||
RiskAssessment,
|
||||
} from 'fhir/r4';
|
||||
import { ados2Component, ados2Groups } from '../ados2';
|
||||
import { code, ext, Fhir, label, resources } from '../fhir';
|
||||
|
||||
const steps: Record<string, string> = {
|
||||
@@ -42,14 +43,6 @@ const biomarkers: Record<string, string> = {
|
||||
gradient: 'anteroposterior_gradient',
|
||||
};
|
||||
|
||||
const repetitive = new Set([
|
||||
'ados2.intonation',
|
||||
'ados2.stereotyped_language',
|
||||
'ados2.unusual_sensory_interest',
|
||||
'ados2.hand_finger_mannerisms',
|
||||
'ados2.repetitive_interests',
|
||||
]);
|
||||
|
||||
const classifications: Record<string, string> = {
|
||||
non_spectrum: 'Fuera del espectro',
|
||||
autism_spectrum: 'Espectro autista',
|
||||
@@ -103,13 +96,17 @@ export function identity(patient: Patient): string[][] {
|
||||
}
|
||||
|
||||
export function adosItems(observation: Observation): string[][] {
|
||||
return (observation.component ?? [])
|
||||
.filter((item) => code(item.code) !== 'ados2.module')
|
||||
.map((item) => [
|
||||
shown(label(item.code)),
|
||||
repetitive.has(code(item.code) ?? '') ? 'RRB' : 'SA',
|
||||
observationValue(item),
|
||||
]);
|
||||
return ados2Groups(observation).flatMap((group) =>
|
||||
group.subdomains.flatMap((sub) =>
|
||||
sub.items.map((item) => [
|
||||
group.domain,
|
||||
sub.subdomain,
|
||||
item.code,
|
||||
item.title,
|
||||
shown(item.score),
|
||||
]),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function adosSummary(observation: Observation): string[][] {
|
||||
@@ -258,7 +255,6 @@ function associations(
|
||||
eeg: Study | undefined,
|
||||
ados: Observation[],
|
||||
) {
|
||||
const items = ados[0] ? adosItems(ados[0]) : [];
|
||||
return (risk?.prediction ?? [])
|
||||
.map((p): Pair => {
|
||||
const key = code(p.outcome) ?? '';
|
||||
@@ -274,7 +270,7 @@ function associations(
|
||||
title: [
|
||||
metric?.title ?? metrics[biomarkers[biomarker]] ?? biomarker,
|
||||
zoneLabel(zone),
|
||||
item ? (items[Number(item[1]) - 1]?.[0] ?? outcome) : outcome,
|
||||
item ? label(ados2Component(ados[0], Number(item[1]))?.code) || outcome : outcome,
|
||||
].join(' · '),
|
||||
headline: ext(p, 'association-headline')?.valueBoolean === true,
|
||||
altered: site?.outside != null && site.outside !== 0,
|
||||
|
||||
Reference in New Issue
Block a user