Does anyone know how after a "print handout" button is clicked, it will also make a check box checked, pushing text to the note?
Both my button and check box work independently. Clicking the check box pushes text, but then when clicking the "print handout" button - the check box unchecks and the text disappears.
My "Print Handout" button: RUN PROCESS
{
PRINTHANDOUT("Handouts\Controlled Substances\MAT - INFORMED CONSENT FOR BUPRENORPHINE")
MEL_ADD_DIRECTIVE("Informed Consent for Buprenorphine (Suboxone) Treatment",str(._TODAYSDATE))
OBSNOW("SUBOXTXAGRMT","Printed, reviewed and given to patient to sign")
}
My Text Box: NEW OBSERVATION "SUBOXTXAGRMT"
Text Translation:
{if (OBSNOW("SUBOXTXAGRMT")"") then
"Informed Consent for Buprenorphine (Suboxone) Treatment printed, reviewed and given to patient to sign"+ HRET
else ""
endif}
Try adding:
{
PRINTHANDOUT(“Handouts\Controlled Substances\MAT – INFORMED CONSENT FOR BUPRENORPHINE”)
MEL_ADD_DIRECTIVE(“Informed Consent for Buprenorphine (Suboxone) Treatment”,str(._TODAYSDATE))
OBSNOW(“SUBOXTXAGRMT”,”Printed, reviewed and given to patient to sign”)
document.yourvariablename = "your statment"
}
EDIT:
I do my buttons with multiple commands with separate {}, for example:
{PRINTHANDOUT(“Handouts\Controlled Substances\MAT – INFORMED CONSENT FOR BUPRENORPHINE”)}
{MEL_ADD_DIRECTIVE(“Informed Consent for Buprenorphine (Suboxone) Treatment”,str(._TODAYSDATE))}
{OBSNOW(“SUBOXTXAGRMT”,”Printed, reviewed and given to patient to sign”)}
{document.yourvariablename = "your statment"}
Not sure if it makes a difference or not, just the way I've always done it.
My Text Box: NEW OBSERVATION “SUBOXTXAGRMT”
Text Translation:
{if OBSNOW(“SUBOXTXAGRMT")<>”” then
“Informed Consent for Buprenorphine (Suboxone) Treatment printed, reviewed and given to patient to sign”+ HRET
else “”
endif}
What is your statement value for your Check Box? Your Check Box is placing that exact value into the Obs Term "SUBOXTXAGRMT", so for it to remain checked it is looking for this exact value to stay the same.
You are then placing the value of "Printed, reviewed and given to patient to sign" into the Obs Term "SUBOXTXAGRMT" when you click on your Print Handout Button. I would assume that this value that you are placing into the Obs Term for this Button does not exactly match the defined value on the Check Box.
Yes, I see that now. My text box statement value is blank, where as the run process button value is pushing "Printed, reviewed and given to patient to sign".
{if (OBSNOW("SUBOXTXAGRMT")"") then
"Informed Consent for Buprenorphine (Suboxone) Treatment printed, reviewed and given to patient to sign"+ HRET
else ""
endif}
I'll try changing the Run Process value to what I would like the text to be, and then change the "" to == "Informed Consent for Buprenorphine (Suboxone) Treatment printed, reviewed and given to patient to sign", for both.
Updating the Check Box statements to match the button statement worked for checking the box, and keeping the box checked. But now the there is no text translation. I've tried replacing the text in quote below with CFMT((OBSANY("SUBOXTXAGRMT"), "", "", "B", "") but that didn't work.
What am I missing with the text translation here?
Check Box Chart Note Translation box:
{if (OBSNOW("SUBOXTXAGRMT")"Patient/Provider Informed Consent for Buprenorphine (Suboxone) Treatment printed, reviewed and given to patient to sign") then
"Patient/Provider Informed Consent for Buprenorphine (Suboxone) Treatment printed, reviewed and given to patient to sign"+ HRET
else ""
endif}