コード例 #1
0
        public void Initialize(bool allPatients)
        {
            PatientsList.Clear();
            if (allPatients)
            {
                PatientsList = Patient_cu.GetPatientsList(500);
            }
            else
            {
                if (ActivePatient != null)
                {
                    PatientsList.Add(ActivePatient);
                }
                else
                {
                    PatientsList = new List <Patient_cu>();
                }
            }

            grdPatientsList.DataSource = PatientsList;
            grdPatientsList.RefreshDataSource();

            if (!string.IsNullOrEmpty(ApplicationStaticConfiguration.SkinName) &&
                !string.IsNullOrWhiteSpace(ApplicationStaticConfiguration.SkinName))
            {
                if (ApplicationStaticConfiguration.SkinName.Equals("McSkin"))
                {
                    BackColor = Color.LightSlateGray;
                }
                else
                {
                    BackColor = Color.FromArgb(50, 59, 74);
                }
            }
        }
コード例 #2
0
 public void Initialize(Patient_cu patient, MainPatientInvoiceActions mainPatientInvoiceActions,
                        Control parentControl)
 {
     ActivePatient             = patient;
     MainPatientInvoiceActions = mainPatientInvoiceActions;
     ParentControl             = parentControl;
 }
コード例 #3
0
 public void Initialize(Invoice activeInvoice, Patient_cu activePatient, InvoiceDetail invoiceDetail, QueueManager queueManager)
 {
     ActiveInvoice       = activeInvoice;
     ActivePatient       = activePatient;
     ActiveInvoiceDetail = invoiceDetail;
     ActiveQueueManager  = queueManager;
 }
        public void Initialize(QueueManagerContainer_UC parentContainer, Invoice invoice, Patient_cu patient,
                               InvoiceDetail invoiceDetail, QueueManager queueManager, string patientID,
                               string patientName, string doctorID,
                               string doctorName, string serviceName, string reservationDate)
        {
            ParentQueueManagerContainer_UC = parentContainer;
            lblPatientID.Text       = patientID;
            lblPatientName.Text     = patientName;
            lblDoctorID.Text        = doctorID;
            lblDoctorName.Text      = doctorName;
            lblServiceName.Text     = serviceName;
            lblReservationTime.Text = Convert.ToDateTime(invoice.InvoiceCreationDate).ConvertDateTimeToString(true, true);
            if (queueManager != null)
            {
                StationPoint_cu stPoint =
                    StationPoint_cu.ItemsList.Find(
                        item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(queueManager.StationPoint_CU_ID)));
                if (stPoint != null)
                {
                    lblStationPointName.Text = "العيــادة : " + stPoint.Name_P;
                }

                lyt_lblStationPointName.Visibility = LayoutVisibility.Always;
            }

            ActiveInvoice       = invoice;
            ActivePatient       = patient;
            ActiveInvoiceDetail = invoiceDetail;
            ActiveQueueManager  = queueManager;

            BackColor = Color.FromArgb(80, 80, 85);
        }
        public void Initialize(Patient_cu patient, AdmissionType admissionType)
        {
            ActivePatient     = patient;
            readyInvoicesList = MerkDBBusinessLogicEngine.ReadyInvoicesForAction(admissionType, null, null, true, true, false, null,
                                                                                 null, ActivePatient);

            gridControl1.DataSource = readyInvoicesList.Count > 0 ? readyInvoicesList : null;
        }
コード例 #6
0
        private void btnQuickSearch_Click(object sender, System.EventArgs e)
        {
            if (txtPatientID.EditValue != null)
            {
                ActivePatient =
                    PatientsList.Find(item => item.Person_CU_ID.Equals(Convert.ToInt32(txtPatientID.EditValue)));
                if (ActivePatient == null)
                {
                    ActivePatient = DBCommon.GetEntity <Patient_cu>(Convert.ToInt32(txtPatientID.EditValue));
                }
            }
            else if (txtPatientName.EditValue != null &&
                     !string.IsNullOrEmpty(Convert.ToString(txtPatientName.EditValue)) &&
                     !string.IsNullOrWhiteSpace(Convert.ToString(txtPatientName.EditValue)))
            {
                string[] nameArry = Convert.ToString(txtPatientName.EditValue).Split(' ');
                if (nameArry.Length == 1)
                {
                    ActivePatient = PatientsList.Find(
                        item => item.Person_cu.FirstName_P.Contains(Convert.ToString(nameArry[0])));
                }
                else if (nameArry.Length == 2)
                {
                    ActivePatient = PatientsList.Find(
                        item => item.Person_cu.FirstName_P.Contains(Convert.ToString(nameArry[0])) ||
                        item.Person_cu.SecondName_P.Contains(Convert.ToString(nameArry[1])));
                }
                else if (nameArry.Length == 3)
                {
                    ActivePatient = PatientsList.Find(
                        item => item.Person_cu.FirstName_P.Contains(Convert.ToString(nameArry[0])) ||
                        item.Person_cu.SecondName_P.Contains(Convert.ToString(nameArry[1])) ||
                        item.Person_cu.ThirdName_P.Contains(Convert.ToString(nameArry[2])));
                }
                else if (nameArry.Length == 4)
                {
                    ActivePatient = PatientsList.Find(
                        item => item.Person_cu.FirstName_P.Contains(Convert.ToString(nameArry[0])) ||
                        item.Person_cu.SecondName_P.Contains(Convert.ToString(nameArry[1])) ||
                        item.Person_cu.ThirdName_P.Contains(Convert.ToString(nameArry[2])) ||
                        item.Person_cu.FourthName_P.Contains(Convert.ToString(nameArry[3])));
                }
            }

            if (ActivePatient == null)
            {
                Initialize(true);
                XtraMessageBox.Show("المريض غير موجود", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Error,
                                    MessageBoxDefaultButton.Button1, DefaultBoolean.Default);
                return;
            }

            Initialize(false);
        }
コード例 #7
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            ActivePatient = CommonViewsActions.GetSelectedRowObject <Patient_cu>(gridView1);
            if (ActivePatient == null)
            {
                return;
            }

            MainPatientInvoiceActions patienActions = new MainPatientInvoiceActions();

            patienActions.Initialize(ActivePatient, ParentControl);
            PopupBaseForm.ShowAsPopup(patienActions, this);
        }
        public void Initialize(Patient_cu patient, Control parentControl,
                               MainPatientInvoiceActions mainPatientInvoiceActionsControl,
                               PatientNotCompletedPreviousVisitsAction patientNotCompletedPreviousVisitsAction)
        {
            TopMaxParentControl = parentControl;
            MainPatientInvoiceActionsControl = mainPatientInvoiceActionsControl;
            List <GetPatientPreviousInvoices_Result> list =
                DBCommon.DBContext_External.GetPatientPreviousInvoices(patient.Person_CU_ID, false, true, null, null)
                .OrderBy(item => item.InvoiceCreationDate)
                .ToList();

            grdPatientsList.DataSource = list;
            PatientNotCompletedPreviousVisitsAction = patientNotCompletedPreviousVisitsAction;
        }
        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 static List <ReadyInvoicesForAction> GetReadyInvoicesForActionList(List <GetBriefQueue_Result> queueBrieflist)
        {
            if (queueBrieflist == null || queueBrieflist.Count == 0)
            {
                return(null);
            }
            List <ReadyInvoicesForAction> list = new List <ReadyInvoicesForAction>();

            foreach (GetBriefQueue_Result queueResult in queueBrieflist)
            {
                Invoice invoice = DBCommon.GetEntity <Invoice>(queueResult.InvoiceID);
                if (invoice == null)
                {
                    continue;
                }
                Patient_cu patient = DBCommon.GetEntity <Patient_cu>(invoice.Patient_CU_ID);
                if (patient == null)
                {
                    continue;
                }
                ReadyInvoicesForAction readyInvoicesForPayments = new ReadyInvoicesForAction()
                {
                    PatientID           = queueResult.PatientID,
                    PatientFullName     = queueResult.PatientFullName,
                    InvoiceID           = queueResult.InvoiceID,
                    InvoiceType         = (DB_InvoiceType)invoice.InvoiceType_P_ID,
                    InvoiceCreationDate = queueResult.ReservationTime,
                    InvoiceSerial       = invoice.InvoiceSerial,
                    DoctorID            = queueResult.DoctorID,
                    DoctorName          = queueResult.DoctorFullName,
                    IsPaymentEnough     = invoice.IsPaymentsEnough,
                    TotalRequired       = invoice.PatientShare_BeforeAddsOn_InvoiceItem,
                    TotalPayments       = invoice.CalculatedTotal_Payments,
                    ActiveInvoice       = invoice,
                    ActivePatient       = patient
                };

                list.Add(readyInvoicesForPayments);
            }

            return(list);
        }
        public void Initialize(Patient_cu patient)
        {
            patientTopTitle_UC1.Initialize(patient);

            ParentServices = Service_cu.ItemsList.FindAll(
                item =>
                !Convert.ToBoolean(item.ParentService_CU_ID.HasValue) &&
                Convert.ToInt32(item.ServiceType_P_ID).Equals((int)DB_ServiceType.LabServices));
            CommonViewsActions.FillListBoxControl(lstParentServices_All, ParentServices);

            CommonViewsActions.FillListBoxControl(lstLabServices_All, Service_cu.ItemsList.FindAll(
                                                      item =>
                                                      Convert.ToBoolean(item.ParentService_CU_ID.HasValue) &&
                                                      Convert.ToInt32(item.ServiceType_P_ID).Equals((int)DB_ServiceType.LabServices)));

            SetCount();

            spnTotalServicePrice.EditValue = 0;
            dtServiceDate.DateTime         = DateTime.Now;
            CommonViewsActions.FillGridlookupEdit(lkeDoctor, Doctor_cu.ItemsList, valueMember: "Person_CU_ID");
        }
        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 static List <ReadyInvoicesForAction> ReadyInvoicesForAction(AdmissionType admissionType,
                                                                           DateTime?InvoiceCreationDateStart,
                                                                           DateTime?InvoiceCreationDateEnd, bool?InvoiceIsOnDuty, bool?InvoiceIsFinanciallyReviewed,
                                                                           bool?InvoiceIsPrinted, bool?InvoiceIsPaymentEnough, int?DoctorID, Patient_cu Patient)
        {
            List <ReadyInvoicesForAction>         readyInvoiceFormPaymentsList = new List <ReadyInvoicesForAction>();
            List <GetInvoiceForAddmission_Result> result = new List <GetInvoiceForAddmission_Result>();

            using (DBCommon.DBContext_External)
            {
                switch (admissionType)
                {
                case AdmissionType.ClinicAdmission:
                    result =
                        DBCommon.DBContext_External.GetInvoiceForAddmission(InvoiceCreationDateStart, InvoiceCreationDateEnd,
                                                                            (int)DB_InvoiceType.OutPatientPrivate, InvoiceIsOnDuty, InvoiceIsFinanciallyReviewed, InvoiceIsPrinted,
                                                                            InvoiceIsPaymentEnough, DoctorID, Patient != null ? Patient.Person_CU_ID : (int?)null)
                        .OrderByDescending(item => item.InvoiceCreationDate)
                        .ToList();
                    result.AddRange(
                        DBCommon.DBContext_External.GetInvoiceForAddmission(InvoiceCreationDateStart, InvoiceCreationDateEnd,
                                                                            (int)DB_InvoiceType.OutPatientNotPrivate, InvoiceIsOnDuty, InvoiceIsFinanciallyReviewed, InvoiceIsPrinted,
                                                                            InvoiceIsPaymentEnough, DoctorID, Patient != null ? Patient.Person_CU_ID : (int?)null)
                        .OrderByDescending(item => item.InvoiceCreationDate)
                        .ToList());
                    break;

                case AdmissionType.InPatientAdmission:
                    result =
                        DBCommon.DBContext_External.GetInvoiceForAddmission(InvoiceCreationDateStart, InvoiceCreationDateEnd,
                                                                            (int)DB_InvoiceType.InPatientPrivate, InvoiceIsOnDuty, InvoiceIsFinanciallyReviewed, InvoiceIsPrinted,
                                                                            InvoiceIsPaymentEnough, DoctorID, Patient != null ? Patient.Person_CU_ID : (int?)null)
                        .OrderByDescending(item => item.InvoiceCreationDate)
                        .ToList();
                    result.AddRange(
                        DBCommon.DBContext_External.GetInvoiceForAddmission(InvoiceCreationDateStart, InvoiceCreationDateEnd,
                                                                            (int)DB_InvoiceType.InPatientNotPrivate, InvoiceIsOnDuty, InvoiceIsFinanciallyReviewed, InvoiceIsPrinted,
                                                                            InvoiceIsPaymentEnough, DoctorID, Patient != null ? Patient.Person_CU_ID : (int?)null)
                        .OrderByDescending(item => item.InvoiceCreationDate)
                        .ToList());
                    break;
                }

                List <Invoice> invoicesList = new List <Invoice>();
                foreach (GetInvoiceForAddmission_Result getInvoiceForAddmissionResult in result)
                {
                    Invoice invoice = DBCommon.GetEntity <Invoice>(getInvoiceForAddmissionResult.InvoiceID);
                    if (invoice == null)
                    {
                        continue;
                    }
                    invoicesList.Add(invoice);
                    ReadyInvoicesForAction readyInvoicesForPayments = new ReadyInvoicesForAction()
                    {
                        PatientID           = getInvoiceForAddmissionResult.PatientID,
                        PatientFullName     = getInvoiceForAddmissionResult.PatientFullName,
                        InvoiceID           = getInvoiceForAddmissionResult.InvoiceID,
                        InvoiceType         = (DB_InvoiceType)invoice.InvoiceType_P_ID,
                        InvoiceCreationDate = getInvoiceForAddmissionResult.InvoiceCreationDate,
                        InvoiceSerial       = getInvoiceForAddmissionResult.InvoiceSerial,
                        DoctorID            = getInvoiceForAddmissionResult.DoctorID,
                        DoctorName          = getInvoiceForAddmissionResult.DoctorName,
                        IsPaymentEnough     = getInvoiceForAddmissionResult.IsPaymentEnough,
                        TotalRequired       = invoice.PatientShare_BeforeAddsOn_InvoiceItem,
                        TotalPayments       = invoice.CalculatedTotal_Payments,
                        ActiveInvoice       = invoice,
                        ActivePatient       = Patient
                    };

                    readyInvoiceFormPaymentsList.Add(readyInvoicesForPayments);
                }
            }

            return(readyInvoiceFormPaymentsList);
        }
コード例 #14
0
        public void Initialize()
        {
            tabWaitingPatients.Controls.Clear();
            tabServedPatients.Controls.Clear();
            tabPausedPatients.Controls.Clear();

            List <GetBriefQueue_Result> allQueues = null;

            allQueues = MerkDBBusinessLogicEngine.GetBriefQueue((int?)DoctorID, null, null, null);

            if (allQueues == null || allQueues.Count == 0)
            {
                return;
            }

            List <GetBriefQueue_Result> waitingQueue =
                allQueues.FindAll(item => Convert.ToInt32(item.QueueStatusID).Equals((int)DB_QueueManagerStatus.Waiting));
            List <GetBriefQueue_Result> pausedQueue =
                allQueues.FindAll(item => Convert.ToInt32(item.QueueStatusID).Equals((int)DB_QueueManagerStatus.Paused));
            List <GetBriefQueue_Result> servedQueue =
                allQueues.FindAll(item => Convert.ToInt32(item.QueueStatusID).Equals((int)DB_QueueManagerStatus.Served));

            #region waitingQueue
            if (waitingQueue.Count > 0)
            {
                foreach (GetBriefQueue_Result queue in waitingQueue)
                {
                    InvoiceManagerPatientQueueCard_UC card = new InvoiceManagerPatientQueueCard_UC();
                    card.Dock = DockStyle.Top;

                    Invoice invoice = DBCommon.GetEntity <Invoice>(queue.InvoiceID);
                    if (invoice == null)
                    {
                        continue;
                    }
                    Patient_cu patient = DBCommon.GetEntity <Patient_cu>(invoice.Patient_CU_ID);
                    if (patient == null)
                    {
                        continue;
                    }
                    InvoiceDetail invoiceDetail = DBCommon.GetEntity <InvoiceDetail>(queue.InvoiceDetailID);
                    if (invoiceDetail == null)
                    {
                        continue;
                    }
                    QueueManager queueManager = DBCommon.GetEntity <QueueManager>(queue.QueueManagerID);
                    if (queueManager == null)
                    {
                        continue;
                    }
                    card.Initialize(this, invoice, patient, invoiceDetail, queueManager, queue.PatientID.ToString(), queue.PatientFullName,
                                    queue.DoctorID.ToString(), queue.DoctorFullName, queue.ServiceName, queue.ReservationTime.ToString());
                    tabWaitingPatients.Controls.Add(card);
                }
            }
            #endregion

            #region PausedQueue
            if (pausedQueue.Count > 0)
            {
                foreach (GetBriefQueue_Result queue in pausedQueue)
                {
                    InvoiceManagerPatientQueueCard_UC card = new InvoiceManagerPatientQueueCard_UC();
                    card.Dock = DockStyle.Top;

                    Invoice invoice = DBCommon.GetEntity <Invoice>(queue.InvoiceID);
                    if (invoice == null)
                    {
                        continue;
                    }
                    Patient_cu patient = DBCommon.GetEntity <Patient_cu>(invoice.Patient_CU_ID);
                    if (patient == null)
                    {
                        continue;
                    }
                    InvoiceDetail invoiceDetail = DBCommon.GetEntity <InvoiceDetail>(queue.InvoiceDetailID);
                    if (invoiceDetail == null)
                    {
                        continue;
                    }
                    QueueManager queueManager = DBCommon.GetEntity <QueueManager>(queue.QueueManagerID);
                    if (queueManager == null)
                    {
                        continue;
                    }
                    card.Initialize(this, invoice, patient, invoiceDetail, queueManager, queue.PatientID.ToString(), queue.PatientFullName,
                                    queue.DoctorID.ToString(), queue.DoctorFullName, queue.ServiceName, queue.ReservationTime.ToString());
                    tabPausedPatients.Controls.Add(card);
                }
            }
            #endregion

            #region servedQueue
            if (servedQueue.Count > 0)
            {
                foreach (GetBriefQueue_Result queue in servedQueue)
                {
                    InvoiceManagerPatientQueueCard_UC card = new InvoiceManagerPatientQueueCard_UC();
                    card.Dock = DockStyle.Top;

                    Invoice invoice = DBCommon.GetEntity <Invoice>(queue.InvoiceID);
                    if (invoice == null)
                    {
                        continue;
                    }
                    Patient_cu patient = DBCommon.GetEntity <Patient_cu>(invoice.Patient_CU_ID);
                    if (patient == null)
                    {
                        continue;
                    }
                    InvoiceDetail invoiceDetail = DBCommon.GetEntity <InvoiceDetail>(queue.InvoiceDetailID);
                    if (invoiceDetail == null)
                    {
                        continue;
                    }
                    QueueManager queueManager = DBCommon.GetEntity <QueueManager>(queue.QueueManagerID);
                    if (queueManager == null)
                    {
                        continue;
                    }
                    card.Initialize(this, invoice, patient, invoiceDetail, queueManager, queue.PatientID.ToString(), queue.PatientFullName,
                                    queue.DoctorID.ToString(), queue.DoctorFullName, queue.ServiceName, queue.ReservationTime.ToString());
                    tabServedPatients.Controls.Add(card);
                }
            }
            #endregion

            if (DoctorID != null)
            {
                Doctor_cu doctor =
                    Doctor_cu.ItemsList.Find(item => Convert.ToInt32(item.Person_CU_ID).Equals(Convert.ToInt32(DoctorID)));
                if (doctor != null)
                {
                    tabDoctorName.Text = doctor.Name_P;
                }
            }
        }
コード例 #15
0
        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);
                }
            }
        }