Pull out responses to what symptoms a participant has.
- Remove need for digging into the JSON for queries.
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
create domain symptoms as text check (array['cough', 'fever', ...] @> value)