Here is what we want:
Pop-up to evaluate If Colonoscopy Obs Value is populated with normal or abnormal anywhere in the value. If it is (and is within 10 years) we want to push a snomed code.
If it is populated with anything but normal or abnormal, we want to display the value in that box along with value date and ask them to determine if it is normal or abnormal; then it would push the snomed code.
If it isn't populated at all; prompt them to order screening colonoscopy (obviously we will add age ranges)
We basically are having problems trying to get it to evaluate "containing values" of normal or abnormal. LAST_SIGNED_OBS_DATE("COLONOSCOPY") CONTAINS "normal"
Any help would be greatly appreciated
Take a look at the match command in MEL.
description
When passed a string and a substring, returns the position of the substring in the string.
type
MEL utility function
syntax
match(string, [start,] substring)
arguments
string |
A string against which the substring’s existence is being tested |
substring |
A string to look for start. The position to start looking from. If this argument is not present, the default is 1 (beginning of the string). |
returns
0 if the substring is not found, >0 if the substring is found. The return value is the starting position in string of substring.
example
{global mystr = "New and Improved"
global pos = match(mystr,1, "Improved")
pos}
returns
9
match(OBSNOW("Chief Cmplnt"), "vomiting")>0 OR
match(DOCUMENT.TEMP_83443931_1_580294, "vomiting")>0
This example, from the HPI - Sick Child form component, uses match to control a visibility region.
where used
Encounter Form Editor: MEL expressions