Exemplo n.º 1
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_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);

            EpicObrView obr = new EpicObrView(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);

            EpicObxView epicObxView = EpicObxViewFactory.GetObxView(panelSetOrder.PanelSetId, this.m_AccessionOrder, this.m_PanelSetOrder.ReportNo, this.m_ObxCount);

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

            return(document);
        }
Exemplo n.º 2
0
        public YellowstonePathology.Business.Rules.MethodResult Send()
        {
            YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult();
            if (result.Success == true)
            {
                this.m_Document = new XElement("HL7Message");
                this.m_ObxCount = 1;

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

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

                EpicMshView msh = new EpicMshView(client, messageType, locationCode);
                msh.ToXml(this.m_Document);

                PidView pid = new PidView(this.m_ClientOrder.SvhMedicalRecord, this.m_ClientOrder.PLastName, this.m_ClientOrder.PFirstName, this.m_ClientOrder.PBirthdate,
                    this.m_ClientOrder.PSex, this.m_ClientOrder.SvhAccountNo, this.m_ClientOrder.PSSN);
                pid.ToXml(this.m_Document);

                EpicStatusOrcView orc = new EpicStatusOrcView(this.m_ClientOrder.ExternalOrderId, this.m_OrderingPhysician, this.m_OrderStatus);
                orc.ToXml(this.m_Document);

                EpicStatusObrView obr = new EpicStatusObrView(this.m_ClientOrder.ExternalOrderId, string.Empty, this.m_ClientOrder.OrderTime, null, this.m_OrderingPhysician, ResultStatusEnum.InProcess.Value, this.m_UniversalService);
                obr.ToXml(this.m_Document);

                EpicStatusObxView obx = new EpicStatusObxView(m_ObxCount);
                obx.ToXml(this.m_Document);
                this.m_ObxCount = obx.ObxCount;

                using (System.IO.StreamWriter sw = new System.IO.StreamWriter(this.m_ServerFileName))
                {
                    this.m_Document.Save(sw);
                }

                System.IO.File.Copy(this.m_ServerFileName, this.m_InterfaceFilename);
            }
            return result;
        }
Exemplo n.º 3
0
        public YellowstonePathology.Business.Rules.MethodResult Send()
        {
            YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult();
            if (result.Success == true)
            {
                this.m_Document = new XElement("HL7Message");
                this.m_ObxCount = 1;

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

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

                EpicMshView msh = new EpicMshView(client, messageType, locationCode);
                msh.ToXml(this.m_Document);

                PidView pid = new PidView(this.m_ClientOrder.SvhMedicalRecord, this.m_ClientOrder.PLastName, this.m_ClientOrder.PFirstName, this.m_ClientOrder.PBirthdate,
                                          this.m_ClientOrder.PSex, this.m_ClientOrder.SvhAccountNo, this.m_ClientOrder.PSSN);
                pid.ToXml(this.m_Document);

                EpicStatusOrcView orc = new EpicStatusOrcView(this.m_ClientOrder.ExternalOrderId, this.m_OrderingPhysician, this.m_OrderStatus);
                orc.ToXml(this.m_Document);

                EpicStatusObrView obr = new EpicStatusObrView(this.m_ClientOrder.ExternalOrderId, string.Empty, this.m_ClientOrder.OrderTime, null, this.m_OrderingPhysician, ResultStatusEnum.InProcess.Value, this.m_UniversalService);
                obr.ToXml(this.m_Document);

                EpicStatusObxView obx = new EpicStatusObxView(m_ObxCount);
                obx.ToXml(this.m_Document);
                this.m_ObxCount = obx.ObxCount;

                using (System.IO.StreamWriter sw = new System.IO.StreamWriter(this.m_ServerFileName))
                {
                    this.m_Document.Save(sw);
                }

                System.IO.File.Copy(this.m_ServerFileName, this.m_InterfaceFilename);
            }
            return(result);
        }
Exemplo n.º 4
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_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);

            EpicObrView obr = new EpicObrView(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);

            EpicObxView epicObxView = EpicObxViewFactory.GetObxView(panelSetOrder.PanelSetId, this.m_AccessionOrder, this.m_PanelSetOrder.ReportNo, this.m_ObxCount);
            epicObxView.ToXml(document);
            this.m_ObxCount = epicObxView.ObxCount;

            return document;
        }