GET /Medication returns entries that aren't resolved by the chart widget after we submit them
#1711
jayant-walvekar-falconeer
announced in
Q&A
Replies: 1 comment
|
@jayant-walvekar-falconeer Looks like this question is similar to your other post #1728, is there any other outstanding question here you need further explanation on that wasn't answered in that other discussion? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Fflagging behavior we're seeing on the FHIR API and would like to understand the intent.
What we're doing
For each medication on a patient's intake list, we call
GET /Medication?_text=…to find a code, thenPOST /MedicationStatementwith that code. Most rows render correctly in the chart. Some come back with a blank drug name.Observation 1: not all search results are resolvable by the chart widget
GET /Medication?_text=…returns a mix of entries for the same drug. We can't tell from the response shape which ones will be resolvable by the chart Medications widget after we submit them. Some submit and render with the drug name; others submit successfully (your write endpoint accepts them, no error) but show as a blank row in the chart.Example.
GET /Medication?_text=levothyroxine+50+mcg+tableton our dev tenant returns four entries:coding[]systemsfdb-216187THSC Levothyroxine Sodium 50 mcg tabletfdb-278640THSC Levothyroxine Sodium 150 mcg tabletfdb-237361levothyroxine 50 mcg tabletfdb-248321levothyroxine 150 mcg tabletIn our testing on this tenant,
MedicationStatements submitted with216187or278640show a blank drug name in the chart.237361and248321render correctly.Full shape of one of the entries that renders correctly:
{ "resource": { "resourceType": "Medication", "id": "fdb-248321", "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">levothyroxine 150 mcg tablet</div>" }, "code": { "coding": [ { "system": "http://www.fdbhealth.com/", "code": "248321", "display": "levothyroxine 150 mcg tablet" }, { "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "966225", "display": "levothyroxine 150 mcg tablet" } ], "text": "levothyroxine 150 mcg tablet" } } }Observation 2:
_texttoken-AND drops entries when the query contains a qualifier the display lacks_textmatching looks like a token-AND on the display string. When the input contains a word that isn't present in some matching entries' display, those entries get filtered out:_text=levothyroxine 50 mcg tablet216187,278640,237361,248321_text=levothyroxine sodium 50 mcg tablet216187,278640The display of
237361and248321contains no "sodium", so adding "sodium" to the query drops them. Your UI medication picker doesn't seem to behave this way — typinglevothyroxine sodium 50 mcgthere does find237361. That suggests the UI is using a different lookup than/Medication?_text=.Questions
GET /Medication?_text=…to find entries that will be resolvable by the chart widget? Is there a flag, parameter, or different endpoint we should be using?_textbehavior in Observation 2 expected? If so, is there a recommended way to search across the same catalog your UI medication picker uses?All reactions