I am looking for some code that will force the user to put in a value into a specific OBS within the form.
I was thiking of using userok message but not sure how to lay it out.
Thanks!
Here was my first take on it but I don't know if I am way off here.
{If OBSNOW("PLAN_NUMBER")=="" <> "" then userok("Please input Care Plan Number you are currently working on:" + "\r\n" + "\r\n" + DCT_AFTER() + "\r\n" + "\r\n" + "") else"" endif}
Also would I put this in the global section or in the drop down list that I want to be verified?
Thanks!
George
Page Close Handler is the mechanism to force data entry on a form. If you are using VFE it is on the Page dialog and there is a check box to turn it on.
VFE help:
A page close handler can be configured to be called when the page is closed (user goes to another page in the current form, another form or closes the form). This is a MEL expression which can call the data symbol closepage("FALSE") to prevent the page from closing if desired. However, the closepage function only works if the user navigates to another page in the current form or presses the Prev, Next or Close buttons. It does not prevent the page from closing if the EMR "times out" or if the page/form is changed through an action button. To prevent the page from closing in these situations, the expression must also include a return FALSE statement and the appropriate options must be selected in the Program Options and Item Configuration dialogs.
Unlike automated page close handlers, custom page close handlers can allow displaying messages only to individuals with certain jobs/roles. In addition, they allow more complex processing, such as prompting the user to add Tobacco abuse to the problem list if current cigarette use has been selected.
The above example will prevent a user with the job title "Medical Assistant" from closing the page if a height has never been entered for the patient.
NOTE: Unlike the documentation within Centricity® EMR, the proper syntax to prevent the page from closing is closepage("FALSE"), not closepage(FALSE). However, the return value from the expression to prevent closing the page should be the boolean value FALSE, NOT the string. See the example above which shows proper syntax for both of these expressions.