smart-on-fhir / cumulus-library

https://docs.smarthealthit.org/cumulus/library/
Apache License 2.0
2 stars 0 forks source link

Support for Allergy in CORE #285

Closed comorbidity closed 2 weeks ago

comorbidity commented 3 weeks ago

FHIR support for CORE is defined here https://hl7.org/fhir/us/core/STU4/StructureDefinition-us-core-allergyintolerance.html

AllergyIntolerance.code is either RxNorm or SNOMED. Conveniently, VSAC provides this valueset: https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1186.8/expansion

Valueset includes

Categories we are most interested in are "medication" and "biologic" https://hl7.org/fhir/R4/valueset-allergy-intolerance-category.html

Note that substance code has >2000 entries, for example, "Codeine phosphate" https://hl7.org/fhir/R4/valueset-substance-code.html

"Findings" may be important to our "Symptoms" work, findings and symptoms may describe related or synonymous phenotypic observations. https://hl7.org/fhir/R4/valueset-clinical-findings.html

comorbidity commented 3 weeks ago

Task: create table core__allergy with the above variables as columns, if an only if those data are actually even present in the Bulk-FHIR downloaded content.

dogversioning commented 3 weeks ago

This is a subset of #139 - we can reprioritize that work if needed?

But I think we should think very hard about not creating core tables that don't directly correspond to either FHIR resources or FHIR profiles - it limits the reusability. It would be better to support the enitre resource and have a study create a table or view based on the slice of data it needs.

comorbidity commented 3 weeks ago

@dogversioning Thanks for the link to #139

I was thinking something like

create table core__allergyintolerance as select code, category, substance, manifestation, severity from allergyintolerance UNNEST (....)

James-R-Jones commented 3 weeks ago

the binding on that VSAC list for code is extensible so wouldn't suggest Core table pre-coordinating to only accept concepts from that list (new drugs come out all the time we will want to do some downstream study-level curation here)