sagerx icon indicating copy to clipboard operation
sagerx copied to clipboard

Make RxNorm DAG run the actual day of the month it is updated by NLM

Open jrlegrand opened this issue 1 year ago • 0 comments

Problem Statement

We arbitrarily chose the first day of the month for the RxNorm DAG schedule, but it looks like it can be updated on days 1-6 or so of the month, depending on the month.

Criteria for Success

The RxNorm API has an endpoint that indicates which version it is using.

https://rxnav.nlm.nih.gov/REST/version.json

{"version":"05-Jun-2023","apiVersion":"3.1.252"}

If we hit this endpoint to check for a date from the current month, this would be an indicator that it is the correct day to refresh RxNorm Full data.

Additional Information

Need to consider how this works when triggered manually vs when triggered on schedule. Don't want to prevent someone from re-running the DAG manually even though it is not from the current month.

This might be the way to do it: https://uts-ws.nlm.nih.gov/releases?releaseType=rxnorm-full-monthly-release

Source: https://documentation.uts.nlm.nih.gov/automating-downloads.html

jrlegrand avatar Jun 09 '23 13:06 jrlegrand