We have a handout that currently uses MEDS Prior to list the meds the patient is currently on. The provider called and asked if it could include the last refill date. I found the {MEDS_PRIOR("delimited")} but I don't want all the information that is there and I want it in a list. Can someone give me some pointers? I just want the following:
Medication description
Generic medication description
Instructions
Last Refill date
Unfortunately, unable to access Last Refill Date from the MEL symbols Meds_xxx("delimited").
The available fields are medication description, generic medication description DDID, GPI code, NDC code, legend, instructions, comments, onset date, stop date, and stop reason.
Well, I put the code in a test handout and it looks to be showing the refill date.
here is a screen print and the refill date is in the delimited text
Last refill date is provided (according to help) in MEDS_AFTER. This function will return the Med, Generic, Instructions, and Last Date Refilled for each med on a single line with dashes between each field
{fn fnMedContractFormatList(strList)
{
local lCounter
local MedArray
local lBuffer
local strFormattedList = ""
MedArray = getfield(strList, "|", "")
for lCounter = 1, lCounter <= size(MedArray), lCounter = lCounter + 1 do MedArray[lCounter] = getfield(MedArray[lCounter], "^", "") /* Need to remove commas from medication name */ lBuffer = INITIALCAP(MedArray[lCounter][1]) + " - " + INITIALCAP(MedArray[lCounter][2]) + " - " + MedArray[lCounter][7] + " - " + MedArray[lCounter][16] + HRET lBuffer = ReplaceStr(lBuffer, ",", ";") strFormattedList = strFormattedList + lBuffer endfor if (lCounter > 1) then
strFormattedList = remove(strFormattedList, size(strFormattedList))
endif
return (strFormattedList)
}}
Thanks so much for your help David!