StanfordBDHG / ENGAGE-HF-Firebase

Firebase cloud hosting infrastructure for the ENGAGE-HF project.
MIT License
0 stars 1 forks source link

Update medication mapping with RxNorm codes #12

Closed vishnuravi closed 1 week ago

vishnuravi commented 3 weeks ago

Update medication mapping with RxNorm codes

pauljohanneskraft commented 2 weeks ago

Sorry for doing this, but what do you think about simply referencing this file at data/medicationCodes.json now and checking whether the codes in there are correct? I noticed some minor differences between the two, but I'm not sure, which ones are the correct ones, so it would be nice, if you could check them instead - thanks in advance 😊

I always tried to use SCD codes (i.e. ingredient + amount + type) for the drugs and IN (i.e. ingredient) codes for the medications, if that makes sense.

The document might not be easily human-readable, so just a quick explanation: It contains an array of medication classes each assigned with key as the index of them in the development guide table. Inside there are medications (code being an IN code there) in the same order as in the development guide and some drugs inside containing the SCD codes. For two drugs I had to also add fallbackTerms, you can ignore that, it is just there, because the RxNorm API doesn't provide information about them. All the remaining information about these drugs is fetched by the rxnorm.js and upload.js scripts when executing and those scripts then create the FHIR objects - just as an explanation, why there is nothing easily human-readable in there.

PSchmiedmayer commented 2 weeks ago

Thank you @pauljohanneskraft for the additional context!

vishnuravi commented 1 week ago

Thanks @pauljohanneskraft and @PSchmiedmayer, this looks like a reasonable approach to obtaining the drug codes. Will close this PR as the table is no longer needed.