예제 #1
0
        private void SendAcknowledgements()
        {
            if (this.m_ClientOrderReceivingHandler.ClientOrder.SystemInitiatingOrder == "EPIC")
            {
                if (this.m_ClientOrderReceivingHandler.ClientOrder.Acknowledged == false)
                {
                    YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection universalServiceIdCollection = YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection.GetAll();
                    YellowstonePathology.Business.ClientOrder.Model.UniversalService           universalServiceId           = universalServiceIdCollection.GetByUniversalServiceId(this.m_ClientOrderReceivingHandler.ClientOrder.UniversalServiceId);

                    YellowstonePathology.Business.HL7View.EPIC.EpicStatusMessage statusMessage = new Business.HL7View.EPIC.EpicStatusMessage(this.m_ClientOrderReceivingHandler.ClientOrder, YellowstonePathology.Business.HL7View.OrderStatusEnum.InProcess, universalServiceId);
                    YellowstonePathology.Business.Rules.MethodResult             result        = statusMessage.Send();

                    if (result.Success == false)
                    {
                        YellowstonePathology.Business.Logging.EmailExceptionHandler.HandleException(result.Message);
                    }
                    else
                    {
                        this.m_ClientOrderReceivingHandler.ClientOrder.Acknowledged     = true;
                        this.m_ClientOrderReceivingHandler.ClientOrder.AcknowledgedById = YellowstonePathology.Business.User.SystemIdentity.Instance.User.UserId;
                        this.m_ClientOrderReceivingHandler.ClientOrder.AcknowledgedDate = DateTime.Now;
                    }
                }
            }

            this.m_ClientOrderReceivingHandler.Save(false);
            this.StartAccessionOrderPath();
        }
예제 #2
0
        private void MenuItemSendHL7StatusMessage_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewCaseList.SelectedItem != null)
            {
                YellowstonePathology.Business.Search.ReportSearchItem item = (YellowstonePathology.Business.Search.ReportSearchItem)this.ListViewCaseList.SelectedItem;
                YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection clientOrderCollection = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersByMasterAccessionNo(item.MasterAccessionNo);

                YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection universalServiceIdCollection = YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection.GetAll();
                YellowstonePathology.Business.ClientOrder.Model.UniversalService universalService = universalServiceIdCollection.GetByUniversalServiceId(clientOrderCollection[0].UniversalServiceId);

                YellowstonePathology.Business.HL7View.EPIC.EpicStatusMessage statusMessage = new Business.HL7View.EPIC.EpicStatusMessage(clientOrderCollection[0], YellowstonePathology.Business.HL7View.OrderStatusEnum.InProcess, universalService);
                YellowstonePathology.Business.Rules.MethodResult result = statusMessage.Send();

                if (result.Success == false)
                {
                    MessageBox.Show(result.Message);
                }
            }
        }
        private void SendStatusMessage()
        {
            if (this.m_ClientOrder.SystemInitiatingOrder == "EPIC")
            {
                if (this.m_ClientOrder.Acknowledged == false)
                {
                    YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection universalServiceIdCollection = YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection.GetAll();
                    YellowstonePathology.Business.ClientOrder.Model.UniversalService universalService = universalServiceIdCollection.GetByUniversalServiceId(this.m_ClientOrder.UniversalServiceId);

                    YellowstonePathology.Business.HL7View.EPIC.EpicStatusMessage statusMessage = new Business.HL7View.EPIC.EpicStatusMessage(this.m_ClientOrder, YellowstonePathology.Business.HL7View.OrderStatusEnum.InProcess, universalService);
                    YellowstonePathology.Business.Rules.MethodResult result = statusMessage.Send();

                    if (result.Success == false)
                    {
                        YellowstonePathology.Business.Logging.EmailExceptionHandler.HandleException(result.Message);
                    }
                    else
                    {
                        this.m_ClientOrder.Acknowledged = true;
                        this.m_ClientOrder.AcknowledgedById = this.m_SystemIdentity.User.UserId;
                        this.m_ClientOrder.AcknowledgedDate = DateTime.Now;
                    }
                }
            }
        }