muccg / rdrf

The Rare Disease Registry Framework (RDRF) is an open source tool for the creation of web-based patient registries.
GNU Affero General Public License v3.0
15 stars 8 forks source link

New data representation for ClinicalData #2133

Open id2359 opened 2 years ago

id2359 commented 2 years ago

Most fields are unique cdes that would be far easier to work with if the ClinicalData data JSON field was structured like: { cdecode1 : data, cdecode2: data

etc" }

as is , we're muddying view aspects by including form and section nesting ..

id2359 commented 2 years ago

By using the simplest key/value aproach we should be able to use JSON operators that postgres (now) supports.

Drawback is we still have multisections ( need to figure ou what to do here) , plus the amount of code that directly iterates over the old representation.

id2359 commented 1 year ago

Should be informed by https://pganalyze.com/blog/postgres-jsonb-django-python https://python-jsonschema.readthedocs.io/en/stable/