I've been asked to create a Psychiatric Form (Suicidal Ideation) and I wonder if someone can assist me in coming up with the correct MEL Logic for the following scenario. I'm imagining using visibility regions for these, but I'm open to other suggestions.
The provider is directed to ask two (2) Yes/No questions. If the patient responds Yes to Q1, the form should load an "Intensity of Ideation' section.
If the patient answers Yes to Q2, then there are Q's 3-5, plus the 'Intensity of Ideation' section that should load.
If the patient answers No to both Q1 and Q2, they skip Q's 3-5 and the 'Intensity of Ideation' section and instead a 'Suicidal Behavior' form should load.
It sounds like you will need to do something like this:
1 visibility region (Intensity of Ideation) with the below code:
DOCUMENT.Q1 = "Yes" or DOCUMENT.Q2 = "Yes"
Under that visibility region, to save space, add the below code (Suicidal Behavior):
DOCUMENT.Q1 = "No" and DOCUMENT.Q2 = "No"
In a different area, just add another visibility region with the below code (Questions 3-5):
DOCUMENT.Q2 = "Yes"
You can of course do the formatting how you please, but that should take care of popping up the appropriate fields as necessary.
does anyone know the MEL expression to automatically add a medication order (mel_add_medication) from the list from the following expression.
/*To get the Active Med list*/
!fn fnMedList(strList)
{
local i
local MedArray
local nStart
local strBuf
local strFormattedList = ""
MedArray = getfield(strList, "|", "")
for i = 1, i <= size(MedArray), i = i + 1 do
MedArray[i] = getfield(MedArray[i], "^", "")
/* Need to remove commas from medication name */
strBuf = tolower(MedArray[i][1])
strBuf = set(strBuf, 1, toupper(get(strBuf, 1))) + " " + MedArray[i][7]
strBuf = ReplaceStr(strBuf, ",", ";")
strFormattedList = strFormattedList + strBuf + ","
endfor
if (i > 1) then
strFormattedList = remove(strFormattedList, size(strFormattedList))
endif
return (strFormattedList)}
this expression creates a list of active medication the individual is on and would like to check the box and automatically create a discharge rx.