Symptoms
Pull out responses to what symptoms a participant has.
Motivation
- Remove need for digging into the JSON for queries.
Challenges
-
Should this instead be a custom domain (text[] with a check constraint on values)?
-
Map all our terms to a common ontology, e.g. NCIT (see below), instead of using bespoke identifiers.
Sketch of a schema
symptom
symptom_id
identifier (e.g. ncit:C3038)
name (e.g. fever)
encounter_symptom
encounter_id
symptom_id
or maybe:
create domain symptoms as text[]
check (array['cough', 'fever', ...] @> value)