[2] Locate "frmClinicalNotes" and the "OnAfterSaveRecord" event
[3] Copy & Paste the following script into the Script Editor :-
- Code: Select all
frmClinicalNotes frm = (Params[0] as frmClinicalNotes);
if (frm != null)
{
if (frm.ActivePage.Record is cSess)
{
cSess sess = (frm.ActivePage.Record as cSess);
sess.locked = true;
sess.Save();
}
frm.RefreshData();
}
[4] Click OK
To test this out, try adding some SESSION NOTES and for a patient and then click the SAVE button. Notice that the session record is immediately locked after clicking save.