This is an easy question on the DUE NOW buttons I am making in VFE (I think)... when you have to convert an obs to a value like I did below with 'PHQ9_T_LAST' where in Centricity can you look beforehand (like with BMI) to see if it is a string, value etc.? Or do I need to build a Crystal Report?
{cond case lastobsdate('DEPRESSIONFU')=="" and lastobsdate('PHQ9_T_LAST') >"0" and val(lastobsvalue("PHQ9_T_LAST")) >="3"and PATIENT._AGEINMONTHS >= 144 "DUE NOW" case durationdays(lastobsdate('DEPRESSIONFU'),sub(str(document.clinicaldate),1,10))>360 and val(lastobsvalue("PHQ9_T_LAST")) >="3"and PATIENT._AGEINMONTHS >= 144 "DUE NOW" else "" endcond}
All observation terms and document variables are strings. What are you having issues with in your code?
Thanks, that was easy. I will just always use convert them if I need to (for greater than/less than checks etc.). When I order custom obs terms it asks for the data type, I guess that field is irrelevant.
Thanks, that was easy. I will just always use convert them if I need to (for greater than/less than checks etc.). When I order custom obs terms it asks for the data type, I guess that field is irrelevant.
They are irrelevant in your code, but they are used in the flowsheet and other places. These are used so that you know a "55" in the HEIGHT obs term is in inches and not centimeters. Lab results also benefit from these.
But text and number are the only options on the data type field on the order form. I do use the others quite a bit.. units etc. so I know what you mean, those are helpful.
When you use the val(...) before comparing to a number, you do not need quotes around the compared number:
val( lastobsvalue("PHQ9_T_LAST") ) >= 3
- Beverly
Thanks, that makes sense, I will try it like that for the next one