I have a handout to pull in medications for asthma when documented in the chart note. The below MEL statement will pull in medication dose and frequency, my problem is if they choose medication 1 and then medication 3 it is skipping a line between medications in the handout? (so if they pick medication 1 and then medication 10 there is 9 spaces between the medications) Below is only medication 1-3. I just need it to pull into handout like
Medication 1 dose and freq
Medication 3 dose and freq (or which ever # med they pick) with no space between meds
not sure why after i post this it takes away one of my " after my obs terms?
{IF LASTOBSVALUE ("AAP GZ MED1") = "" + LASTOBSVALUE ("AAPGZDOSE1") =="" + LASTOBSVALUE ("AAPGZFREQ1") =="" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED1") +" "+ LASTOBSVALUE ("AAPGZDOSE1") +" "+ LASTOBSVALUE ("AAPGZFREQ1") ENDIF}
{IF LASTOBSVALUE ("AAP GZ MED2") = "" + LASTOBSVALUE ("AAPGZDOSE2") =="" + LASTOBSVALUE ("AAPGZFREQ2") =="" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED2") +" "+ LASTOBSVALUE ("AAPGZDOSE2") +" "+ LASTOBSVALUE ("AAPGZFREQ2") ENDIF}
{IF LASTOBSVALUE ("AAP GZ MED3") = "" + LASTOBSVALUE ("AAPGZDOSE3") =="" + LASTOBSVALUE ("AAPGZFREQ3") =="" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED3") +" "+ LASTOBSVALUE ("AAPGZDOSE3") +" "+ LASTOBSVALUE ("AAPGZFREQ3") ENDIF}
also tried (and it does the same leaves space between med 1 and 3
{IF LASTOBSVALUE ("AAP GZ MED1") = "" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED1") +" "+ LASTOBSVALUE ("AAPGZDOSE1") +" "+ LASTOBSVALUE ("AAPGZFREQ1") ENDIF}
{IF LASTOBSVALUE ("AAP GZ MED2") = "" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED2") +" "+ LASTOBSVALUE ("AAPGZDOSE2") +" "+ LASTOBSVALUE ("AAPGZFREQ2") ENDIF}
{IF LASTOBSVALUE ("AAP GZ MED3") = "" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED3") +" "+ LASTOBSVALUE ("AAPGZDOSE3") +" "+ LASTOBSVALUE ("AAPGZFREQ3") ENDIF}
Each of your if statements is on its own line - your pressed return after the }
I think you want to run them all together, but also utilize the HRET command.I would think the HRET to be part of each segment, immediately prior to your ENDIF}
See the following:
description
Adds a hard return (carriage return)
type
MEL utility function
syntax
HRET
arguments
N/A
returns
A new line
comment
This can be used instead of a /par or /n or "
" in forms, particularly data displays where the if any of the above are used other unwanted characters are displayed.
DO NOT enclose in quotes.
example
{"Patients current problems include:" + HRET + PROB_AFTER()}
Patients current problems include:
URI (ICD-465.9)
FRACTURE, ANKLE, RIGHT (ICD-824.8)
S/P MYRINGOTOMY (CPT-69420)
i separated it above but this is what it looks like.
{IF LASTOBSVALUE ("AAP GZ MED1") = "" + LASTOBSVALUE ("AAPGZDOSE1") =="" + LASTOBSVALUE ("AAPGZFREQ1") =="" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED1") +" "+ LASTOBSVALUE ("AAPGZDOSE1") +" "+ LASTOBSVALUE ("AAPGZFREQ1") ENDIF}
{IF LASTOBSVALUE ("AAP GZ MED2") = "" + LASTOBSVALUE ("AAPGZDOSE2") =="" + LASTOBSVALUE ("AAPGZFREQ2") =="" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED2") +" "+ LASTOBSVALUE ("AAPGZDOSE2") +" "+ LASTOBSVALUE ("AAPGZFREQ2") ENDIF}
{IF LASTOBSVALUE ("AAP GZ MED3") = "" + LASTOBSVALUE ("AAPGZDOSE3") =="" + LASTOBSVALUE ("AAPGZFREQ3") =="" THEN "" ELSE LASTOBSVALUE ("AAP GZ MED3") +" "+ LASTOBSVALUE ("AAPGZDOSE3") +" "+ LASTOBSVALUE ("AAPGZFREQ3") ENDIF}
i will try the hret. Thanks
too many line separations between your curly braces I would imagine. I found that some MEL puts in their own trailing return and the addition of your own will throw it off even further.
I would suggest
}{
...ENDIF }{IF...
or
...ENDIF
}{
IF...
That worked thanks
As already mentioned you want to utilize the HRET command so try something like the following, where it is all one continuous line with the HRET command as part of your Else statements:
{IF LASTOBSVALUE (“AAP GZ MED1″) = “” + LASTOBSVALUE (“AAPGZDOSE1″) ==”” + LASTOBSVALUE (“AAPGZFREQ1″) ==”” THEN “” ELSE LASTOBSVALUE (“AAP GZ MED1″) +” “+ LASTOBSVALUE (“AAPGZDOSE1″) +” “+ LASTOBSVALUE (“AAPGZFREQ1″) + HRET ENDIF}{IF LASTOBSVALUE (“AAP GZ MED2″) = “” + LASTOBSVALUE (“AAPGZDOSE2″) ==”” + LASTOBSVALUE (“AAPGZFREQ2″) ==”” THEN “” ELSE LASTOBSVALUE (“AAP GZ MED2″) +” “+ LASTOBSVALUE (“AAPGZDOSE2″) +” “+ LASTOBSVALUE (“AAPGZFREQ2″) + HRET ENDIF}{IF LASTOBSVALUE (“AAP GZ MED3″) = “” + LASTOBSVALUE (“AAPGZDOSE3″) ==”” + LASTOBSVALUE (“AAPGZFREQ3″) ==”” THEN “” ELSE LASTOBSVALUE (“AAP GZ MED3″) +” “+ LASTOBSVALUE (“AAPGZDOSE3″) +” “+ LASTOBSVALUE (“AAPGZFREQ3″) + HRET ENDIF}