cpicpgx / cpic-data

CPIC Data definitions and code to use that data
Other
26 stars 2 forks source link

Test Alert API to Website mismatch #15

Closed nadand closed 3 years ago

nadand commented 3 years ago

While using the API we have noticed that the content in test_alert.alerttext does not match what is available on the website to download. It seems that API returns the same alerttext for different populations while on the website it is different.

For example the CYP2C19 Post test /test_alert?drugid=eq.RxNorm:121243&lookupkey=cs.{"CYP2C19": "Rapid Metabolizer"}&select=id,population,cdscontext,alerttext,drug(name) returns

 [
    {
        "id": 875274,
        "population": "pediatrics",
        "cdscontext": "Post-test",
        "alerttext": [
            "Based on the genotype result, this patient is predicted to be a CYP2C19 rapid metabolizer, and the probability of attainment of therapeutic concentrations is variable. Initiate therapy with recommended standard of care dosing. Meticulous therapeutic drug monitoring to titrate dose to therapeutic trough concentrations is critical due to large variability in trough concentrations in rapid metabolizers. Please consult a clinical pharmacist for more information."
        ],
        "drug": {
            "name": "voriconazole"
        }
    },
    {
        "id": 875283,
        "population": "adults",
        "cdscontext": "Post-test",
        "alerttext": [
            "Based on the genotype result, this patient is predicted to be a CYP2C19 rapid metabolizer, and the probability of attainment of therapeutic concentrations is variable. Initiate therapy with recommended standard of care dosing. Meticulous therapeutic drug monitoring to titrate dose to therapeutic trough concentrations is critical due to large variability in trough concentrations in rapid metabolizers. Please consult a clinical pharmacist for more information."
        ],
        "drug": {
            "name": "voriconazole"
        }
    }
]

While to content on the website is:

image

whaleyr commented 3 years ago

You're right, the text is technically different but the content is the same.

For pediatric population:

For adult population:

You may see other corrections for punctuation, capitalization, or misspellings like this elsewhere in API responses.

whaleyr commented 3 years ago

It was just brought to my attention that I misunderstood your initial post. You're saying the alerttext array is literally the same between the 2 populations on the API response. I'm looking into it.

whaleyr commented 3 years ago

I looked into it and found a bug in our test alert importer. Thanks for bringing this to our attention. It's very helpful when members of the community help point out these issues.

I'm deploying the code out to the server soon and the data should be fixed within the next few hours.

whaleyr commented 3 years ago

I just confirmed the data is updated on the API for the example call in the OP so I'm closing this issue.