I want to have a dropdown that contains a list of problems. I want the list to just have the description followed by the code like:
ASTHMA, ACUTE (ICD-493.92)
CERVICAL SPONDYLOSIS WITHOUT MYELOPATHY (ICD-721.0)
I could just use PROB_PRIOR("comma") as the MEL expression that results in a comma separated list. But, then the dropdown options will be
ASTHMA
ACUTE (ICD-493.92)
CERVICAL SPONDYLOSIS WITHOUT MYELOPATHY (ICD-721.0)
I've seen a CCC-CPOE A&P form that has this. Anyone know how to accomplish it?
--jrea
try REPLACESTR(REPLACESTR(PROB_PRIOR("list"), ",", " -"), hret, ",")
Thanks Jerroll. I've done something very similar to this already, but I'd like to keep the problem description the same (i.e. without changing comma to hyphen). That way, I change check against problems with the same description and code, and do things like add assessments, etc.
There is a CCC form called CPOE A&P that somehow has dropdown choices that include commas. I'm really not sure yet how they accomplished this, but I'd like to figure it out.
ok...
try REPLACESTR(REPLACESTR(PROB_PRIOR("list"), ",", "\,"), hret, ",")
holy cow, that works!
If I put that into a data display, I get:
CHRONIC MIGRAINE W/O AURA W/INTRACTABLE W/SM (ICD-346.73),MULTIPLE SCLEROSIS (ICD-340),ASTHMA\, EXERCISE INDUCED (ICD-493.81),
But, the drop down options look like:
CHRONIC MIGRAINE W/O AURA W/INTRACTABLE W/SM (ICD-346.73)
MULTIPLE SCLEROSIS (ICD-340)
ASTHMA, EXERCISE INDUCED (ICD-493.81)
I have no idea where that backslash goes, but I guess it really doesn't matter....
Thanks jjordet.
Thanks
don't do the outer REPLACESTR when putting it into a data display.
Yea, I just wanted to put it into a data display to confirm that the slash was still in the string. For a dynamic dropdown, you're trying to create a string with elements separated by commas right? So how does the "\" disappear for the dropdown option?
the '\' means to treat the next character as a special character (\t = tab, \n\r = hret, \, = treat as part of string, \b = bold, \b0 = stop bolding, \\ = \, etc.). special characters show in data displays, but not in translations.
I see. sneaky.....
Thanks Jerroll. Many thanks...
What about a listbox? This method works well for a dropdown. And, it will display the correct options for a listbox. However, when I select one of the listbox choices that contains a comma, it immediately deselects itself.
Any ideas?
sorry. never had that issue.