Does anyone know how I can get the check box options to populate the commenst box so users can add additonal details to the items selected?
Thanks!
ROS_DDA5.dlg
I cannot the attachment to work...can anyone help?
{DOCUMENT.MLEF = CFMT(DOCUMENT.CHECK, "", "pretext", "", "posttext") + CFMT(DOCUMENT.LIST, "", "pretext", "", "posttext") + CFMT(DOCUMENT.DROP, "", "pretext", "", "posttext")}
I cant get that to work. Here is the MEL code for the ROS functions.... I basically need the OBS values to populate the comment box (once they have checked the values from the check boxes) so they can add detail..
!fn fnGetROSStatus(strSystem, strSystemPos, strSystemNeg, strSystemComment)
{
if (strSystemPos <> "") then
return ("+")
endif
if (strSystemComment <> "") then
return ("C")
endif
if (strSystemNeg <> "") then
return ("-")
endif
if (match(DOCUMENT.RELEVANT_SYSTEMS, strSystem)) then
return ("O")
endif
return ("")
}
{
!DOCUMENT.RELEVANT_SYSTEMS
}
{ fnStoreObservation("ROS:GENERAL", DOCUMENT.GENERAL_POSITIVE, DOCUMENT.GENERAL_NEGATIVE, DOCUMENT.GENERAL_COMMENT) }
{ fnStoreObservation("ROS EYES", DOCUMENT.EYES_POSITIVE, DOCUMENT.EYES_NEGATIVE, DOCUMENT.EYES_COMMENT) }
{ fnStoreObservation("ROS ENT", DOCUMENT.ENT_POSITIVE, DOCUMENT.ENT_NEGATIVE, DOCUMENT.ENT_COMMENT) }
{ fnStoreObservation("ROS BREAST", DOCUMENT.BREAST_POSITIVE, DOCUMENT.BREAST_NEGATIVE, DOCUMENT.BREAST_COMMENT) }
{ fnStoreObservation("ROS: CARDIAC", DOCUMENT.CARDIOVASCULAR_POSITIVE, DOCUMENT.CARDIOVASCULAR_NEGATIVE, DOCUMENT.CARDIOVASCULAR_COMMENT) }
{ fnStoreObservation("ROS:PULMON", DOCUMENT.RESPIRATORY_POSITIVE, DOCUMENT.RESPIRATORY_NEGATIVE, DOCUMENT.RESPIRATORY_COMMENT) }
{ fnStoreObservation("ROS: GI", DOCUMENT.GI_POSITIVE, DOCUMENT.GI_NEGATIVE, DOCUMENT.GI_COMMENT) }
{ fnStoreObservation("ROS: GU", DOCUMENT.GU_POSITIVE, DOCUMENT.GU_NEGATIVE, DOCUMENT.GU_COMMENT) }
{ fnStoreObservation("ROS:MUSCSKEL", DOCUMENT.MUSCULOSKELETAL_POSITIVE, DOCUMENT.MUSCULOSKELETAL_NEGATIVE, DOCUMENT.MUSCULOSKELETAL_COMMENT) }
{ fnStoreObservation("ROS SKIN", DOCUMENT.SKIN_POSITIVE, DOCUMENT.SKIN_NEGATIVE, DOCUMENT.SKIN_COMMENT) }
{ fnStoreObservation("ROS: NEURO", DOCUMENT.NEUROLOGIC_POSITIVE, DOCUMENT.NEUROLOGIC_NEGATIVE, DOCUMENT.NEUROLOGIC_COMMENT) }
{ fnStoreObservation("ROS: PSYCH", DOCUMENT.PSYCH_POSITIVE, DOCUMENT.PSYCH_NEGATIVE, DOCUMENT.PSYCH_COMMENT) }
{ fnStoreObservation("ROS ENDO", DOCUMENT.ENDOCRINE_POSITIVE, DOCUMENT.ENDOCRINE_NEGATIVE, DOCUMENT.ENDOCRINE_COMMENT) }
{ fnStoreObservation("ROS HEME", DOCUMENT.HEME_POSITIVE, DOCUMENT.HEME_NEGATIVE, DOCUMENT.HEME_COMMENT) }
{ fnStoreObservation("ROS ALLERG", DOCUMENT.ALLERGIC_POSITIVE, DOCUMENT.ALLERGIC_NEGATIVE, DOCUMENT.ALLERGIC_COMMENT) }
fn fnStoreObservation(strObsTerm, strComplains, strDenies, strComment)
{
local strBuf = ""
if strComplains == "" then "" else
if strComplains == "see HPI" then
strBuf = "See HPI. " else
if match(strComplains,1,"see HPI") > 0 then
strBuf = "See HPI, " + "Patient complains of" + remove(strComplains,1,8) + ". " else
strBuf = "Patient complains of " + strComplains + ". "
endif
endif
endif
if strDenies == "" then "" else
if strDenies == "see HPI. " then
strBuf = strBuf + "See HPI" else
if match(strDenies,1,"see HPI") > 0 then
strBuf = strBuf + "See HPI, " + "Patient denies" + remove(strDenies,1,8) + ". " else
strBuf = strBuf + "Patient denies " + strDenies + ". "
endif
endif
endif
strBuf = strBuf + strComment
OBSNOW(strObsTerm, strBuf)
}
?
So you want the result of
{fnStoreObservation("ROS:GENERAL", DOCUMENT.GENERAL_POSITIVE, DOCUMENT.GENERAL_NEGATIVE, DOCUMENT.GENERAL_COMMENT)}
which is OBSNOW("ROS:GENERAL")
to be put back into DOCUMENT.GENERAL_COMMENT???
This would result in:
pos, neg, comment
pos, neg, pos, neg, comment
pos, neg, pos, neg, pos, neg, comment
...
or do you have another comment field?
In which case, DOCUMENT.mlef = OBSNOW("ROS:GENERAL") + OBSNOW("ROS EYES") + etc
I have a comment field for each system - so I would need the value of whichever OBSNOW ROS to go into it's respective comment field so the providers can add details to each item as needed.
Bascially, they want to check the check box and edit the value as needed.... grrrrrr
OK, but you're passing the comment field into your function and adding it to the obs term. If you try to set your comment field to the obsterm, it will trigger the function again, and add it again and again and again.
YUP! I just got it working but it is re-evaluating over and over.... I am trying to find a way to make this work for them the way they want it....
The form has two options - one for check boxes and one for drop downs (obviously they add details to the drop downs but they can only select one thing at a time).... they want their cake too!!!
OK...I would try this:
create a hidden comment field...DOCUMENT.GENERAL_HIDDEN
{if DOCUMENT.GENERAL_COMMENT == ""
or DOCUMENT.GENERAL_COMMENT == DOCUMENT.GENERAL_HIDDEN then
DOCUMENT.GENERAL_HIDDEN = fnStoreObservation("ROS:GENERAL", DOCUMENT.GENERAL_POSITIVE, DOCUMENT.GENERAL_NEGATIVE)
DOCUMENT.GENERAL_COMMENT = DOCUMENT.GENERAL_HIDDEN
endif}
This will set your comment field until editing has been done. If you change any of the other fields after editing has been done, you will have to clear the comment field for it to repopulate.
I forgot to say...
take the strcomment stuff out of your function.
the last idea would add your editing to your obsterm.
Try number 2:
create a hidden comment field…DOCUMENT.GENERAL_HIDDEN
{if OBSNOW("ROS:GENERAL") == ""
or OBSNOW("ROS:GENERAL") == DOCUMENT.GENERAL_HIDDEN then
DOCUMENT.GENERAL_HIDDEN = fnStoreObservation(DOCUMENT.GENERAL_POSITIVE, DOCUMENT.GENERAL_NEGATIVE)
OBSNOW("ROS:GENERAL") = DOCUMENT.GENERAL_HIDDEN
endif}
take the setting of OBSNOW and strcomment stuff out of your function.
change your comment field to be connected to your obsterm.
add return strbuf at the bottom of your function.
Thank you. I have tried to put into the form and I the comment box does not populate with the values and the hidden fileds display in the chart note translation... I think I may just let them know that the form just cannot do all the functions they need....
THANK YOU!!!!!!