public void InitializePatientInfo(PEMRContainer pemrContainer, GetBriefQueue_Result queueResult, VisitTiming visitTiming, PEMRObject pemrObject) { ActivePEMR = pemrObject; QueueResult = queueResult; ActiveVisitTiming = visitTiming; PEMRContainer = pemrContainer; if (pemrObject == null) { return; } lblTitlePatientID.Text = pemrObject.Active_Patient.ID.ToString(); lblTitlePatientName.Text = pemrObject.Active_Patient.PatientFullName; Service_cu service = Service_cu.ItemsList.Find( item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(pemrObject.Active_InvoiceDetail.Service_CU_ID))); if (service != null) { lblTitleServiceName.Text = service.Name_S; } lblTitleReservationTime.Text = Convert.ToDateTime(pemrObject.Active_InvoiceDetail.Date) .ConvertDateTimeToString(true, true, true); lblIsMale.Text = pemrObject.Active_Patient.IsMale ? "(M)" : "(F)"; if (pemrObject.Active_Patient.BirthDate != null) { int numberOfYears = Convert.ToInt32(CommonActions.CommonActions.CalculateYears(pemrObject.Active_Patient.BirthDate)); lblBD.Text = numberOfYears.ToString(); } DB_QueueManagerStatus queueManagerStatus = (DB_QueueManagerStatus)queueResult.QueueStatusID; switch (queueManagerStatus) { case DB_QueueManagerStatus.Waiting: break; case DB_QueueManagerStatus.Paused: case DB_QueueManagerStatus.Served: break; } }
public void Initialize(PEMRContainer parentContainer, PEMRObject pemrObject, GetPreviousMedicalVisits_Result visitResult) { ParentPEMRContainer = parentContainer; ActivePreviousMedicalVisit = visitResult; ActivePEMR = pemrObject; lblPatientID.Text = visitResult.PatientID.ToString(); lblPatientName.Text = visitResult.PatientName; lblServiceName.Text = visitResult.ServiceName; lblReservationTime.Text = "[" + visitResult.SignOutDateString + " - " + visitResult.SignInDateString + "]"; lytGroup.Text = visitResult.PatientName + " [" + Convert.ToDateTime(visitResult.SignInDate).ConvertDateTimeToString(false, true, true) + " - " + visitResult.SignOutDateString + "]"; lytGroup.Expanded = false; ParentPEMRContainer.ShowPreviousVisitPEMR(); }
private void btnSearch_Click(object sender, System.EventArgs e) { tabQueue.Controls.Clear(); if ((txtPatientID.EditValue == null || string.IsNullOrEmpty(txtPatientID.Text) || string.IsNullOrWhiteSpace(txtPatientID.Text)) && (lkeDoctors.EditValue == null || string.IsNullOrEmpty(lkeDoctors.Text) || string.IsNullOrWhiteSpace(lkeDoctors.Text)) && (txtPatientName.EditValue == null || string.IsNullOrEmpty(txtPatientName.Text) || string.IsNullOrWhiteSpace(txtPatientName.Text)) && (lkeService.EditValue == null || string.IsNullOrEmpty(lkeService.Text) || string.IsNullOrWhiteSpace(lkeService.Text)) && (dtFrom.EditValue == null || string.IsNullOrEmpty(dtFrom.Text) || string.IsNullOrWhiteSpace(dtFrom.Text)) && (dtTo.EditValue == null || string.IsNullOrEmpty(dtTo.Text) || string.IsNullOrWhiteSpace(dtTo.Text))) { XtraMessageBox.Show("You should write a search criteria before searching.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop, MessageBoxDefaultButton.Button1, DefaultBoolean.Default); return; } List <GetPreviousMedicalVisits_Result> previousVisitsList = MerkDBBusinessLogicEngine.GetPreviousMedicalVisitsList(txtPatientID.EditValue, true, lkeService.EditValue, dtFrom.EditValue, dtTo.EditValue, lkeDoctors.EditValue); if (previousVisitsList.Count == 0) { XtraMessageBox.Show("No Previous visits found.", "Not Found", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, DefaultBoolean.Default); return; } foreach (GetPreviousMedicalVisits_Result medicalVisitsResult in previousVisitsList) { PEMR_PreviousVisitCard_UC card = new PEMR_PreviousVisitCard_UC(); card.Dock = DockStyle.Top; PEMRObject pemrObject = PEMRBusinessLogic.GetVisitFullTree(medicalVisitsResult); if (pemrObject == null) { return; } card.Initialize(ParentContainer, pemrObject, medicalVisitsResult); tabQueue.Controls.Add(card); } }
public void Initialize(PEMRObject pemrObject) { ActivePEMRObject = pemrObject; if (ActivePEMRObject == null) { return; } lblElementHeaderTitle.EvaluateBinding += ElementHeaderTitle_EvaluateBinding; lblPatientID.Text = ActivePEMRObject.Active_Patient.ID.ToString(); lblPatientName.Text = ActivePEMRObject.Active_Patient.PatientFullName; lblDoctorName.Text = ActivePEMRObject.Active_InvoiceDetail.DoctorName; lblServiceName.Text = ActivePEMRObject.Active_InvoiceDetail.ServiceName; lblServiceCategoryName.Text = ActivePEMRObject.Active_InvoiceDetail.ServiceCategoryName; lblDate.Text = ActivePEMRObject.Active_InvoiceDetail.Date.ToShortDateString() + " - " + ActivePEMRObject.Active_InvoiceDetail.Date.ToShortTimeString(); List <PEMR_Translated> list = PEMRBusinessLogic.Translate_PEMR_Report(ActivePEMRObject); DetailReport.DataSource = list; lblElementHeaderTitle.DataBindings.Add("Tag", list, "Handle"); lblElementHeaderTitle.DataBindings.Add("Text", list, "ElementName"); }