Would like to request a bunch of hooks to be added to Open Dental to make it work with our biometric & multi-factor authentication software OmniDefend.
1. Hook in function "FormLogOn_Load" at line 61
File - "\opendental\forms\FormLogOn.cs"
Function - "private void FormLogOn_Load(object sender,EventArgs e)"
Code: Select all
FillListBox();
this.Focus();//Attempted fix, customers had issue with UI not defaulting focus to this form on startup.
textSelectOnLoad.Select();//Give focus to appropriate text box.
Plugins.HookAddCode(this, "FormLogOn.Load_end");
}
File - "\opendental\forms\FormProgramLinkEdit.cs"
Function - "private void FillGrid()"
Code: Select all
private void FillGrid(){
List<ProgramProperty> ProgramPropertiesForProgram=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
Plugins.HookAddCode(this, "FormProgramLinkEdit_FillGrid_GetProgramProperties", ProgramPropertiesForProgram, ProgramCur);
gridMain.BeginUpdate();
gridMain.Columns.Clear();
File - "\opendental\forms\FormRxEdit.cs"
Function - "private bool SaveRx()"
Code: Select all
RxPatCur.ClinicNum=(comboClinic.SelectedClinicNum==-1 ? RxPatCur.ClinicNum : comboClinic.SelectedClinicNum);//If no selection, don't change the ClinicNum
// hook for additional authorization before prescription is saved
bool[] authorized = new bool[1] { false };
if (Plugins.HookMethod(this, "FormRxEdit.SaveRx_Authorize", authorized, prov, RxPatCur, _rxPatOld))
{
if (!authorized[0])
return false;
}
//pharmacy is set when using pick button.
if (IsNew){
File - "\opendental\main modules\ContrChart.cs"
Function - "private void Tool_eRx_Click(bool isShowRefillsAndErrors=false)"
Code: Select all
DoseSpot.ValidateProvider(prov,clinicNum);
// hook for additional authorization before prescription is saved
bool[] authorized = new bool[1] { false };
if (Plugins.HookMethod(this, "ContraChart.Tool_eRx_Click_Authorize", authorized, prov))
{
if (!authorized[0])
isDoseSpotAccessAllowed = false;
}
string provNpi =Regex.Replace(prov.NationalProvID,"[^0-9]*","");//NPI with all non-numeric characters removed.
File - "\opendental\main modules\ContrChart.cs"
Function - "private void Tool_eRx_Click(bool isShowRefillsAndErrors=false)"
Code: Select all
Erx.ValidateProv(prov);
// hook for additional authorization before prescription is saved
bool[] authorized = new bool[1] { false };
if (Plugins.HookMethod(this, "ContraChart.Tool_eRx_Click_Authorize", authorized, prov))
{
if (!authorized[0])
throw new Exception(Lans.g("Erx", "Provider is not authenticated"));
}
Erx.ValidatePat(PatCur);
File - "\opendental\main modules\ContrStaff.cs"
Function - "private void butClockIn_Click(object sender,System.EventArgs e)"
Code: Select all
try{
bool[] authorized = new bool[1] { false };
if (Plugins.HookMethod(this, "ContrStaff.butClockIn_Click_ClockIn", authorized, EmployeeCur))
{
if (!authorized[0])
throw new Exception(Lans.g(this, "You need to authenticate to clock-in"));
}
ClockEvents.ClockIn(EmployeeCur.EmployeeNum);
}
File - "\opendental\main modules\ContrStaff.cs"
Function - "private void butClockOut_Click(object sender,System.EventArgs e)"
Code: Select all
try{
bool[] authorized = new bool[1] { false };
if (Plugins.HookMethod(this, "ContrStaff.butClockOut_Click_ClockOut", authorized, EmployeeCur, _listShownTimeClockStatuses[listStatus.SelectedIndex]))
{
if (!authorized[0])
throw new Exception(Lans.g(this, "You need to authenticate to clock-out"));
}
ClockEvents.ClockOut(EmployeeCur.EmployeeNum,_listShownTimeClockStatuses[listStatus.SelectedIndex]);
}
File - "\OpenDental\Forms\FormOpenDental.cs"
Function - "private void FinishLogOff(bool isForced)"
Code: Select all
private void FinishLogOff(bool isForced) {
if(this.InvokeRequired) {
this.Invoke(() => { FinishLogOff(isForced); });
return;
}
Plugins.HookAddCode(this, "FormOpenDental.LogOffNow_start", isForced); // perform logoff
LastModule = myOutlookBar.SelectedIndex;
myOutlookBar.SelectedIndex=-1;