Exemple #1
0
        private void butShowXhtml_Click(object sender, EventArgs e)
        {
            string ccd = "";

            try {
                FormEhrExportCCD FormEEC = new FormEhrExportCCD(PatCur);
                FormEEC.ShowDialog();
                if (FormEEC.DialogResult == DialogResult.OK)
                {
                    ccd = FormEEC.CCD;
                }
                else
                {
                    return;
                }
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
                return;
            }
            bool didPrint = FormEhrSummaryOfCare.DisplayCCD(ccd);

            if (didPrint)
            {
                //we are printing a ccd so add new measure event.
                EhrMeasureEvent measureEvent = new EhrMeasureEvent();
                measureEvent.DateTEvent = DateTime.Now;
                measureEvent.EventType  = EhrMeasureEventType.ClinicalSummaryProvidedToPt;
                measureEvent.PatNum     = PatCur.PatNum;
                EhrMeasureEvents.Insert(measureEvent);
                FillGridEHRMeasureEvents();
            }
        }
        private void butShowXhtml_Click(object sender, EventArgs e)
        {
            string ccd = "";

            try {
                ccd = EhrCCD.GenerateElectronicCopy(PatCur);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
                return;
            }
            FormEhrSummaryOfCare.DisplayCCD(ccd);
        }
        private void OpenFile()
        {
            EmailAttach emailAttach       = _listEmailAttachDisplayed[gridAttachments.SelectedIndices[0]];
            string      strFilePathAttach = FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), emailAttach.ActualFileName);

            try {
                if (EhrCCD.IsCcdEmailAttachment(emailAttach))
                {
                    string strTextXml = FileAtoZ.ReadAllText(strFilePathAttach);
                    if (EhrCCD.IsCCD(strTextXml))
                    {
                        Patient patEmail = null;                      //Will be null for most email messages.
                        if (_emailMessage.SentOrReceived == EmailSentOrReceived.ReadDirect || _emailMessage.SentOrReceived == EmailSentOrReceived.ReceivedDirect)
                        {
                            patEmail = _patCur;                          //Only allow reconcile if received via Direct.
                        }
                        string strAlterateFilPathXslCCD = "";
                        //Try to find a corresponding stylesheet. This will only be used in the event that the default stylesheet cannot be loaded from the EHR dll.
                        for (int i = 0; i < _listEmailAttachDisplayed.Count; i++)
                        {
                            if (Path.GetExtension(_listEmailAttachDisplayed[i].ActualFileName).ToLower() == ".xsl")
                            {
                                strAlterateFilPathXslCCD = FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), _listEmailAttachDisplayed[i].ActualFileName);
                                break;
                            }
                        }
                        FormEhrSummaryOfCare.DisplayCCD(strTextXml, patEmail, strAlterateFilPathXslCCD);
                        return;
                    }
                }
                else if (IsORU_R01message(strFilePathAttach))
                {
                    if (DataConnection.DBtype == DatabaseType.Oracle)
                    {
                        MsgBox.Show(this, "Labs not supported with Oracle.  Opening raw file instead.");
                    }
                    else
                    {
                        FormEhrLabOrderImport FormELOI = new FormEhrLabOrderImport();
                        FormELOI.Hl7LabMessage = FileAtoZ.ReadAllText(strFilePathAttach);
                        FormELOI.ShowDialog();
                        return;
                    }
                }
                FileAtoZ.OpenFile(FileAtoZ.CombinePaths(EmailAttaches.GetAttachPath(), emailAttach.ActualFileName), emailAttach.DisplayedFileName);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #4
0
        private void gridMu_CellClick(object sender, ODGridClickEventArgs e)
        {
            FormMedical FormMed;

            if (e.Col == 3)
            {
                switch (listMu[e.Row].MeasureType)
                {
                case EhrMeasureType.ProblemList:
                    FormMed = new FormMedical(PatNotCur, PatCur);
                    FormMed.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.Medical;
                    //Close();
                    break;

                case EhrMeasureType.MedicationList:
                    FormMed = new FormMedical(PatNotCur, PatCur);
                    FormMed.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.Medical;
                    //Close();
                    break;

                case EhrMeasureType.AllergyList:
                    FormMed = new FormMedical(PatNotCur, PatCur);
                    FormMed.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.Medical;
                    //Close();
                    break;

                case EhrMeasureType.Demographics:
                    FormPatientEdit FormPatEdit = new FormPatientEdit(PatCur, PatFamCur);
                    FormPatEdit.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.PatientEdit;
                    //Close();
                    break;

                case EhrMeasureType.Education:
                    FormEhrEduResourcesPat FormEDUPat = new FormEhrEduResourcesPat();
                    FormEDUPat.patCur = PatCur;
                    FormEDUPat.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.TimelyAccess:
                case EhrMeasureType.ElectronicCopyAccess:
                    FormPatientPortal FormPatPort = new FormPatientPortal();
                    FormPatPort.PatCur = PatCur;
                    FormPatPort.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.Online;
                    //Close();
                    break;

                case EhrMeasureType.ProvOrderEntry:
                case EhrMeasureType.CPOE_MedOrdersOnly:
                case EhrMeasureType.CPOE_PreviouslyOrdered:
                    //LaunchOrdersWindow();
                    break;

                case EhrMeasureType.Rx:
                    //no action available
                    break;

                case EhrMeasureType.VitalSigns:
                case EhrMeasureType.VitalSignsBMIOnly:
                case EhrMeasureType.VitalSignsBPOnly:
                case EhrMeasureType.VitalSigns2014:
                    FormVitalsigns FormVital = new FormVitalsigns();
                    FormVital.PatNum = PatNum;
                    FormVital.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.Smoking:
                    FormEhrPatientSmoking FormPS = new FormEhrPatientSmoking();
                    FormPS.PatCur = PatCur;
                    FormPS.ShowDialog();
                    PatCur = Patients.GetPat(PatNum);
                    FillGridMu();
                    break;

                case EhrMeasureType.Lab:
                    FormEhrLabOrders FormLP = new FormEhrLabOrders();
                    FormLP.PatCur = PatCur;
                    FormLP.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.ElectronicCopy:
                    if (listMu[e.Row].Action == "Provide elect copy to Pt")
                    {
                        FormEhrElectronicCopy FormE = new FormEhrElectronicCopy();
                        FormE.PatCur = PatCur;
                        FormE.ShowDialog();
                        FillGridMu();
                    }
                    break;

                case EhrMeasureType.ClinicalSummaries:
                    FormEhrClinicalSummary FormCS = new FormEhrClinicalSummary();
                    FormCS.PatCur = PatCur;
                    FormCS.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.Reminders:
                    FormEhrReminders FormRem = new FormEhrReminders();
                    FormRem.PatCur = PatCur;
                    FormRem.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.MedReconcile:
                    FormEhrSummaryOfCare FormMedRec = new FormEhrSummaryOfCare();
                    FormMedRec.PatCur = PatCur;
                    FormMedRec.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.MedReconcile;
                    //Close();
                    break;

                case EhrMeasureType.SummaryOfCare:
                    FormEhrSummaryOfCare FormSoC = new FormEhrSummaryOfCare();
                    FormSoC.PatCur = PatCur;
                    FormSoC.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.SummaryOfCareElectronic:
                    FormEhrSummaryOfCare FormSoCE = new FormEhrSummaryOfCare();
                    FormSoCE.PatCur = PatCur;
                    FormSoCE.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.SecureMessaging:
                    //Patient Sent
                    break;

                case EhrMeasureType.FamilyHistory:
                    FormMed = new FormMedical(PatNotCur, PatCur);
                    FormMed.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.ElectronicNote:
                    //Sign a Note
                    break;

                case EhrMeasureType.CPOE_LabOrdersOnly:
                    FormEhrLabOrders FormLab = new FormEhrLabOrders();
                    FormLab.PatCur = PatCur;
                    FormLab.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.CPOE_RadiologyOrdersOnly:
                    FormEhrLabOrders FormRad = new FormEhrLabOrders();
                    FormRad.PatCur = PatCur;
                    FormRad.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.LabImages:
                    FormEhrLabOrders FormLO = new FormEhrLabOrders();
                    FormLO.PatCur = PatCur;
                    FormLO.ShowDialog();
                    FillGridMu();
                    break;
                }
            }
            if (e.Col == 4)
            {
                switch (listMu[e.Row].MeasureType)
                {
                case EhrMeasureType.MedReconcile:
                    FormReferralsPatient FormRefMed = new FormReferralsPatient();
                    FormRefMed.PatNum = PatCur.PatNum;
                    FormRefMed.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.Referrals;
                    //Close();
                    break;

                case EhrMeasureType.SummaryOfCare:
                case EhrMeasureType.SummaryOfCareElectronic:
                    FormReferralsPatient FormRefSum = new FormReferralsPatient();
                    FormRefSum.PatNum = PatCur.PatNum;
                    FormRefSum.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.Referrals;
                    //Close();
                    break;

                case EhrMeasureType.Lab:
                    //Redundant now that everything is done from one window
                    break;
                }
            }
        }
Exemple #5
0
		private void gridMu_CellClick(object sender,ODGridClickEventArgs e) {
			FormMedical FormMed;
			if(e.Col==3) {
				switch(listMu[e.Row].MeasureType) {
					case EhrMeasureType.ProblemList:
						FormMed=new FormMedical(PatNotCur,PatCur);
						FormMed.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Medical;
						//Close();
						break;
					case EhrMeasureType.MedicationList:
						FormMed=new FormMedical(PatNotCur,PatCur);
						FormMed.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Medical;
						//Close();
						break;
					case EhrMeasureType.AllergyList:
						FormMed=new FormMedical(PatNotCur,PatCur);
						FormMed.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Medical;
						//Close();
						break;
					case EhrMeasureType.Demographics:
						FormPatientEdit FormPatEdit=new FormPatientEdit(PatCur, PatFamCur);
						FormPatEdit.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.PatientEdit;
						//Close();
						break;
					case EhrMeasureType.Education:
						FormEhrEduResourcesPat FormEDUPat = new FormEhrEduResourcesPat();
						FormEDUPat.patCur=PatCur;
						FormEDUPat.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.TimelyAccess:
					case EhrMeasureType.ElectronicCopyAccess:
						FormPatientPortal FormPatPort=new FormPatientPortal();
						FormPatPort.PatCur=PatCur;
						FormPatPort.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Online;
						//Close();
						break;
					case EhrMeasureType.ProvOrderEntry:
					case EhrMeasureType.CPOE_MedOrdersOnly:
					case EhrMeasureType.CPOE_PreviouslyOrdered:
						//LaunchOrdersWindow();
						break;
					case EhrMeasureType.Rx:
						//no action available
						break;
					case EhrMeasureType.VitalSigns:
					case EhrMeasureType.VitalSignsBMIOnly:
					case EhrMeasureType.VitalSignsBPOnly:
					case EhrMeasureType.VitalSigns2014:
						FormVitalsigns FormVital=new FormVitalsigns();
						FormVital.PatNum=PatNum;
						FormVital.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.Smoking:
						FormEhrPatientSmoking FormPS=new FormEhrPatientSmoking();
						FormPS.PatCur=PatCur;
						FormPS.ShowDialog();
						PatCur=Patients.GetPat(PatNum);
						FillGridMu();
						break;
					case EhrMeasureType.Lab:
						FormEhrLabOrders FormLP=new FormEhrLabOrders();
						FormLP.PatCur=PatCur;
						FormLP.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.ElectronicCopy:
						if(listMu[e.Row].Action=="Provide elect copy to Pt") {
							FormEhrElectronicCopy FormE=new FormEhrElectronicCopy();
							FormE.PatCur=PatCur;
							FormE.ShowDialog();
							FillGridMu();
						}
						break;
					case EhrMeasureType.ClinicalSummaries:
						FormEhrClinicalSummary FormCS=new FormEhrClinicalSummary();
						FormCS.PatCur=PatCur;
						FormCS.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.Reminders:
						FormEhrReminders FormRem = new FormEhrReminders();
						FormRem.PatCur=PatCur;
						FormRem.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.MedReconcile:
						FormEhrSummaryOfCare FormMedRec=new FormEhrSummaryOfCare();
						FormMedRec.PatCur=PatCur;
						FormMedRec.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.MedReconcile;
						//Close();
						break;
					case EhrMeasureType.SummaryOfCare:
						FormEhrSummaryOfCare FormSoC=new FormEhrSummaryOfCare();
						FormSoC.PatCur=PatCur;
						FormSoC.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.SummaryOfCareElectronic:
						FormEhrSummaryOfCare FormSoCE=new FormEhrSummaryOfCare();
						FormSoCE.PatCur=PatCur;
						FormSoCE.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.SecureMessaging:
						//Patient Sent
						break;
					case EhrMeasureType.FamilyHistory:
						FormMed=new FormMedical(PatNotCur,PatCur);
						FormMed.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.ElectronicNote:
						//Sign a Note
						break;
					case EhrMeasureType.CPOE_LabOrdersOnly:
						FormEhrLabOrders FormLab=new FormEhrLabOrders();
						FormLab.PatCur=PatCur;
						FormLab.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.CPOE_RadiologyOrdersOnly:
						FormEhrLabOrders FormRad=new FormEhrLabOrders();
						FormRad.PatCur=PatCur;
						FormRad.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.LabImages:
						FormEhrLabOrders FormLO=new FormEhrLabOrders();
						FormLO.PatCur=PatCur;
						FormLO.ShowDialog();
						FillGridMu();
						break;
				}
			}
			if(e.Col==4) {
				switch(listMu[e.Row].MeasureType) {
					case EhrMeasureType.MedReconcile:
						FormReferralsPatient FormRefMed=new FormReferralsPatient();
						FormRefMed.PatNum=PatCur.PatNum;
						FormRefMed.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Referrals;
						//Close();
						break;
					case EhrMeasureType.SummaryOfCare:
					case EhrMeasureType.SummaryOfCareElectronic:
						FormReferralsPatient FormRefSum=new FormReferralsPatient();
						FormRefSum.PatNum=PatCur.PatNum;
						FormRefSum.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Referrals;
						//Close();
						break;
					case EhrMeasureType.Lab:
						//Redundant now that everything is done from one window
						break;
				}
			}
		}
Exemple #6
0
        private void gridMu_CellClick(object sender, ODGridClickEventArgs e)
        {
            FormMedical FormMed;

            if (e.Col == 3)
            {
                switch (listMu[e.Row].MeasureType)
                {
                case EhrMeasureType.ProblemList:
                    FormMed = new FormMedical(PatNotCur, PatCur, "tabProblems");
                    FormMed.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.MedicationList:
                    FormMed = new FormMedical(PatNotCur, PatCur, "tabMedications");
                    FormMed.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.AllergyList:
                    FormMed = new FormMedical(PatNotCur, PatCur, "tabAllergies");
                    FormMed.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.Demographics:
                    FormPatientEdit FormPatEdit = new FormPatientEdit(PatCur, PatFamCur);
                    FormPatEdit.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.Education:
                    FormEhrEduResourcesPat FormEDUPat = new FormEhrEduResourcesPat();
                    FormEDUPat.patCur = PatCur;
                    FormEDUPat.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.TimelyAccess:
                case EhrMeasureType.ElectronicCopyAccess:
                    FormPatientPortal FormPatPort = new FormPatientPortal(PatCur);
                    FormPatPort.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.ProvOrderEntry:
                case EhrMeasureType.CPOE_MedOrdersOnly:
                case EhrMeasureType.CPOE_PreviouslyOrdered:
                    //LaunchOrdersWindow();
                    break;

                case EhrMeasureType.Rx:
                    //no action available
                    break;

                case EhrMeasureType.VitalSigns:
                case EhrMeasureType.VitalSignsBMIOnly:
                case EhrMeasureType.VitalSignsBPOnly:
                case EhrMeasureType.VitalSigns2014:
                    FormMed = new FormMedical(PatNotCur, PatCur, "tabVitalSigns");
                    FormMed.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.Smoking:
                    FormMed = new FormMedical(PatNotCur, PatCur, "tabTobaccoUse");
                    FormMed.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.Lab:
                    if (DataConnection.DBtype == DatabaseType.Oracle)
                    {
                        MsgBox.Show(this, "Labs not supported with Oracle");
                        break;
                    }
                    FormEhrLabOrders FormLP = new FormEhrLabOrders();
                    FormLP.PatCur = PatCur;
                    FormLP.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.ElectronicCopy:
                    if (listMu[e.Row].Action == "Provide elect copy to Pt")
                    {
                        FormEhrElectronicCopy FormE = new FormEhrElectronicCopy();
                        FormE.PatCur = PatCur;
                        FormE.ShowDialog();
                        FillGridMu();
                    }
                    break;

                case EhrMeasureType.ClinicalSummaries:
                    FormEhrClinicalSummary FormCS = new FormEhrClinicalSummary();
                    FormCS.PatCur = PatCur;
                    FormCS.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.Reminders:
                    FormEhrReminders FormRem = new FormEhrReminders();
                    FormRem.PatCur = PatCur;
                    FormRem.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.MedReconcile:
                    int compare = EhrMeasures.CompareReferralsToReconciles(PatNum);
                    if (compare == 1 || compare == 0)                         //Referral count is less than reconcile count or both are zero.
                    {
                        FormReferralSelect FormRS = new FormReferralSelect();
                        FormRS.IsDoctorSelectionMode = true;
                        FormRS.IsSelectionMode       = true;
                        FormRS.ShowDialog();
                        if (FormRS.DialogResult != DialogResult.OK)
                        {
                            return;
                        }
                        List <RefAttach> RefAttachList = RefAttaches.RefreshFiltered(PatNum, false, 0);
                        RefAttach        refattach     = new RefAttach();
                        refattach.ReferralNum = FormRS.SelectedReferral.ReferralNum;
                        refattach.PatNum      = PatNum;
                        refattach.RefType     = ReferralType.RefFrom;
                        refattach.RefDate     = DateTimeOD.Today;
                        if (FormRS.SelectedReferral.IsDoctor)                                 //whether using ehr or not
                        {
                            refattach.IsTransitionOfCare = true;
                        }
                        int order = 0;
                        for (int i = 0; i < RefAttachList.Count; i++)
                        {
                            if (RefAttachList[i].ItemOrder > order)
                            {
                                order = RefAttachList[i].ItemOrder;
                            }
                        }
                        refattach.ItemOrder = order + 1;
                        RefAttaches.Insert(refattach);
                        SecurityLogs.MakeLogEntry(Permissions.RefAttachAdd, PatNum, "Referred From " + Referrals.GetNameFL(refattach.ReferralNum));
                    }
                    else if (compare == -1)                           //The referral count is greater than the reconcile count.
                    //So we do not need to show the referral window, we just need to reconcile below.
                    {
                    }
                    FormEhrSummaryOfCare FormMedRec = new FormEhrSummaryOfCare();
                    FormMedRec.PatCur = PatCur;
                    FormMedRec.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.SummaryOfCare:
                    FormEhrSummaryOfCare FormSoC = new FormEhrSummaryOfCare();
                    FormSoC.PatCur = PatCur;
                    FormSoC.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.SummaryOfCareElectronic:
                    FormEhrSummaryOfCare FormSoCE = new FormEhrSummaryOfCare();
                    FormSoCE.PatCur = PatCur;
                    FormSoCE.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.SecureMessaging:
                    if (PrefC.GetInt(PrefName.MeaningfulUseTwo) == 2)                           /*Modified Stage 2*/
                    {
                        FormWebMailMessageEdit FormWMME = new FormWebMailMessageEdit(PatCur.PatNum);
                        FormWMME.ShowDialog();
                        FillGridMu();
                    }
                    break;

                case EhrMeasureType.FamilyHistory:
                    FormMed = new FormMedical(PatNotCur, PatCur, "tabFamHealthHist");
                    FormMed.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.ElectronicNote:
                    //Sign a Note
                    break;

                case EhrMeasureType.CPOE_RadiologyOrdersOnly:
                case EhrMeasureType.CPOE_LabOrdersOnly:
                    if (DataConnection.DBtype == DatabaseType.Oracle)
                    {
                        MsgBox.Show(this, "Labs not supported with Oracle");
                        break;
                    }
                    FormEhrLabOrders FormLab = new FormEhrLabOrders();
                    FormLab.PatCur = PatCur;
                    FormLab.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.LabImages:
                    if (DataConnection.DBtype == DatabaseType.Oracle)
                    {
                        MsgBox.Show(this, "Labs not supported with Oracle");
                        break;
                    }
                    FormEhrLabOrders FormLO = new FormEhrLabOrders();
                    FormLO.PatCur = PatCur;
                    FormLO.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.DrugDrugInteractChecking:
                    EhrMeasureEvent measureEventDDIC = new EhrMeasureEvent();
                    measureEventDDIC.DateTEvent = DateTime.Now;
                    measureEventDDIC.EventType  = EhrMeasureEventType.DrugDrugInteractChecking;
                    measureEventDDIC.MoreInfo   = EhrMeasureEvents.GetLatestInfoByType(EhrMeasureEventType.DrugDrugInteractChecking);
                    measureEventDDIC.IsNew      = true;
                    FormEhrMeasureEventEdit FormDDIC = new FormEhrMeasureEventEdit(measureEventDDIC);
                    FormDDIC.MeasureDescript = "Explain how you have enabled Drug-Drug Interaction Checking";
                    FormDDIC.ShowDialog();
                    if (FormDDIC.DialogResult == DialogResult.OK)
                    {
                        FillGridMu();
                    }
                    break;

                case EhrMeasureType.DrugFormularyChecking:
                    EhrMeasureEvent measureEventDFC = new EhrMeasureEvent();
                    measureEventDFC.DateTEvent = DateTime.Now;
                    measureEventDFC.EventType  = EhrMeasureEventType.DrugFormularyChecking;
                    measureEventDFC.MoreInfo   = EhrMeasureEvents.GetLatestInfoByType(EhrMeasureEventType.DrugFormularyChecking);
                    measureEventDFC.IsNew      = true;
                    FormEhrMeasureEventEdit FormDFC = new FormEhrMeasureEventEdit(measureEventDFC);
                    FormDFC.MeasureDescript = "Explain how you have enabled Drug Formulary Checks";
                    FormDFC.ShowDialog();
                    if (FormDFC.DialogResult == DialogResult.OK)
                    {
                        FillGridMu();
                    }
                    break;

                case EhrMeasureType.ProtectElectHealthInfo:
                    EhrMeasureEvent measureEventPEHI = new EhrMeasureEvent();
                    measureEventPEHI.DateTEvent = DateTime.Now;
                    measureEventPEHI.EventType  = EhrMeasureEventType.ProtectElectHealthInfo;
                    measureEventPEHI.MoreInfo   = EhrMeasureEvents.GetLatestInfoByType(EhrMeasureEventType.ProtectElectHealthInfo);
                    measureEventPEHI.IsNew      = true;
                    FormEhrMeasureEventEdit FormPEHI = new FormEhrMeasureEventEdit(measureEventPEHI);
                    FormPEHI.MeasureDescript = "Have you performed your security risk analysis?  Explain.";
                    FormPEHI.ShowDialog();
                    if (FormPEHI.DialogResult == DialogResult.OK)
                    {
                        FillGridMu();
                    }
                    break;

                case EhrMeasureType.ImmunizationRegistries:
                    EhrMeasureEvent measureEventIR = new EhrMeasureEvent();
                    measureEventIR.DateTEvent = DateTime.Now;
                    measureEventIR.EventType  = EhrMeasureEventType.ImmunizationRegistries;
                    measureEventIR.MoreInfo   = EhrMeasureEvents.GetLatestInfoByType(EhrMeasureEventType.ImmunizationRegistries);
                    measureEventIR.IsNew      = true;
                    FormEhrMeasureEventEdit FormIR = new FormEhrMeasureEventEdit(measureEventIR);
                    FormIR.MeasureDescript = "Check with your state agency for guidance and recommendations.  Usually excluded.  Explain.";
                    FormIR.ShowDialog();
                    if (FormIR.DialogResult == DialogResult.OK)
                    {
                        FillGridMu();
                    }
                    break;

                case EhrMeasureType.SyndromicSurveillance:
                    EhrMeasureEvent measureEventSS = new EhrMeasureEvent();
                    measureEventSS.DateTEvent = DateTime.Now;
                    measureEventSS.EventType  = EhrMeasureEventType.SyndromicSurveillance;
                    measureEventSS.MoreInfo   = EhrMeasureEvents.GetLatestInfoByType(EhrMeasureEventType.SyndromicSurveillance);
                    measureEventSS.IsNew      = true;
                    FormEhrMeasureEventEdit FormSS = new FormEhrMeasureEventEdit(measureEventSS);
                    FormSS.MeasureDescript = "Check with your state agency for guidance and recommendations.  Usually excluded.  Explain.";
                    FormSS.ShowDialog();
                    if (FormSS.DialogResult == DialogResult.OK)
                    {
                        FillGridMu();
                    }
                    break;

                case EhrMeasureType.PatientList:
                    FormPatListEHR2014 FormPL = new FormPatListEHR2014();
                    FormPL.ShowDialog();
                    FillGridMu();
                    break;

                case EhrMeasureType.ClinicalInterventionRules:
                    FormCdsTriggers FormET = new FormCdsTriggers();
                    FormET.ShowDialog();
                    FillGridMu();
                    break;
                }
            }
            if (e.Col == 4)
            {
                switch (listMu[e.Row].MeasureType)
                {
                case EhrMeasureType.MedReconcile:
                    int compare = EhrMeasures.CompareReferralsToReconciles(PatNum);
                    if (compare == 1 || compare == 0)
                    {
                        FormReferralSelect FormRS = new FormReferralSelect();
                        FormRS.IsDoctorSelectionMode = true;
                        FormRS.IsSelectionMode       = true;
                        FormRS.ShowDialog();
                        if (FormRS.DialogResult == DialogResult.OK)
                        {
                            List <RefAttach> RefAttachList = RefAttaches.RefreshFiltered(PatNum, false, 0);
                            RefAttach        refattach     = new RefAttach();
                            refattach.ReferralNum = FormRS.SelectedReferral.ReferralNum;
                            refattach.PatNum      = PatNum;
                            refattach.RefType     = ReferralType.RefFrom;
                            refattach.RefDate     = DateTimeOD.Today;
                            if (FormRS.SelectedReferral.IsDoctor)                                     //whether using ehr or not
                            //we're not going to ask.  That's stupid.
                            //if(MsgBox.Show(this,MsgBoxButtons.YesNo,"Is this an incoming transition of care from another provider?")){
                            {
                                refattach.IsTransitionOfCare = true;
                            }
                            int order = 0;
                            for (int i = 0; i < RefAttachList.Count; i++)
                            {
                                if (RefAttachList[i].ItemOrder > order)
                                {
                                    order = RefAttachList[i].ItemOrder;
                                }
                            }
                            refattach.ItemOrder = order + 1;
                            RefAttaches.Insert(refattach);
                            SecurityLogs.MakeLogEntry(Permissions.RefAttachAdd, PatNum, "Referred From " + Referrals.GetNameFL(refattach.ReferralNum));
                            FormMedicationReconcile FormMedRec = new FormMedicationReconcile();
                            FormMedRec.PatCur = PatCur;
                            FormMedRec.ShowDialog();
                        }
                    }
                    else if (compare == -1)
                    {
                        FormMedicationReconcile FormMedRec = new FormMedicationReconcile();
                        FormMedRec.PatCur = PatCur;
                        FormMedRec.ShowDialog();
                    }
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.Referrals;
                    //Close();
                    break;

                case EhrMeasureType.SummaryOfCare:
                case EhrMeasureType.SummaryOfCareElectronic:
                    FormReferralsPatient FormRefSum = new FormReferralsPatient();
                    FormRefSum.PatNum = PatCur.PatNum;
                    FormRefSum.ShowDialog();
                    FillGridMu();
                    //ResultOnClosing=EhrFormResult.Referrals;
                    //Close();
                    break;

                case EhrMeasureType.Lab:
                    //Redundant now that everything is done from one window
                    break;

                case EhrMeasureType.CPOE_RadiologyOrdersOnly:
                    if (DataConnection.DBtype == DatabaseType.Oracle)
                    {
                        MsgBox.Show(this, "Labs not supported with Oracle");
                        break;
                    }
                    //As of v15.4 we started storing radiology orders at the procedure level by flagging the procedure itself as IsCpoe.
                    //Show the radiology order window which will be the best way for the provider to mark "radiology orders" as CPOE.
                    FormRadOrderList FormROL = new FormRadOrderList(Security.CurUser);
                    FormROL.ShowDialog();                            //Do not use a non-modal window in this case due to needing to refresh the grid after closing.
                    //FormEhrLabOrders FormRad=new FormEhrLabOrders();
                    //FormRad.PatCur=PatCur;
                    //FormRad.ShowDialog();
                    FillGridMu();
                    break;
                }
            }
        }
Exemple #7
0
		private void gridMu_CellClick(object sender,ODGridClickEventArgs e) {
			FormMedical FormMed;
			if(e.Col==3) {
				switch(listMu[e.Row].MeasureType) {
					case EhrMeasureType.ProblemList:
						FormMed=new FormMedical(PatNotCur,PatCur);
						FormMed.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Medical;
						//Close();
						break;
					case EhrMeasureType.MedicationList:
						FormMed=new FormMedical(PatNotCur,PatCur);
						FormMed.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Medical;
						//Close();
						break;
					case EhrMeasureType.AllergyList:
						FormMed=new FormMedical(PatNotCur,PatCur);
						FormMed.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Medical;
						//Close();
						break;
					case EhrMeasureType.Demographics:
						FormPatientEdit FormPatEdit=new FormPatientEdit(PatCur, PatFamCur);
						FormPatEdit.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.PatientEdit;
						//Close();
						break;
					case EhrMeasureType.Education:
						FormEhrEduResourcesPat FormEDUPat = new FormEhrEduResourcesPat();
						FormEDUPat.patCur=PatCur;
						FormEDUPat.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.TimelyAccess:
					case EhrMeasureType.ElectronicCopyAccess:
						FormPatientPortal FormPatPort=new FormPatientPortal();
						FormPatPort.PatCur=PatCur;
						FormPatPort.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Online;
						//Close();
						break;
					case EhrMeasureType.ProvOrderEntry:
					case EhrMeasureType.CPOE_MedOrdersOnly:
					case EhrMeasureType.CPOE_PreviouslyOrdered:
						//LaunchOrdersWindow();
						break;
					case EhrMeasureType.Rx:
						//no action available
						break;
					case EhrMeasureType.VitalSigns:
					case EhrMeasureType.VitalSignsBMIOnly:
					case EhrMeasureType.VitalSignsBPOnly:
					case EhrMeasureType.VitalSigns2014:
						FormVitalsigns FormVital=new FormVitalsigns();
						FormVital.PatNum=PatNum;
						FormVital.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.Smoking:
						FormEhrPatientSmoking FormPS=new FormEhrPatientSmoking();
						FormPS.PatCur=PatCur;
						FormPS.ShowDialog();
						PatCur=Patients.GetPat(PatNum);
						FillGridMu();
						break;
					case EhrMeasureType.Lab:
						if(DataConnection.DBtype==DatabaseType.Oracle) {
							MsgBox.Show(this,"Labs not supported with Oracle");
							break;
						}
						FormEhrLabOrders FormLP=new FormEhrLabOrders();
						FormLP.PatCur=PatCur;
						FormLP.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.ElectronicCopy:
						if(listMu[e.Row].Action=="Provide elect copy to Pt") {
							FormEhrElectronicCopy FormE=new FormEhrElectronicCopy();
							FormE.PatCur=PatCur;
							FormE.ShowDialog();
							FillGridMu();
						}
						break;
					case EhrMeasureType.ClinicalSummaries:
						FormEhrClinicalSummary FormCS=new FormEhrClinicalSummary();
						FormCS.PatCur=PatCur;
						FormCS.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.Reminders:
						FormEhrReminders FormRem = new FormEhrReminders();
						FormRem.PatCur=PatCur;
						FormRem.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.MedReconcile:
						int compare=EhrMeasures.CompareReferralsToReconciles(PatNum);
						if(compare==1 || compare==0) {//Referral count is less than reconcile count or both are zero.
							FormReferralSelect FormRS=new FormReferralSelect();
							FormRS.IsDoctorSelectionMode=true;
							FormRS.IsSelectionMode=true;
							FormRS.ShowDialog();
							if(FormRS.DialogResult!=DialogResult.OK) {
								return;
							}
							List<RefAttach> RefAttachList=RefAttaches.RefreshFiltered(PatNum,false,0);
							RefAttach refattach=new RefAttach();
							refattach.ReferralNum=FormRS.SelectedReferral.ReferralNum;
							refattach.PatNum=PatNum;
							refattach.IsFrom=true;
							refattach.RefDate=DateTimeOD.Today;
							if(FormRS.SelectedReferral.IsDoctor) {//whether using ehr or not
								refattach.IsTransitionOfCare=true;
							}
							int order=0;
							for(int i=0;i<RefAttachList.Count;i++) {
								if(RefAttachList[i].ItemOrder > order) {
									order=RefAttachList[i].ItemOrder;
								}
							}
							refattach.ItemOrder=order+1;
							RefAttaches.Insert(refattach);
							SecurityLogs.MakeLogEntry(Permissions.RefAttachAdd,PatNum,"Referred From "+Referrals.GetNameFL(refattach.ReferralNum));
						}
						else if(compare==-1) {//The referral count is greater than the reconcile count.
							//So we do not need to show the referral window, we just need to reconcile below.
						}
						FormEhrSummaryOfCare FormMedRec=new FormEhrSummaryOfCare();
						FormMedRec.PatCur=PatCur;
						FormMedRec.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.MedReconcile;
						//Close();
						break;
					case EhrMeasureType.SummaryOfCare:
						FormEhrSummaryOfCare FormSoC=new FormEhrSummaryOfCare();
						FormSoC.PatCur=PatCur;
						FormSoC.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.SummaryOfCareElectronic:
						FormEhrSummaryOfCare FormSoCE=new FormEhrSummaryOfCare();
						FormSoCE.PatCur=PatCur;
						FormSoCE.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.SecureMessaging:
						//Patient Sent
						break;
					case EhrMeasureType.FamilyHistory:
						FormMed=new FormMedical(PatNotCur,PatCur);
						FormMed.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.ElectronicNote:
						//Sign a Note
						break;
					case EhrMeasureType.CPOE_LabOrdersOnly:
						if(DataConnection.DBtype==DatabaseType.Oracle) {
							MsgBox.Show(this,"Labs not supported with Oracle");
							break;
						}
						FormEhrLabOrders FormLab=new FormEhrLabOrders();
						FormLab.PatCur=PatCur;
						FormLab.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.CPOE_RadiologyOrdersOnly:
						if(DataConnection.DBtype==DatabaseType.Oracle) {
							MsgBox.Show(this,"Labs not supported with Oracle");
							break;
						}
						FormEhrLabOrders FormRad=new FormEhrLabOrders();
						FormRad.PatCur=PatCur;
						FormRad.ShowDialog();
						FillGridMu();
						break;
					case EhrMeasureType.LabImages:
						if(DataConnection.DBtype==DatabaseType.Oracle) {
							MsgBox.Show(this,"Labs not supported with Oracle");
							break;
						}
						FormEhrLabOrders FormLO=new FormEhrLabOrders();
						FormLO.PatCur=PatCur;
						FormLO.ShowDialog();
						FillGridMu();
						break;
				}
			}
			if(e.Col==4) {
				switch(listMu[e.Row].MeasureType) {
					case EhrMeasureType.MedReconcile:
						int compare=EhrMeasures.CompareReferralsToReconciles(PatNum);
						if(compare==1 || compare==0) {
							FormReferralSelect FormRS=new FormReferralSelect();
							FormRS.IsDoctorSelectionMode=true;
							FormRS.IsSelectionMode=true;
							FormRS.ShowDialog();
							if(FormRS.DialogResult==DialogResult.OK) {
								List<RefAttach> RefAttachList=RefAttaches.RefreshFiltered(PatNum,false,0);
								RefAttach refattach=new RefAttach();
								refattach.ReferralNum=FormRS.SelectedReferral.ReferralNum;
								refattach.PatNum=PatNum;
								refattach.IsFrom=true;
								refattach.RefDate=DateTimeOD.Today;
								if(FormRS.SelectedReferral.IsDoctor) {//whether using ehr or not
									//we're not going to ask.  That's stupid.
									//if(MsgBox.Show(this,MsgBoxButtons.YesNo,"Is this an incoming transition of care from another provider?")){
									refattach.IsTransitionOfCare=true;
								}
								int order=0;
								for(int i=0;i<RefAttachList.Count;i++) {
									if(RefAttachList[i].ItemOrder > order) {
										order=RefAttachList[i].ItemOrder;
									}
								}
								refattach.ItemOrder=order+1;
								RefAttaches.Insert(refattach);
								SecurityLogs.MakeLogEntry(Permissions.RefAttachAdd,PatNum,"Referred From "+Referrals.GetNameFL(refattach.ReferralNum));
								FormMedicationReconcile FormMedRec=new FormMedicationReconcile();
								FormMedRec.PatCur=PatCur;
								FormMedRec.ShowDialog();
							}
						}
						else if(compare==-1) {
							FormMedicationReconcile FormMedRec=new FormMedicationReconcile();
							FormMedRec.PatCur=PatCur;
							FormMedRec.ShowDialog();
						}
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Referrals;
						//Close();
						break;
					case EhrMeasureType.SummaryOfCare:
					case EhrMeasureType.SummaryOfCareElectronic:
						FormReferralsPatient FormRefSum=new FormReferralsPatient();
						FormRefSum.PatNum=PatCur.PatNum;
						FormRefSum.ShowDialog();
						FillGridMu();
						//ResultOnClosing=EhrFormResult.Referrals;
						//Close();
						break;
					case EhrMeasureType.Lab:
						//Redundant now that everything is done from one window
						break;
				}
			}
		}