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:
@@ -1,4 +1,5 @@
|
||||
import type { Bundle, DiagnosticReport, Observation, Patient, RiskAssessment } from 'fhir/r4';
|
||||
import { ados2Component, ados2Groups } from '../ados2';
|
||||
import { code, ext, label, resources } from '../fhir';
|
||||
|
||||
/** One row of the follow-up list: what the list shows of a patient at the cut-off. */
|
||||
@@ -212,31 +213,6 @@ export const TEA_STEPS = [
|
||||
{ code: 'eeg', label: 'EEG' },
|
||||
] as const;
|
||||
|
||||
const ADOS2_ITEMS = [
|
||||
'vocalization_directed',
|
||||
'pointing',
|
||||
'gestures',
|
||||
'unusual_eye_contact',
|
||||
'facial_expressions',
|
||||
'gaze_integration',
|
||||
'shared_enjoyment',
|
||||
'response_to_name',
|
||||
'ignoring',
|
||||
'requesting',
|
||||
'showing',
|
||||
'joint_attention_initiation',
|
||||
'joint_attention_response',
|
||||
'social_overtures_quality',
|
||||
'social_overtures_caregiver',
|
||||
'reciprocal_communication',
|
||||
'rapport_quality',
|
||||
'intonation',
|
||||
'stereotyped_language',
|
||||
'unusual_sensory_interest',
|
||||
'hand_finger_mannerisms',
|
||||
'repetitive_interests',
|
||||
];
|
||||
|
||||
type Prediction = NonNullable<RiskAssessment['prediction']>[number];
|
||||
|
||||
function associationPair(p: Prediction) {
|
||||
@@ -257,11 +233,9 @@ function associationPair(p: Prediction) {
|
||||
function concordance(headline?: ReturnType<typeof associationPair>, ados?: Observation): string {
|
||||
if (!headline || !ados || headline.probability == null || headline.reference == null) return '—';
|
||||
const outcome = headline.pair?.split('|')[2];
|
||||
const item = ADOS2_ITEMS[Number(outcome?.match(/^ados2_item_(\d{2})$/)?.[1]) - 1];
|
||||
const item = Number(outcome?.match(/^ados2_item_(\d{2})$/)?.[1]);
|
||||
const score =
|
||||
outcome === 'CSS'
|
||||
? ados.valueInteger
|
||||
: ados.component?.find((c) => item && code(c.code) === `ados2.${item}`)?.valueQuantity?.value;
|
||||
outcome === 'CSS' ? ados.valueInteger : ados2Component(ados, item)?.valueQuantity?.value;
|
||||
if (score == null) return '—';
|
||||
const event = score >= (outcome === 'CSS' ? 8 : 1);
|
||||
const predicted = headline.probability >= headline.reference;
|
||||
@@ -348,6 +322,7 @@ export function teaRows(page: Bundle) {
|
||||
evaluation.component?.find((c) => code(c.code) === 'ados2.module')?.valueCodeableConcept,
|
||||
),
|
||||
classification: label(evaluation.interpretation?.[0]),
|
||||
groups: ados2Groups(evaluation),
|
||||
},
|
||||
eegs: eegs.map((e) => ({
|
||||
id: e.id,
|
||||
|
||||
Reference in New Issue
Block a user