Hello All,
I would like to use the page close handler to trigger the printing of a handout based on age. In the page close handler I have a function that is called. It looks to see if the handouts have been printed this year and then does something like this:
local patientAge = PATIENT_AGE()
COND
CASE patientAge < 3
//just be a fit kid
PRINTHANDOUT("Handouts\PPCP\Be A Fit Kid")
OBSNOW("WMHANDOTCOM", "printed")
return "done"
CASE patientAge >=3 AND patientAge < 6
//be a fit kid and healthy eating
PRINTHANDOUT("Handouts\PPCP\Be A Fit Kid")
PRINTHANDOUT("Handouts\PPCP\Healthy Eating Tips")
OBSNOW("WMHANDOTCOM", "printed")
return "done"
CASE patientAge >=6 AND patientAge <= 18
// healthy eating and physical activity
PRINTHANDOUT("Handouts\PPCP\Healthy Eating Tips")
PRINTHANDOUT("Handouts\PPCP\Youth Physical Activity Recommendations")
OBSNOW("WMHANDOTCOM", "printed")
return "done"
ENDCOND
(Sorry for the ugly formatting above.) I am consistently getting CPS to crash when this is called. In the case of the older patients the first printhandout is skipped and then the other statements are executed. Then I get an error message that says: Error occurred in class , method PatientEdHandoutDlg::OnPrint and then CPS crashes. Has anyone run into this error message before?
Thanks,
Brad
I now experience this issue when calling the PRINTHANDOUT process in all custom forms since upgrading to CPS 12.3