public void ShowPEMRHistoryContainer(GetBriefQueue_Result queueResult, VisitTiming visitTiming, bool doShow)
        {
            if (doShow)
            {
                QueueResult       = queueResult;
                ActiveVisitTiming = visitTiming;
                InvoiceDetailID   = QueueResult.InvoiceDetailID;
                switch (ApplicationStaticConfiguration.Application)
                {
                case DB_Application.PEMR:
                    CommonViewsActions.ShowUserControl(ref _pemrServingContainer, splitContainerControl1.Panel2);
                    if (_pemrServingContainer != null)
                    {
                        DB_QueueManagerStatus queueManagerStatus = (DB_QueueManagerStatus)queueResult.QueueStatusID;
                        switch (queueManagerStatus)
                        {
                        case DB_QueueManagerStatus.Waiting:
                            PEMRBusinessLogic.ActivePEMRObject            = PEMRBusinessLogic.GetPEMRObject(InvoiceDetailID);
                            PEMRBusinessLogic.ActivePEMRObject.PEMRStatus = PEMRStatus.CreateNewVisit;
                            break;
                        }

                        _pemrServingContainer.InitializePatientInfo(this, QueueResult, ActiveVisitTiming,
                                                                    PEMRBusinessLogic.ActivePEMRObject);
                        MerkDBBusinessLogicEngine.UpdateAndSave_QueueManagerStatus(queueResult.QueueManagerID,
                                                                                   DB_QueueManagerStatus.Serving);
                        lytPatientQueue.Visibility   = LayoutVisibility.Never;
                        lytPreviousVisits.Visibility = LayoutVisibility.Never;
                        emptySpaceItem1.Visibility   = LayoutVisibility.Never;
                        if (ApplicationStaticConfiguration.ActiveLoginUser != null &&
                            ApplicationStaticConfiguration.ActiveLoginUser.FullName != null)
                        {
                            btnUserDropDown.Text = PEMRBusinessLogic.ActiveLoggedInUser.FullName.ToString();
                        }
                    }
                    break;

                case DB_Application.OphalmologySurgeryApplication:

                    break;
                }
            }
            else
            {
                splitContainerControl1.Panel2.Controls.Clear();
                _pemrQueueContainer.Initialize(MerkDBBusinessLogicEngine.ActiveStationPointStage);
                lytPatientQueue.Visibility   = LayoutVisibility.Always;
                lytPreviousVisits.Visibility = LayoutVisibility.Always;
                emptySpaceItem1.Visibility   = LayoutVisibility.Always;
            }
        }
Exemplo n.º 2
0
        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;
            }
        }