private void butAdd_Click(object sender, EventArgs e) { List <string> listItems = new List <string>(); for (int i = 0; i < Enum.GetNames(typeof(EhrNotPerformedItem)).Length; i++) { listItems.Add(Enum.GetNames(typeof(EhrNotPerformedItem))[i]); } InputBox chooseItem = new InputBox(Lan.g(this, "Select the item not being performed from the list below."), listItems); if (chooseItem.ShowDialog() != DialogResult.OK) { return; } if (chooseItem.comboSelection.SelectedIndex == -1) { MsgBox.Show(this, "You must select an item that is not being performed from the list of available items."); return; } FormEhrNotPerformedEdit FormEE = new FormEhrNotPerformedEdit(); FormEE.EhrNotPerfCur = new EhrNotPerformed(); FormEE.EhrNotPerfCur.IsNew = true; FormEE.EhrNotPerfCur.PatNum = PatCur.PatNum; FormEE.EhrNotPerfCur.ProvNum = PatCur.PriProv; FormEE.EhrNotPerfCur.DateEntry = DateTime.Now; FormEE.SelectedItemIndex = chooseItem.comboSelection.SelectedIndex; //Send in the int of index of selected item FormEE.ShowDialog(); FillGrid(); }
private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { FormEhrNotPerformedEdit FormEE = new FormEhrNotPerformedEdit(); FormEE.EhrNotPerfCur = listNotPerf[e.Row]; FormEE.SelectedItemIndex = (int)Enum.Parse(typeof(EhrNotPerformedItem), gridMain.ListGridRows[e.Row].Cells[2].Text, true); //Parse the text displayed from the enum and convert to int FormEE.ShowDialog(); FillGrid(); }
private void butAdd_Click(object sender,EventArgs e) { List<string> listItems=new List<string>(); for(int i=0;i<Enum.GetNames(typeof(EhrNotPerformedItem)).Length;i++) { listItems.Add(Enum.GetNames(typeof(EhrNotPerformedItem))[i]); } InputBox chooseItem=new InputBox(Lan.g(this,"Select the item not being performed from the list below."),listItems); if(chooseItem.ShowDialog()!=DialogResult.OK) { return; } if(chooseItem.comboSelection.SelectedIndex==-1) { MsgBox.Show(this,"You must select an item that is not being performed from the list of available items."); return; } FormEhrNotPerformedEdit FormEE=new FormEhrNotPerformedEdit(); FormEE.EhrNotPerfCur=new EhrNotPerformed(); FormEE.EhrNotPerfCur.IsNew=true; FormEE.EhrNotPerfCur.PatNum=PatCur.PatNum; FormEE.EhrNotPerfCur.ProvNum=PatCur.PriProv; FormEE.EhrNotPerfCur.DateEntry=DateTime.Now; FormEE.SelectedItemIndex=chooseItem.comboSelection.SelectedIndex;//Send in the int of index of selected item FormEE.ShowDialog(); FillGrid(); }
private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) { FormEhrNotPerformedEdit FormEE=new FormEhrNotPerformedEdit(); FormEE.EhrNotPerfCur=listNotPerf[e.Row]; FormEE.SelectedItemIndex=(int)Enum.Parse(typeof(EhrNotPerformedItem),gridMain.Rows[e.Row].Cells[2].Text,true);//Parse the text displayed from the enum and convert to int FormEE.ShowDialog(); FillGrid(); }
private void butOK_Click(object sender, System.EventArgs e) { Patient PatOld=PatCur.Copy(); PatCur.Premed=checkPremed.Checked; PatCur.MedUrgNote=textMedUrgNote.Text; Patients.Update(PatCur,PatOld); PatientNoteCur.Medical=textMedical.Text; PatientNoteCur.Service=textService.Text; PatientNoteCur.MedicalComp=textMedicalComp.Text; PatientNotes.Update(PatientNoteCur, PatCur.Guarantor); //Insert an ehrmeasureevent for CurrentMedsDocumented if user selected Yes and there isn't one with today's date if(radioMedsDocumentedYes.Checked && _EhrMeasureEventNum==0) { EhrMeasureEvent ehrMeasureEventCur=new EhrMeasureEvent(); ehrMeasureEventCur.PatNum=PatCur.PatNum; ehrMeasureEventCur.DateTEvent=DateTime.Now; ehrMeasureEventCur.EventType=EhrMeasureEventType.CurrentMedsDocumented; ehrMeasureEventCur.CodeValueEvent="428191000124101";//SNOMEDCT code for document current meds procedure ehrMeasureEventCur.CodeSystemEvent="SNOMEDCT"; EhrMeasureEvents.Insert(ehrMeasureEventCur); } //No is selected, if no EhrNotPerformed item for current meds documented, launch not performed edit window to allow user to select valid reason. if(radioMedsDocumentedNo.Checked) { if(_EhrNotPerfNum==0) { FormEhrNotPerformedEdit FormNP=new FormEhrNotPerformedEdit(); FormNP.EhrNotPerfCur=new EhrNotPerformed(); FormNP.EhrNotPerfCur.IsNew=true; FormNP.EhrNotPerfCur.PatNum=PatCur.PatNum; FormNP.EhrNotPerfCur.ProvNum=PatCur.PriProv; FormNP.SelectedItemIndex=(int)EhrNotPerformedItem.DocumentCurrentMeds; FormNP.EhrNotPerfCur.DateEntry=DateTime.Today; FormNP.IsDateReadOnly=true; FormNP.ShowDialog(); if(FormNP.DialogResult==DialogResult.OK) {//if they just inserted a not performed item, set the private class-wide variable for the next if statement _EhrNotPerfNum=FormNP.EhrNotPerfCur.EhrNotPerformedNum; } } if(_EhrNotPerfNum>0 && _EhrMeasureEventNum>0) {//if not performed item is entered with today's date, delete existing performed item EhrMeasureEvents.Delete(_EhrMeasureEventNum); } } DialogResult=DialogResult.OK; }
private void checkNotPerf_Click(object sender,EventArgs e) { if(checkNotPerf.Checked) { FormEhrNotPerformedEdit FormNP=new FormEhrNotPerformedEdit(); if(VitalsignCur.EhrNotPerformedNum==0) { FormNP.EhrNotPerfCur=new EhrNotPerformed(); FormNP.EhrNotPerfCur.IsNew=true; FormNP.EhrNotPerfCur.PatNum=patCur.PatNum; FormNP.EhrNotPerfCur.ProvNum=patCur.PriProv; FormNP.SelectedItemIndex=(int)EhrNotPerformedItem.BMIExam;//The code and code value will be set in FormEhrNotPerformedEdit, set the selected index to the EhrNotPerformedItem enum index for BMIExam FormNP.EhrNotPerfCur.DateEntry=PIn.Date(textDateTaken.Text); FormNP.IsDateReadOnly=true;//if this not performed item will be linked to this exam, force the dates to match. User can change exam date and recheck the box to affect the not performed item date, but forcing them to be the same will allow us to avoid other complications. } else { FormNP.EhrNotPerfCur=EhrNotPerformeds.GetOne(VitalsignCur.EhrNotPerformedNum); FormNP.EhrNotPerfCur.IsNew=false; FormNP.SelectedItemIndex=(int)EhrNotPerformedItem.BMIExam; } FormNP.ShowDialog(); if(FormNP.DialogResult==DialogResult.OK) { VitalsignCur.EhrNotPerformedNum=FormNP.EhrNotPerfCur.EhrNotPerformedNum; textReasonCode.Text=FormNP.EhrNotPerfCur.CodeValueReason; Snomed sCur=Snomeds.GetByCode(FormNP.EhrNotPerfCur.CodeValueReason); if(sCur!=null) { textReasonDescript.Text=sCur.Description; } } else { checkNotPerf.Checked=false; textReasonCode.Clear(); textReasonDescript.Clear(); if(EhrNotPerformeds.GetOne(VitalsignCur.EhrNotPerformedNum)==null) {//could be linked to a not performed item that no longer exists or has been deleted VitalsignCur.EhrNotPerformedNum=0; } } } else { textReasonCode.Clear(); textReasonDescript.Clear(); } }