Hi,
I have buttons set up to prescribe medications. 1 button each for each medication.
If the button for FLUTICASONE is clicked, then it shoould say in form "FLUTICASONE- prescribed". Which is working. Now for some reason, if this medication is Removed from the Meds list, then the button should reappear and the chart notes should disappear.
Same goes for other medications as well.
Below is the MEL code for FLUTICASE action button - RUN_PROCESS
{
MEL_ADD_MEDICATION("FLUTICASONE PROPIONATE 0.005 % OINT", "Use as directed", str(._TODAYSDATE), 27551, ADDDATES(str(._TODAYSDATE), "0", "0", "1"), "1", "0")}
{
DOCUMENT.FLU="True"
}
I have the Translation Chart section as below:
{
IF DOCUMENT.FLU == "True" then " FLUTICASONE prescribed - Use as directed."
ELSE ""
ENDIF
}
In the Advanced section, i have enable/disable checked off with
{
DOCUMENT.FLU<>"True"
}
I have another medication button in the form. whose type is also RUN_PROCESS
MEL_ADD_MEDICATION("AMOXICILLIN 500 MG TABS", "1 by mouth 3 times per day", str(._TODAYSDATE), 44725, ADDDATES(str(._TODAYSDATE), "0", "0", "10"), "30", "0")
{
DOCUMENT.MED1="True"
}
Translation chart section is:
{
if DOCUMENT.MED1=="True" then " Amoxicillin 500 mg PO prescribed - Use as directed."
else ""
endif
}
In the MEL area for the entire form, I have coded as below:
{
IF MEDS_REMOVED == ("FLUTICASONE PROPIONATE 0.005 % OINT") then
DOCUMENT.FLU="False"
else IF MEDS_REMOVED == ("AMOXICILLIN 500 MG TABS") then
DOCUMENT.MED1 ="False"
else ""
endif endif
}
But this way, when FLUTICASONE button is clicked in the form, button disables, chart notes appear fine. AMOXICILLIN 500 is clicked, chart notes appear fine. but FLUTICASONE chart notes disappear. Now When I go to Update Medications list, i see both FLUTICASONE and AMOXICILLIN 500 in the list. When i remove FLUTICASONE, nothing happens as there is nothing in the chart notes. When i try to remove AMOXICILLIN, chart notes does not get removed, it stays.
How can i get it to working?
Please help.
Try replacing this code:
{
IF MEDS_REMOVED == (“FLUTICASONE PROPIONATE 0.005 % OINT”) then
DOCUMENT.FLU=”False”
else IF MEDS_REMOVED == (“AMOXICILLIN 500 MG TABS”) then
DOCUMENT.MED1 =”False”
else “”
endif endif
}
with:
{
IF match(MEDS_REMOVED("list"), "FLUTICASONE PROPIONATE 0.005 % OINT") > 0 then
DOCUMENT.FLU="False"
endif
IF match(MEDS_REMOVED("list"), "AMOXICILLIN 500 MG TABS") then
DOCUMENT.MED1 ="False"
endif
}
If it doesn't work, you can upload your form for us to look at.
Hi MIkeseale,
I tried the code, but it did not work. It keeps the chart notes. form
I'm attaching the .dlg file. please take a look. thanks.
Okay, switch out what I gave you to:
{!
IF match(MEDS_AFTER("list"), "FLUTICASONE PROPIONATE 0.005 % OINT") == 0 then
DOCUMENT.FLU="False"
endif
IF match(MEDS_AFTER("list"), "AMOXICILLIN 500 MG TABS") == 0 then
DOCUMENT.MED1 ="False"
endif
}
Perfect! this totally works. its MEDS_AFTER. thanks a lot Mikeseale.