Ejemplo n.º 1
0
        private XElement CreateDocument()
        {
            XElement document = new XElement("HL7Message");

            this.m_ObxCount = 1;

            ECWHl7Client client      = new ECWHl7Client();
            OruR01       messageType = new OruR01();

            string locationCode = "YPIIBILLINGS";

            ECWMSHView msh = new ECWMSHView(client, messageType, locationCode);

            msh.ToXml(document);

            ECWPIDView pid = new ECWPIDView(this.m_AccessionOrder.SvhMedicalRecord, this.m_AccessionOrder.PLastName, this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PBirthdate,
                                            this.m_AccessionOrder.PSex, this.m_AccessionOrder.PSSN);

            pid.ToXml(document);

            ECWORCView orc = new ECWORCView(this.m_AccessionOrder.ExternalOrderId, this.m_OrderingPhysician, this.m_AccessionOrder.MasterAccessionNo, OrderStatusEnum.Complete, this.m_AccessionOrder.SystemInitiatingOrder, this.m_SendUnsolicited);

            orc.ToXml(document);

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_PanelSetOrder.ReportNo);

            ResultStatus resultStatus = ResultStatusEnum.Final;

            if (panelSetOrder.AmendmentCollection.Count != 0)
            {
                resultStatus = ResultStatusEnum.Correction;
            }

            YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection universalServiceIdCollection = YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection.GetAll();
            YellowstonePathology.Business.ClientOrder.Model.UniversalService           universalService             = universalServiceIdCollection.GetByUniversalServiceId(panelSetOrder.UniversalServiceId);

            ECWOBRView obr = new ECWOBRView(this.m_AccessionOrder.ExternalOrderId, this.m_AccessionOrder.MasterAccessionNo, this.m_PanelSetOrder.ReportNo, this.m_AccessionOrder.SpecimenOrderCollection[0].CollectionDate, this.m_AccessionOrder.SpecimenOrderCollection[0].CollectionTime, this.m_AccessionOrder.AccessionDateTime,
                                            panelSetOrder.FinalTime, this.m_OrderingPhysician, resultStatus.Value, universalService, this.m_SendUnsolicited);

            obr.ToXml(document);

            ECWOBXView ecwOBXView = ECWOBXViewFactory.GetOBXView(panelSetOrder.PanelSetId, this.m_AccessionOrder, this.m_PanelSetOrder.ReportNo, this.m_ObxCount);

            ecwOBXView.ToXml(document);
            this.m_ObxCount = ecwOBXView.ObxCount;

            return(document);
        }
Ejemplo n.º 2
0
        private XElement CreateDocument()
        {
            XElement document = new XElement("HL7Message");

            this.m_ObxCount = 1;

            EPICHl7Client client      = new EPICHl7Client();
            OruR01        messageType = new OruR01();

            string locationCode = "YPIIBILLINGS";

            if (this.m_AccessionOrder.SvhMedicalRecord.StartsWith("A") == true)
            {
                locationCode = "SVHNPATH";
            }

            EPICMshView msh = new EPICMshView(client, messageType, locationCode);

            msh.ToXml(document);

            EpicPidView pid = new EpicPidView(this.m_AccessionOrder.SvhMedicalRecord, this.m_AccessionOrder.PLastName, this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PBirthdate,
                                              this.m_AccessionOrder.PSex, this.m_AccessionOrder.SvhAccount, this.m_AccessionOrder.PSSN);

            pid.ToXml(document);

            EPICOrcView orc = new EPICOrcView(this.m_PanelSetOrder.ExternalOrderId, this.m_OrderingPhysician, this.m_AccessionOrder.MasterAccessionNo, OrderStatusEnum.Complete, this.m_AccessionOrder.SystemInitiatingOrder, this.m_SendUnsolicited);

            orc.ToXml(document);

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_PanelSetOrder.ReportNo);

            string resultStatus = ResultStatusEnum.Final.Value;

            YellowstonePathology.Business.Amendment.Model.AmendmentCollection amendmentCollection = this.m_AccessionOrder.AmendmentCollection.GetAmendmentsForReport(panelSetOrder.ReportNo);
            if (amendmentCollection.Count != 0)
            {
                resultStatus = ResultStatusEnum.Correction.Value;
            }

            YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection universalServiceIdCollection = YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection.GetAll();
            YellowstonePathology.Business.ClientOrder.Model.UniversalService           universalService             = universalServiceIdCollection.GetByUniversalServiceId(panelSetOrder.UniversalServiceId);

            EPICBeakerObrView obr = new EPICBeakerObrView(this.m_PanelSetOrder.ExternalOrderId, this.m_AccessionOrder.MasterAccessionNo, this.m_PanelSetOrder.ReportNo, this.m_AccessionOrder.SpecimenOrderCollection[0].CollectionDate, this.m_AccessionOrder.SpecimenOrderCollection[0].CollectionTime, this.m_AccessionOrder.AccessionDateTime,
                                                          panelSetOrder.FinalTime, this.m_OrderingPhysician, resultStatus, universalService, this.m_SendUnsolicited, this.m_AccessionOrder.SystemInitiatingOrder);

            obr.ToXml(document);

            EPICObxView epicObxView = EPICObxViewFactory.GetObxView(panelSetOrder.PanelSetId, this.m_AccessionOrder, this.m_PanelSetOrder.ReportNo, this.m_ObxCount, true);

            epicObxView.ToXml(document);
            this.m_ObxCount = epicObxView.ObxCount;

            return(document);
        }
Ejemplo n.º 3
0
        private XElement CreateDocument()
        {
            XElement document = new XElement("HL7Message");

            this.m_ObxCount = 1;

            WPHHl7Client client      = new WPHHl7Client();
            OruR01       messageType = new OruR01();

            string     locationCode = "YPIIBILLINGS";
            WPHMSHView msh          = new WPHMSHView(client, messageType, locationCode);

            msh.ToXml(document);

            WPHPIDView pid = new WPHPIDView(this.m_AccessionOrder.SvhMedicalRecord, this.m_AccessionOrder.PLastName, this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PBirthdate,
                                            this.m_AccessionOrder.PSex, this.m_AccessionOrder.SvhAccount, this.m_AccessionOrder.PSSN);

            pid.ToXml(document);

            WPHORCView orc = new WPHORCView(this.m_AccessionOrder.ExternalOrderId, this.m_OrderingPhysician, this.m_AccessionOrder.MasterAccessionNo, OrderStatusEnum.Complete, this.m_AccessionOrder.SystemInitiatingOrder, this.m_SendUnsolicited);

            orc.ToXml(document);

            YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_PanelSetOrder.ReportNo);

            YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection universalServiceIdCollection = YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection.GetAll();
            YellowstonePathology.Business.ClientOrder.Model.UniversalService           universalService             = universalServiceIdCollection.GetByUniversalServiceId(panelSetOrder.UniversalServiceId);

            WPHOBRView obr = new WPHOBRView(this.m_AccessionOrder.ExternalOrderId, this.m_AccessionOrder.MasterAccessionNo, this.m_PanelSetOrder.ReportNo, this.m_AccessionOrder.SpecimenOrderCollection[0].CollectionDate, this.m_AccessionOrder.SpecimenOrderCollection[0].CollectionTime, this.m_AccessionOrder.AccessionDateTime,
                                            panelSetOrder.FinalTime, this.m_OrderingPhysician, this.m_SigningPathologist, this.GetResultStatus(), universalService, this.m_SendUnsolicited);

            obr.ToXml(document);

            WPHOBXView wphObxView = WPHOBXViewFactory.GetObxView(panelSetOrder.PanelSetId, this.m_AccessionOrder, this.m_PanelSetOrder.ReportNo, this.m_ObxCount);

            wphObxView.ToXml(document);
            this.m_ObxCount = wphObxView.ObxCount;

            if (this.m_ClientOrder != null)
            {
                WPHOBXCCView wphOBXCCView = new WPHOBXCCView(this.m_ClientOrder);
                wphOBXCCView.ToXml(document);
            }

            return(document);
        }
Ejemplo n.º 4
0
        private void SendStatusMessage(YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder)
        {
            if (clientOrder.SystemInitiatingOrder == "EPIC")
            {
                if (clientOrder.Acknowledged == false)
                {
                    YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection universalServiceIdCollection = YellowstonePathology.Business.ClientOrder.Model.UniversalServiceCollection.GetAll();
                    YellowstonePathology.Business.ClientOrder.Model.UniversalService           universalService             = universalServiceIdCollection.GetByUniversalServiceId(clientOrder.UniversalServiceId);

                    YellowstonePathology.Business.HL7View.EPIC.EPICStatusMessage statusMessage = new Business.HL7View.EPIC.EPICStatusMessage(clientOrder, YellowstonePathology.Business.HL7View.OrderStatusEnum.InProcess, universalService, "Yellowstone Pathology Institute: Order Is In Process.", "I", clientOrder.OrderDate.Value);
                    statusMessage.Publish();

                    clientOrder.Acknowledged     = true;
                    clientOrder.AcknowledgedById = this.m_SystemIdentity.User.UserId;
                    clientOrder.AcknowledgedDate = DateTime.Now;
                }
            }
        }
Ejemplo n.º 5
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();
        }
Ejemplo n.º 6
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, "Yellowstone Pathology Institute: Order Is In Process.", "I", this.m_ClientOrderReceivingHandler.ClientOrder.OrderDate.Value);
                    statusMessage.Publish();

                    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.StartAccessionOrderPath();
        }