Has anyone created a load comand in the Text Component\Custom Age-Specific Load Commands to check if an observation is less then or equal to ._todaysdate?
Theresa Savage
RWJMG
I'm not sure if this is exactly what you need, but hopefully it helps. We use it to load a form to do urinary incontinence and fall assessment screenings for patients 65 and over.
{
global a = DURATIONDAYS(LASTOBSDATE("PQRI MEAS 4"),str(._TODAYSDATE))
global b = DURATIONDAYS(LASTOBSDATE("PQRI MEAS 48"),str(._TODAYSDATE))
if PATIENT.FORMATTEDAGE >= 65 AND PATIENT.SEX = "F" then
if OBSANY("PQRI MEAS 4") == "" or OBSANY("PQRI MEAS 48") == "" then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","2")
else if ( val(a) > 364) or (val(b) > 364) then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","2")
else ""
endif endif
else if PATIENT.FORMATTEDAGE >= 65 AND PATIENT.SEX = "M" then
if OBSANY("PQRI MEAS 4") == "" then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","2")
else if val(a) > 364 then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","2")
else ""
endif endif
else ""
endif
endif
}
Mitch Kwiatkowski said:
I'm not sure if this is exactly what you need, but hopefully it helps. We use it to load a form to do urinary incontinence and fall assessment screenings for patients 65 and over.
{
global a = DURATIONDAYS(LASTOBSDATE("PQRI MEAS 4"),str(._TODAYSDATE))
global b = DURATIONDAYS(LASTOBSDATE("PQRI MEAS 48"),str(._TODAYSDATE))
if PATIENT.FORMATTEDAGE >= 65 AND PATIENT.SEX = "F" then
if OBSANY("PQRI MEAS 4") == "" or OBSANY("PQRI MEAS 48") == "" then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","2")
else if ( val(a) > 364) or (val(b) > 364) then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","2")
else ""
endif endif
else if PATIENT.FORMATTEDAGE >= 65 AND PATIENT.SEX = "M" then
if OBSANY("PQRI MEAS 4") == "" then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","2")
else if val(a) > 364 then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","2")
else ""
endif endif
else ""
endif
endif
}
WHere would this live? Is this a text component?
lmecklenburg said:
WHere would this live? Is this a text component?
That was my plan to use a text component, but I was not able to get it to work I kept getting a MEL error.
Theresa Savage
Yes, we have it in a text component. I forgot to mention that this would/should work in CPS 10 or higher. If you're on CPS 9.5, you have to change the ADD_FORM_COMP parameters a bit. CPS 10 and higher requires an ordinal value noting where the new form will be inserted - hence the "2". Prior to that, you could use something like AFTER_CURRENT (I don't remember the exact options). That could be where you're running into a problem. You can also leave that blank and see where the form goes.
we are using Centricity EMR 9.5 not CPS would it work in? I have used the ADD_FORM_COMP before in a Text Component. I will re-look at it again maybe I have to modif it a bit.
I am trying to get a form to load based on problem- Diabetes. I have been able to get it to recognize the dx but it does not open the form but instead of adding the form in the correct position it takes you to the add text component box. Any suggestions?
treesavage63 said:
we are using Centricity EMR 9.5 not CPS would it work in? I have used the ADD_FORM_COMP before in a Text Component. I will re-look at it again maybe I have to modif it a bit.
Here's the version we had in CPS 9.5. In the document template, we put the text component where we wanted the form to appear. It should also work for EMR 9.5.
{
global a = DURATIONDAYS(LASTOBSDATE("PQRI MEAS 4"),str(._TODAYSDATE))
global b = DURATIONDAYS(LASTOBSDATE("PQRI MEAS 48"),str(._TODAYSDATE))
if PATIENT.FORMATTEDAGE >= 65 AND PATIENT.SEX = "F" then
if OBSANY("PQRI MEAS 4") == "" or OBSANY("PQRI MEAS 48") == "" then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","AFTER_CURRENT")
else if ( val(a) > 364) or (val(b) > 364) then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","AFTER_CURRENT")
else ""
endif endif
else if PATIENT.FORMATTEDAGE >= 65 AND PATIENT.SEX = "M" then
if OBSANY("PQRI MEAS 4") == "" then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","AFTER_CURRENT")
else if val(a) > 364 then
ADD_FORM_COMP("Enterprise\PPCP","UI/Falls Risk Assessment","AFTER_CURRENT")
else ""
endif endif
else ""
endif
endif
}
lmecklenburg said:
I am trying to get a form to load based on problem- Diabetes. I have been able to get it to recognize the dx but it does not open the form but instead of adding the form in the correct position it takes you to the add text component box. Any suggestions?
Check to make sure you're using ADD_FORM_COMP instead of something like INSERT_COMP which would open up the dialog box to choose a form or text component. Usually, if you have the wrong form in the MEL parameters (e.g., you mispelled the name), it won't do anything. If that's all correct, could you post your text component code?
We use a text component to pull in our Diabetes form as well. This is my code:
{if match(PROB_AFTER("delimited"),"ICD-250.00")>1 then
ADD_FORM_COMP("Enterprise", "Diabetes Recognition Program", "AFTER_CURRENT", "") else "" endif}
Thanks. This worked. Now I am moving forward to add it for Dx of DM as well as insurance of Medicare B. Gotta love PQRS