19 lines
557 B
SQL
19 lines
557 B
SQL
-- One row per ADOS-2 and scored item, with the ADOS-2's module, algorithm, CSS and classification on each: what the
|
|
-- patient summary draws its domains and items from. An ADOS-2 without items gives one row without an item.
|
|
|
|
select
|
|
a.procedimiento_id,
|
|
a.pac_id,
|
|
a.fecha_ados2,
|
|
a.modulo,
|
|
a.algoritmo,
|
|
a.css,
|
|
a.clasificacion,
|
|
r.dominio,
|
|
r.reactivo,
|
|
r.etiqueta,
|
|
r.puntaje,
|
|
r.puntaje_algoritmo
|
|
from {{ ref('tea_ados2') }} a
|
|
left join {{ ref('tea_ados2_reactivos') }} r on r.procedimiento_id = a.procedimiento_id
|