Exemplo n.º 1
0
		private void butPickProv_Click(object sender,EventArgs e) {
			FormProviderPick FormP=new FormProviderPick();
			if(comboProv.SelectedIndex>-1) {
				FormP.SelectedProvNum=ProviderC.ListShort[comboProv.SelectedIndex].ProvNum;
			}
			FormP.ShowDialog();
			if(FormP.DialogResult!=DialogResult.OK) {
				return;
			}
			comboProv.SelectedIndex=Providers.GetIndex(FormP.SelectedProvNum);
			_provNumSelected=FormP.SelectedProvNum;
		}
Exemplo n.º 2
0
        private void butChangeProvFrom_Click(object sender, EventArgs e)
        {
            FormProviderPick FormPP = new FormProviderPick(checkDeletedProvs.Checked ? Providers.GetDeepCopy() : _listActiveProvs);

            FormPP.ShowDialog();
            if (FormPP.DialogResult == DialogResult.OK)
            {
                Provider selectedProv = Providers.GetProv(FormPP.SelectedProvNum);
                textAbbrFrom.Text     = selectedProv.Abbr;
                textProvNumFrom.Text  = POut.Long(selectedProv.ProvNum);
                textNpiFrom.Text      = selectedProv.NationalProvID;
                textFullNameFrom.Text = selectedProv.FName + " " + selectedProv.LName;
                CheckUIState();
            }
        }
Exemplo n.º 3
0
        private void butPickProv_Click(object sender, EventArgs e)
        {
            FormProviderPick FormP = new FormProviderPick(_listProvs);

            if (listConditionValues.SelectedIndices.Count > 0)           //Initial FormP selection
            {
                FormP.SelectedProvNum = _listProvs[listConditionValues.SelectedIndices[0]].ProvNum;
            }
            FormP.ShowDialog();
            if (FormP.DialogResult != DialogResult.OK)
            {
                return;
            }
            listConditionValues.SelectedIndices.Add(_listProvs.FindIndex(x => x.ProvNum == FormP.SelectedProvNum));
        }
Exemplo n.º 4
0
        private void butChangeProvInto_Click(object sender, EventArgs e)
        {
            FormProviderPick FormPP = new FormProviderPick(_listActiveProvs);

            FormPP.ShowDialog();
            if (FormPP.DialogResult == DialogResult.OK)
            {
                Provider selectedProv = Providers.GetProv(FormPP.SelectedProvNum);
                textAbbrInto.Text     = selectedProv.Abbr;
                textProvNumInto.Text  = POut.Long(selectedProv.ProvNum);
                textNpiInto.Text      = selectedProv.NationalProvID;
                textFullNameInto.Text = selectedProv.FName + " " + selectedProv.LName;
                CheckUIState();
            }
        }
Exemplo n.º 5
0
        private void butPickPrimary_Click(object sender, EventArgs e)
        {
            FormProviderPick FormPP = new FormProviderPick(_listProviders);

            if (comboPriProv.SelectedIndex > -1)             //Initial FormP selection if selected prov is not hidden.
            {
                FormPP.SelectedProvNum = _provNumSelected;
            }
            FormPP.ShowDialog();
            if (FormPP.DialogResult != DialogResult.OK)
            {
                return;
            }
            comboPriProv.SelectedIndex = _listProviders.FindIndex(x => x.ProvNum == FormPP.SelectedProvNum);
            _provNumSelected           = FormPP.SelectedProvNum;
        }
Exemplo n.º 6
0
        private void butPickProv_Click(object sender, EventArgs e)
        {
            FormProviderPick FormP = new FormProviderPick();

            if (comboProv.SelectedIndex > -1)
            {
                FormP.SelectedProvNum = _listProviders[comboProv.SelectedIndex].ProvNum;
            }
            FormP.ShowDialog();
            if (FormP.DialogResult != DialogResult.OK)
            {
                return;
            }
            comboProv.SelectedIndex = Providers.GetIndex(FormP.SelectedProvNum);
            _provNumSelected        = FormP.SelectedProvNum;
        }
Exemplo n.º 7
0
        private void butPickProv_Click(object sender, EventArgs e)
        {
            FormProviderPick formp = new FormProviderPick();

            if (comboProv.SelectedIndex > -1)
            {
                formp.SelectedProvNum = ProviderC.ListShort[comboProv.SelectedIndex].ProvNum;
            }
            formp.ShowDialog();
            if (formp.DialogResult != DialogResult.OK)
            {
                return;
            }
            comboProv.SelectedIndex = Providers.GetIndex(formp.SelectedProvNum);
            //ProcCur.ProvNum=formp.SelectedProvNum;
        }
Exemplo n.º 8
0
        private void butPickProv_Click(object sender, EventArgs e)
        {
            FormProviderPick formP = new FormProviderPick();

            if (comboProvNum.SelectedIndex > -1)             //Initial formP selection if selected prov is not hidden.
            {
                formP.SelectedProvNum = _provNumSelected;
            }
            formP.ShowDialog();
            if (formP.DialogResult != DialogResult.OK)
            {
                return;
            }
            comboProvNum.SelectedIndex = Providers.GetIndex(formP.SelectedProvNum);
            _provNumSelected           = formP.SelectedProvNum;
        }
Exemplo n.º 9
0
        private void butPickProv_Click(object sender, EventArgs e)
        {
            FormProviderPick FormProvPick = new FormProviderPick(_listProviders);

            if (FormProvPick.ShowDialog() == DialogResult.OK)
            {
                comboProv.SelectedIndex = -1;
                foreach (ODBoxItem <Provider> boxItemProvCur in comboProv.Items.OfType <ODBoxItem <Provider> >())
                {
                    if (boxItemProvCur.Tag.ProvNum == FormProvPick.SelectedProvNum)
                    {
                        comboProv.SelectedItem = boxItemProvCur;
                        break;
                    }
                }
            }
        }
        private void butWebSchedPickProv_Click(object sender, EventArgs e)
        {
            FormProviderPick FormPP = new FormProviderPick();

            if (comboWebSchedProviders.SelectedIndex > 0)
            {
                FormPP.SelectedProvNum = _webSchedProvNum;
            }
            FormPP.ShowDialog();
            if (FormPP.DialogResult != DialogResult.OK)
            {
                return;
            }
            comboWebSchedProviders.SelectedIndex = _listWebSchedProviders.FindIndex(x => x.ProvNum == FormPP.SelectedProvNum) + 1;      //+1 for 'All'
            _webSchedProvNum = FormPP.SelectedProvNum;
            FillGridWebSchedTimeSlotsThreaded();
        }
Exemplo n.º 11
0
        private void butProvSelect_Click(object sender, EventArgs e)
        {
            FormProviderPick FormPP = new FormProviderPick();

            FormPP.ShowDialog();
            if (FormPP.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (FormPP.SelectedProvNum != _medLabCur.ProvNum)
            {
                if (!MsgBox.Show(this, MsgBoxButtons.YesNo, "Update all lab tests and results for this specimen with the selected ordering provider?"))
                {
                    return;
                }
            }
            Provider prov = Providers.GetProv(FormPP.SelectedProvNum);

            for (int i = 0; i < ListMedLabs.Count; i++)
            {
                ListMedLabs[i].OrderingProvLName   = prov.LName;
                ListMedLabs[i].OrderingProvFName   = prov.FName;
                ListMedLabs[i].OrderingProvNPI     = prov.NationalProvID;
                ListMedLabs[i].OrderingProvLocalID = prov.ProvNum.ToString();
                ListMedLabs[i].ProvNum             = prov.ProvNum;
                MedLabs.Update(ListMedLabs[i]);
            }
            string provName = prov.LName;

            if (provName != "" && prov.FName != "")
            {
                provName += ", ";
            }
            provName += prov.FName;
            textPhysicianName.Text = provName;
            textPhysicianNPI.Text  = prov.NationalProvID;
            textPhysicianID.Text   = prov.ProvNum.ToString();
        }
Exemplo n.º 12
0
		private void butProvPick_Click(object sender,EventArgs e) {
			//This button is used instead of a dropdown because the order of providers can frequently change in the grid.
			Cache.Refresh(InvalidType.Providers);//Get the most recent information from the cache so we do not have null references to providers
			FormProviderPick formPick=new FormProviderPick();
			formPick.IsNoneAvailable=true;
			formPick.ShowDialog();
			if(formPick.DialogResult!=DialogResult.OK) {
				return;
			}
			_provNumMoveTo=formPick.SelectedProvNum;
			if(_provNumMoveTo>0) {
				Provider provTo=Providers.GetProv(_provNumMoveTo);
				textMoveTo.Text=provTo.GetLongDesc();
			}
			else {
				textMoveTo.Text="None";
			}
		}
		private void butProvPicker_Click(object sender,EventArgs e) {
			FormProviderPick FormPP=new FormProviderPick();
			FormPP.ShowDialog();
			if(FormPP.DialogResult!=DialogResult.OK) {
				return;
			}
			Provider prov=Providers.GetProv(FormPP.SelectedProvNum);
			if(prov.NationalProvID!="") {
				textOrderingProvIdentifier.Text=prov.NationalProvID;
				comboOrderingProvIdType.SelectedIndex=(int)HL70203.NPI+1;
				textOrderingProvAANID.Text="";
				textOrderingProvAAUID.Text="2.16.840.1.113883.4.6";//NPI OID
				textOrderingProvAAUIDType.Text="ISO";
			}
			else {
				textOrderingProvIdentifier.Text=prov.ProvNum.ToString();
				comboOrderingProvIdType.SelectedIndex=(int)HL70203.PRN+1;
				textOrderingProvAANID.Text="";
				textOrderingProvAAUID.Text=OIDInternals.GetForType(IdentifierType.Provider).IDRoot;//Internal OID
				textOrderingProvAAUIDType.Text="ISO";
			}
			comboOrderingProvNameType.SelectedIndex=(int)HL70200.L+1;
			textOrderingProvFirstName.Text=prov.FName;
			textOrderingProvLastName.Text=prov.LName;
			textOrderingProvMiddleName.Text=prov.MI;
		}
Exemplo n.º 14
0
		private void butProvSelect_Click(object sender,EventArgs e) {
			FormProviderPick FormPP=new FormProviderPick();
			FormPP.ShowDialog();
			if(FormPP.DialogResult!=DialogResult.OK) {
				return;
			}
			if(FormPP.SelectedProvNum!=_medLabCur.ProvNum) {
				if(!MsgBox.Show(this,MsgBoxButtons.YesNo,"Update all lab tests and results for this specimen with the selected ordering provider?")) {
					return;
				}
			}
			Provider prov=Providers.GetProv(FormPP.SelectedProvNum);
			for(int i=0;i<ListMedLabs.Count;i++) {
				ListMedLabs[i].OrderingProvLName=prov.LName;
				ListMedLabs[i].OrderingProvFName=prov.FName;
				ListMedLabs[i].OrderingProvNPI=prov.NationalProvID;
				ListMedLabs[i].OrderingProvLocalID=prov.ProvNum.ToString();
				ListMedLabs[i].ProvNum=prov.ProvNum;
				MedLabs.Update(ListMedLabs[i]);
			}
			string provName=prov.LName;
			if(provName!="" && prov.FName!="") {
				provName+=", ";
			}
			provName+=prov.FName;
			textPhysicianName.Text=provName;
			textPhysicianNPI.Text=prov.NationalProvID;
			textPhysicianID.Text=prov.ProvNum.ToString();
		}
Exemplo n.º 15
0
 private void butPickProv_Click(object sender,EventArgs e)
 {
     FormProviderPick formp=new FormProviderPick();
     if(comboProv.SelectedIndex > -1) {
         formp.SelectedProvNum=ProviderC.ListShort[comboProv.SelectedIndex].ProvNum;
     }
     formp.ShowDialog();
     if(formp.DialogResult!=DialogResult.OK) {
         return;
     }
     comboProv.SelectedIndex=Providers.GetIndex(formp.SelectedProvNum);
     //ProcCur.ProvNum=formp.SelectedProvNum;
 }
Exemplo n.º 16
0
		void menuItemProv_Click(object sender,EventArgs e) {
			//throw new NotImplementedException();
			Appointment apt=Appointments.GetOneApt(PIn.Long(pinBoard.SelectedAppt.DataRoww["AptNum"].ToString()));
			Appointment oldApt=apt.Clone();
			if(apt==null) {
				MessageBox.Show("Appointment not found.");
				return;
			}
			long provNum=apt.ProvNum;
			if(apt.IsHygiene) {
				provNum=apt.ProvHyg;
			}
			FormProviderPick formPick=new FormProviderPick();
			formPick.SelectedProvNum=provNum;
			formPick.ShowDialog();
			if(formPick.DialogResult!=DialogResult.OK) {
				return;
			}
			if(formPick.SelectedProvNum==provNum) {
				return;//provider not changed.
			}
			if(apt.IsHygiene) {
				apt.ProvHyg=formPick.SelectedProvNum;
			}
			else {
				apt.ProvNum=formPick.SelectedProvNum;
			}
			List<Procedure> procsForSingleApt=Procedures.GetProcsForSingle(apt.AptNum,false);
			List<long> codeNums=new List<long>();
			for(int p=0;p<procsForSingleApt.Count;p++) {
				codeNums.Add(procsForSingleApt[p].CodeNum);
			}
			string calcPattern=Appointments.CalculatePattern(apt.ProvNum,apt.ProvHyg,codeNums,true);
			if(apt.Pattern != calcPattern) {
				if(!apt.TimeLocked || MsgBox.Show(this,MsgBoxButtons.YesNo,"Appointment length is locked.  Change length for new provider anyway?")) {
					apt.Pattern=calcPattern;
				}
			}
			Appointments.Update(apt,oldApt);
			Procedures.SetProvidersInAppointment(apt,procsForSingleApt);
			ModuleSelected(PatCur.PatNum);
			DataRow row=null;
			if(apt.AptStatus==ApptStatus.Planned) {
				row=Appointments.RefreshOneApt(apt.AptNum,true).Tables["Appointments"].Rows[0];
			}
			else {
				row=Appointments.RefreshOneApt(apt.AptNum,false).Tables["Appointments"].Rows[0];
			}
			if(row==null) {
				return;
			}
			pinBoard.ResetData(row);
			//MessageBox.Show(Providers.GetAbbr(apt.ProvNum));
		}
Exemplo n.º 17
0
		private void butCreateQRDAs_Click(object sender,EventArgs e) {
			if(comboProv.SelectedIndex==-1) {
				MsgBox.Show(this,"Please select a provider first.");
				return;
			}
			if(listQ==null) {
				MsgBox.Show(this,"Click Refresh first.");
				return;
			}
			long provSelected=listProvsKeyed[comboProv.SelectedIndex].ProvNum;
			if(_provNum!=provSelected) {
				MsgBox.Show(this,"The values in the grid do not apply to the provider selected.  Click Refresh first.");
				return;
			}
			Provider provDefault=Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv));
			long provNumLegal=provDefault.ProvNum;
			//The practice default provider may be set to a non-person, like Apple Tree Dental, in which case there is no first name allowed and an NPI number does not make sense.
			//Prompt user to select the provider to set as the legal authenticator for the QRDA documents.
			//The Legal Authenticator must have a valid first name, last name, and NPI number and is the "single person legally responsible for the document" and "must be a person".
			if(provDefault.IsNotPerson) {
				MsgBox.Show(this,"The practice default provider is marked 'Not a Person'.  Please select the provider legally responsible for the documents.  The provider must have a first name, last name, and NPI number.");
				FormProviderPick FormPP=new FormProviderPick();
				if(FormPP.ShowDialog()!=DialogResult.OK) {
					return;
				}
				if(Providers.GetProv(FormPP.SelectedProvNum).IsNotPerson) {
					MsgBox.Show(this,"The selected provider was marked 'Not a person'.");
					return;
				}
				provNumLegal=FormPP.SelectedProvNum;
			}
			FolderBrowserDialog fbd = new FolderBrowserDialog();
			if(fbd.ShowDialog()!=DialogResult.OK) {
				return;
			}
			string folderPath=fbd.SelectedPath+"\\"+"CQMs_"+DateTime.Today.ToString("MM_dd_yyyy");
			if(System.IO.Directory.Exists(folderPath)) {//if the folder already exists
				//find a unique folder name
				int uniqueID=1;
				string originalPath=folderPath;
				do {
					folderPath=originalPath+"_"+uniqueID.ToString();
					uniqueID++;
				}
				while(System.IO.Directory.Exists(folderPath));
			}
			try {
				System.IO.Directory.CreateDirectory(folderPath);
			}
			catch(Exception ex) {
				MessageBox.Show("Folder was not created: "+ex.Message);
				return;
			}
			Cursor=Cursors.WaitCursor;
			try {
				QualityMeasures.GenerateQRDA(listQ,_provNum,_dateStart,_dateEnd,folderPath,provNumLegal);//folderPath is a new directory created within the chosen directory
			}
			catch(Exception ex) {
				Cursor=Cursors.Default;
				MessageBox.Show(ex.Message);
				if(ex.InnerException.Message=="true") {
					FormOIDRegistryInternal FormOIDs=new FormOIDRegistryInternal();
					FormOIDs.ShowDialog();
				}
				return;
			}
			Cursor=Cursors.Default;
			MsgBox.Show(this,"QRDA files have been created within the selected directory.");
		}
        private void butCreateQRDAs_Click(object sender, EventArgs e)
        {
            if (comboProv.SelectedIndex == -1)
            {
                MsgBox.Show(this, "Please select a provider first.");
                return;
            }
            if (listQ == null)
            {
                MsgBox.Show(this, "Click Refresh first.");
                return;
            }
            long provSelected = listProvsKeyed[comboProv.SelectedIndex].ProvNum;

            if (_provNum != provSelected)
            {
                MsgBox.Show(this, "The values in the grid do not apply to the provider selected.  Click Refresh first.");
                return;
            }
            Provider provDefault  = Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv));
            long     provNumLegal = provDefault.ProvNum;

            //The practice default provider may be set to a non-person, like Apple Tree Dental, in which case there is no first name allowed and an NPI number does not make sense.
            //Prompt user to select the provider to set as the legal authenticator for the QRDA documents.
            //The Legal Authenticator must have a valid first name, last name, and NPI number and is the "single person legally responsible for the document" and "must be a person".
            if (provDefault.IsNotPerson)
            {
                MsgBox.Show(this, "The practice default provider is marked 'Not a Person'.  Please select the provider legally responsible for the documents.  The provider must have a first name, last name, and NPI number.");
                FormProviderPick FormPP = new FormProviderPick();
                if (FormPP.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                if (Providers.GetProv(FormPP.SelectedProvNum).IsNotPerson)
                {
                    MsgBox.Show(this, "The selected provider was marked 'Not a person'.");
                    return;
                }
                provNumLegal = FormPP.SelectedProvNum;
            }
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            if (fbd.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            string folderPath = fbd.SelectedPath + "\\" + "CQMs_" + DateTime.Today.ToString("MM_dd_yyyy");

            if (System.IO.Directory.Exists(folderPath))             //if the folder already exists
            //find a unique folder name
            {
                int    uniqueID     = 1;
                string originalPath = folderPath;
                do
                {
                    folderPath = originalPath + "_" + uniqueID.ToString();
                    uniqueID++;
                }while(System.IO.Directory.Exists(folderPath));
            }
            try {
                System.IO.Directory.CreateDirectory(folderPath);
            }
            catch (Exception ex) {
                MessageBox.Show("Folder was not created: " + ex.Message);
                return;
            }
            Cursor = Cursors.WaitCursor;
            try {
                QualityMeasures.GenerateQRDA(listQ, _provNum, _dateStart, _dateEnd, folderPath, provNumLegal);           //folderPath is a new directory created within the chosen directory
            }
            catch (Exception ex) {
                Cursor = Cursors.Default;
                MessageBox.Show(ex.Message);
                if (ex.InnerException != null && ex.InnerException.Message == "true")
                {
                    FormOIDRegistryInternal FormOIDs = new FormOIDRegistryInternal();
                    FormOIDs.ShowDialog();
                }
                return;
            }
            Cursor = Cursors.Default;
            MsgBox.Show(this, "QRDA files have been created within the selected directory.");
        }
Exemplo n.º 19
0
		private void butPickHyg_Click(object sender,EventArgs e) {
			FormProviderPick formp=new FormProviderPick();
			if(comboProvHyg.SelectedIndex>0) {
				formp.SelectedProvNum=ProviderC.ListShort[comboProvHyg.SelectedIndex-1].ProvNum;
			}
			formp.ShowDialog();
			if(formp.DialogResult!=DialogResult.OK) {
				return;
			}
			comboProvHyg.SelectedIndex=Providers.GetIndex(formp.SelectedProvNum)+1;
		}
Exemplo n.º 20
0
		private void butPickProvAdministering_Click(object sender,EventArgs e) {
			FormProviderPick formP=new FormProviderPick();
			if(comboProvNumAdministering.SelectedIndex > -1) {//Initial formP selection if selected prov is not hidden.
				formP.SelectedProvNum=_provNumSelectedAdministering;
			}
			formP.ShowDialog();
			if(formP.DialogResult!=DialogResult.OK) {
				return;
			}
			comboProvNumAdministering.SelectedIndex=Providers.GetIndex(formP.SelectedProvNum);
			_provNumSelectedAdministering=formP.SelectedProvNum;
		}
Exemplo n.º 21
0
		private void butPickDefaultProv_Click(object sender,EventArgs e) {
			FormProviderPick FormPP=new FormProviderPick();
			if(comboDefaultProvider.SelectedIndex>-1) {
				FormPP.SelectedProvNum=_listProv[comboDefaultProvider.SelectedIndex].ProvNum;
			}
			FormPP.ShowDialog();
			if(FormPP.DialogResult!=DialogResult.OK) {
				return;
			}
			comboDefaultProvider.SelectedIndex=Providers.GetIndex(FormPP.SelectedProvNum);
			_provNumDefaultSelected=FormPP.SelectedProvNum;
		}
Exemplo n.º 22
0
		private void butStudentPicker_Click(object sender,EventArgs e) {
			FormProviderPick FormPP=new FormProviderPick();
			FormPP.IsStudentPicker=true;
			FormPP.ShowDialog();
			if(FormPP.DialogResult==DialogResult.OK) {
				_provStudent=Providers.GetProv(FormPP.SelectedProvNum);
				_evalCur.StudentNum=_provStudent.ProvNum;
				textStudent.Text=_provStudent.GetLongDesc();
			}
		}