private void lkeInsuranceCarrier_EditValueChanged(object sender, System.EventArgs e) { if (lkeInsuranceCarrier.EditValue == null) { lkeInsuranceLevel.Properties.ReadOnly = true; spnInsurancePrice.Properties.ReadOnly = true; return; } InsuranceCarrier_cu carrier = InsuranceCarrier_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(lkeInsuranceCarrier.EditValue))); if (carrier == null) { lkeInsuranceLevel.Properties.ReadOnly = true; spnInsurancePrice.Properties.ReadOnly = true; return; } List <InsuranceCarrier_InsuranceLevel_cu> bridgeList = InsuranceCarrier_InsuranceLevel_cu.ItemsList.FindAll( item => Convert.ToInt32(item.InsuranceCarrier_CU_ID).Equals(Convert.ToInt32(carrier.ID))); if (bridgeList.Count == 0) { lkeInsuranceLevel.Properties.ReadOnly = true; spnInsurancePrice.Properties.ReadOnly = true; return; } List <InsuranceLevel_cu> levelsList = new List <InsuranceLevel_cu>(); foreach (InsuranceCarrier_InsuranceLevel_cu bridge in bridgeList) { InsuranceLevel_cu level = InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(bridge.InsuranceLevel_CU_ID))); if (level == null) { lkeInsuranceLevel.Properties.ReadOnly = true; spnInsurancePrice.Properties.ReadOnly = true; continue; } levelsList.Add(level); } CommonViewsActions.FillGridlookupEdit(lkeInsuranceLevel, levelsList); lkeInsuranceLevel.Properties.ReadOnly = false; }
public void Initialize(Patient_cu patient) { if (patient == null) { return; } txtPatientID.Text = patient.Person_CU_ID.ToString(); txtPatientName.Text = patient.PatientFullName; if (patient.InsuranceCarrier_InsuranceLevel_CU_ID == null) { lytInsuranceDetails.Visibility = LayoutVisibility.Never; return; } InsuranceCarrier_InsuranceLevel_cu bridge = InsuranceCarrier_InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(patient.InsuranceCarrier_InsuranceLevel_CU_ID))); if (bridge == null) { lytInsuranceDetails.Visibility = LayoutVisibility.Never; return; } InsuranceCarrier_cu carrier = InsuranceCarrier_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(bridge.InsuranceCarrier_CU_ID))); if (carrier == null) { return; } txtInsuranceCarrierName.Text = "الجهة : " + carrier.Name_P; InsuranceLevel_cu level = InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(bridge.InsuranceLevel_CU_ID))); if (level == null) { return; } txtInsuranceLevelName.Text = "المستوى : " + level.Name_P; lblInsurancePercentage.Text = bridge.InsurancePercentage * 100 + " %"; lblPatientPercentage.Text = (1 - bridge.InsurancePercentage) * 100 + " %"; }
public void Initialize(Patient_cu patient, Control parentControl) { if (patient == null) { return; } ActiveSelectedPatient = patient; ParentControl = parentControl; switch (ApplicationStaticConfiguration.Application) { case DB_Application.ClinicReception: lytInPatientActions.Visibility = LayoutVisibility.Never; lytOutpatientActions.Visibility = LayoutVisibility.Always; break; case DB_Application.AdmissionReception: lytInPatientActions.Visibility = LayoutVisibility.Always; lytOutpatientActions.Visibility = LayoutVisibility.Never; break; } BackColor = Color.SlateGray; if (!string.IsNullOrEmpty(ApplicationStaticConfiguration.SkinName) && !string.IsNullOrWhiteSpace(ApplicationStaticConfiguration.SkinName)) { if (ApplicationStaticConfiguration.SkinName.Equals("McSkin")) { lytOutpatientActions.AppearanceGroup.ForeColor = lytInPatientActions.AppearanceGroup.ForeColor = Color.DarkBlue; lblPatientID.ForeColor = Color.DarkOrange; lblPatientName.ForeColor = lblInsuranceCarrierName.ForeColor = lblInsuranceLevelName.ForeColor = lblInsurancePercentage.ForeColor = Color.DarkBlue; labelControl1.ForeColor = labelControl3.ForeColor = labelControl5.ForeColor = labelControl7.ForeColor = Color.Black; btnClose.Image = Properties.Resources.ExitIcon_8; } else { lytOutpatientActions.AppearanceGroup.ForeColor = lytInPatientActions.AppearanceGroup.ForeColor = Color.OldLace; lblPatientID.ForeColor = Color.OrangeRed; lblPatientName.ForeColor = lblInsuranceCarrierName.ForeColor = lblInsuranceLevelName.ForeColor = lblInsurancePercentage.ForeColor = Color.Ivory; labelControl1.ForeColor = labelControl3.ForeColor = labelControl5.ForeColor = labelControl7.ForeColor = Color.OldLace; btnClose.Image = Properties.Resources.Exit_1_16; } } lblPatientID.Text = ActiveSelectedPatient.Person_CU_ID.ToString(); lblPatientName.Text = ActiveSelectedPatient.PatientFullName; if (ActiveSelectedPatient.InsuranceCarrier_InsuranceLevel_CU_ID != null) { InsuranceCarrier_InsuranceLevel_cu insuranceBridge = InsuranceCarrier_InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID) .Equals(Convert.ToInt32(ActiveSelectedPatient.InsuranceCarrier_InsuranceLevel_CU_ID))); if (insuranceBridge != null) { InsuranceCarrier_cu insuranceCarrier = InsuranceCarrier_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(insuranceBridge.InsuranceCarrier_CU_ID))); if (insuranceCarrier != null) { lblInsuranceCarrierName.Text = insuranceCarrier.Name_P; } InsuranceLevel_cu insurancelevel = InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(insuranceBridge.InsuranceLevel_CU_ID))); if (insurancelevel != null) { lblInsuranceLevelName.Text = insurancelevel.Name_P; } lblInsurancePercentage.Text = Convert.ToString(insuranceBridge.InsurancePercentage * 100); } } BringToFront(); }
public override void Edit(IDBCommon entity) { ((IPatientViewer)ActiveCollector.ActiveViewer).CommonTransactionType = DB_CommonTransactionType.UpdateExisting; FirstNameP = ((Person_cu)ActiveDBItem).FirstName_P; SecondNameP = ((Person_cu)ActiveDBItem).SecondName_P; ThirdNameP = ((Person_cu)ActiveDBItem).ThirdName_P; FourthNameP = ((Person_cu)ActiveDBItem).FourthName_P; FirstNameS = ((Person_cu)ActiveDBItem).FirstName_S; SecondNameS = ((Person_cu)ActiveDBItem).SecondName_S; ThirdNameS = ((Person_cu)ActiveDBItem).ThirdName_S; FourthNameS = ((Person_cu)ActiveDBItem).FourthName_S; PersonGender = ((Person_cu)ActiveDBItem).Gender; PersonTitle = ((Person_cu)ActiveDBItem).PersonTitle_P_ID; Nationality = ((Person_cu)ActiveDBItem).Nationality_CU_ID; CountryOfResidence = ((Person_cu)ActiveDBItem).CountryOfResidence_CU_ID; City = ((Person_cu)ActiveDBItem).CityOfResidence_CU_ID; Region = ((Person_cu)ActiveDBItem).Region_CU_ID; MaritalStatus = ((Person_cu)ActiveDBItem).MaritalStatus_P_ID; DateOfBirth = ((Person_cu)ActiveDBItem).BirthDate; Address = ((Person_cu)ActiveDBItem).Address; Mobile1 = ((Person_cu)ActiveDBItem).Mobile1; Mobile2 = ((Person_cu)ActiveDBItem).Mobile2; Phone1 = ((Person_cu)ActiveDBItem).Phone1; Phone2 = ((Person_cu)ActiveDBItem).Phone2; Email = ((Person_cu)ActiveDBItem).EMail; IdentificationCardType = ((Person_cu)ActiveDBItem).IdentificationCardType_P_ID; IdentificationCardNumber = ((Person_cu)ActiveDBItem).IdentificationCardNumber; IdentificationCardIssuingDate = ((Person_cu)ActiveDBItem).IdentificationCardIssuingDate; IdentificationCardEpirationDate = ((Person_cu)ActiveDBItem).IdentificationCardExpirationDate; if (((Person_cu)ActiveDBItem).Patient_cu != null) { InsuranceCarrier_InsuranceLevel_cu bridge = InsuranceCarrier_InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID) .Equals(Convert.ToInt32(((Person_cu)ActiveDBItem).Patient_cu.InsuranceCarrier_InsuranceLevel_CU_ID))); if (bridge != null) { InsuranceCarrier_cu carrier = InsuranceCarrier_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(bridge.InsuranceCarrier_CU_ID))); InsuranceLevel_cu level = InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(bridge.InsuranceLevel_CU_ID))); if (carrier != null) { ((IPatientViewer)ActiveCollector.ActiveViewer).InsuranceCarrier = carrier.ID; } if (level != null) { ((IPatientViewer)ActiveCollector.ActiveViewer).InsuranceLevel = level.ID; } } RelativeName = ((Person_cu)ActiveDBItem).Patient_cu.RelativeName; RelativeAddress = ((Person_cu)ActiveDBItem).Patient_cu.RelativeAddress; RelativeType = ((Person_cu)ActiveDBItem).Patient_cu.PersonRelativeType_P_ID; RelativePhone = ((Person_cu)ActiveDBItem).Patient_cu.RelativePhone; } ((IPatientViewer)ActiveCollector.ActiveViewer).ID = ((Person_cu)ActiveDBItem).ID; ActiveCollector.ActiveDBItem.ID = ((Person_cu)ActiveDBItem).ID; base.Edit(ActiveCollector.ActiveDBItem); }
public void Initialize(Patient_cu patient, ScanningMode scanningMode, MedicalType medicalType) { ActiveSelectedPatient = patient; ActiveScanningMode = scanningMode; MedicalType = medicalType; BackColor = Color.White; List <PatientAttachment_cu> list = null; switch (ActiveScanningMode) { case ScanningMode.Regular: if (ActiveSelectedPatient != null) { if (ImagesList == null) { ImagesList = new List <PatientAttachment_cu>(); } } ImagesList = PatientAttachment_cu.ItemsList.FindAll(item => Convert.ToInt32(item.Patient_CU_ID) .Equals(Convert.ToInt32(ActiveSelectedPatient.Person_CU_ID)) && Convert.ToInt32(item.ImageType_P_ID).Equals(Convert.ToInt32(ImageType_P_ID))); emptySpaceItem3.Visibility = LayoutVisibility.Always; layoutControlItem4.Visibility = LayoutVisibility.Always; layoutControlItem3.Visibility = LayoutVisibility.Always; layoutControlGroup2.Visibility = LayoutVisibility.Always; layoutControlGroup3.Visibility = LayoutVisibility.Always; layoutControlItem5.Visibility = LayoutVisibility.Always; layoutControlItem15.Visibility = LayoutVisibility.Always; simpleSeparator4.Visibility = LayoutVisibility.Always; layoutControlGroup2.Visibility = LayoutVisibility.Always; layoutControlGroup3.Visibility = LayoutVisibility.Always; layoutControlItem5.Visibility = LayoutVisibility.Always; lytSelectAll.Visibility = LayoutVisibility.Never; break; case ScanningMode.MedicalVisit: if (PEMRBusinessLogic.ActivePEMRObject != null && PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_Attachment != null) { foreach (VisitTiming_Attachment visitTimingAttachement in PEMRBusinessLogic.ActivePEMRObject .List_VisitTiming_Attachment) { PatientAttachment_cu patientAttachment = PatientAttachment_cu.ItemsList.Find(item => Convert.ToInt32(item.ID) .Equals(Convert.ToInt32(visitTimingAttachement.PatientAttachement_CU_ID))); if (patientAttachment != null) { if (ImagesList == null) { ImagesList = new List <PatientAttachment_cu>(); } ImagesList.Add(patientAttachment); } } } emptySpaceItem3.Visibility = LayoutVisibility.Never; layoutControlItem4.Visibility = LayoutVisibility.Never; layoutControlItem3.Visibility = LayoutVisibility.Never; layoutControlGroup2.Visibility = LayoutVisibility.Never; layoutControlGroup3.Visibility = LayoutVisibility.Never; layoutControlItem5.Visibility = LayoutVisibility.Never; layoutControlItem15.Visibility = LayoutVisibility.Never; simpleSeparator4.Visibility = LayoutVisibility.Never; layoutControlGroup2.Visibility = LayoutVisibility.Never; layoutControlGroup3.Visibility = LayoutVisibility.Never; layoutControlItem5.Visibility = LayoutVisibility.Never; lytSelectAll.Visibility = LayoutVisibility.Always; break; } switch (medicalType) { case MedicalType.InvestigationResult: chkPersonalPhoto.Enabled = false; chkID.Enabled = false; chkPassport.Enabled = false; chkInvestigation.Enabled = true; chkSurgery.Enabled = false; chkLab.Enabled = false; chkOther.Enabled = false; chkInvestigation.Checked = true; break; case MedicalType.LabResult: chkPersonalPhoto.Enabled = false; chkID.Enabled = false; chkPassport.Enabled = false; chkInvestigation.Enabled = false; chkSurgery.Enabled = false; chkLab.Enabled = true; chkOther.Enabled = false; chkLab.Checked = true; break; case MedicalType.SurgeryResult: chkPersonalPhoto.Enabled = false; chkID.Enabled = false; chkPassport.Enabled = false; chkInvestigation.Enabled = false; chkLab.Enabled = false; chkSurgery.Enabled = true; chkOther.Enabled = false; chkSurgery.Checked = true; break; case MedicalType.None: chkPersonalPhoto.Enabled = true; chkID.Enabled = true; chkPassport.Enabled = true; chkSurgery.Enabled = true; chkInvestigation.Enabled = true; chkLab.Enabled = true; chkOther.Enabled = true; chkPersonalPhoto.Checked = true; break; } CommonViewsActions.FillListBoxControl(lstImageNames, ImagesList, "ImageName"); lstImageNames.Refresh(); if (!string.IsNullOrEmpty(ApplicationStaticConfiguration.SkinName) && !string.IsNullOrWhiteSpace(ApplicationStaticConfiguration.SkinName)) { if (ApplicationStaticConfiguration.SkinName.Equals("McSkin")) { lblPatientID.ForeColor = Color.DarkOrange; lblPatientName.ForeColor = lblInsuranceCarrierName.ForeColor = lblInsuranceLevelName.ForeColor = lblInsurancePercentage.ForeColor = Color.DarkBlue; labelControl1.ForeColor = labelControl3.ForeColor = labelControl5.ForeColor = labelControl7.ForeColor = Color.Black; btnClose.Image = Properties.Resources.ExitIcon_8; } else { lblPatientID.ForeColor = Color.OrangeRed; lblPatientName.ForeColor = lblInsuranceCarrierName.ForeColor = lblInsuranceLevelName.ForeColor = lblInsurancePercentage.ForeColor = Color.Ivory; labelControl1.ForeColor = labelControl3.ForeColor = labelControl5.ForeColor = labelControl7.ForeColor = Color.OldLace; btnClose.Image = Properties.Resources.Exit_1_16; } } lblPatientID.Text = ActiveSelectedPatient.Person_CU_ID.ToString(); lblPatientName.Text = ActiveSelectedPatient.PatientFullName; if (ActiveSelectedPatient.InsuranceCarrier_InsuranceLevel_CU_ID != null) { InsuranceCarrier_InsuranceLevel_cu insuranceBridge = InsuranceCarrier_InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID) .Equals(Convert.ToInt32(ActiveSelectedPatient.InsuranceCarrier_InsuranceLevel_CU_ID))); if (insuranceBridge != null) { InsuranceCarrier_cu insuranceCarrier = InsuranceCarrier_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(insuranceBridge.InsuranceCarrier_CU_ID))); if (insuranceCarrier != null) { lblInsuranceCarrierName.Text = insuranceCarrier.Name_P; } InsuranceLevel_cu insurancelevel = InsuranceLevel_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(insuranceBridge.InsuranceLevel_CU_ID))); if (insurancelevel != null) { lblInsuranceLevelName.Text = insurancelevel.Name_P; } lblInsurancePercentage.Text = Convert.ToString(insuranceBridge.InsurancePercentage * 100); } } }