コード例 #1
0
        public static void handleProcessingForORU(List <WebserviceObject> wsObjects,
                                                  List <WebservicePropertySet> webserviceProperties,
                                                  HL7Message hl7Message,
                                                  List <MessageGroupInstance> messageGroupInstances,
                                                  List <MessageGroup> messageGroups,
                                                  Application app,
                                                  Message message)
        {
            string serviceMessage = BLANK;

            // make SEL exam object
            WSShieldsApps.Exam exam
                = new WSShieldsApps.Exam();
            WSShieldsApps.Location location
                = new WSShieldsApps.Location();
            WSShieldsApps.Patient patient
                = new WSShieldsApps.Patient();
            WSShieldsApps.Organization organization
                = new WSShieldsApps.Organization();
            WSShieldsApps.Doctor referring
                = new WSShieldsApps.Doctor();
            // make SEL report object
            WSShieldsApps.Report report
                = new WSShieldsApps.Report();
            WSShieldsApps.Doctor radiologist
                = new WSShieldsApps.Doctor();

            // for each object - for each property set for that object - handle accordingly
            wsObjects.ForEach(delegate(WebserviceObject wsObject)
            {
                List <WebservicePropertySet> wsProperties
                    = ConfigurationUtility.GetIncomingWebservicePropertySets(wsObject, webserviceProperties);

                if (app.name == RSERVER)
                {
                    if (ShieldsExpressLinkDAO.LOCATION == wsObject.name)
                    {
                        location = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Location>(
                            ShieldsExpressLinkUtility.ObjectType.Location,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.PATIENT == wsObject.name)
                    {
                        patient = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Patient>(
                            ShieldsExpressLinkUtility.ObjectType.Patient,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.ORGANIZATION == wsObject.name)
                    {
                        organization = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Organization>(
                            ShieldsExpressLinkUtility.ObjectType.Organization,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.EXAM == wsObject.name)
                    {
                        exam = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Exam>(
                            ShieldsExpressLinkUtility.ObjectType.Exam,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.REFERRING == wsObject.name)
                    {
                        referring = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Doctor>(
                            ShieldsExpressLinkUtility.ObjectType.Referring,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.REPORT == wsObject.name)
                    {
                        report = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Report>(
                            ShieldsExpressLinkUtility.ObjectType.Report,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.RADIOLOGIST == wsObject.name)
                    {
                        radiologist = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Doctor>(
                            ShieldsExpressLinkUtility.ObjectType.Radiologist,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                        // set as radiologist
                        radiologist.Type         = RADIOLOGIST_TYPE;
                        radiologist.EnterpriseId = ENTERPRISE_IDENTITY;
                    }
                }
            });

            // set exam object
            exam.Location     = location;
            exam.Doctor       = referring;
            exam.Organization = organization;
            exam.Patient      = patient;

            // make a new exam object
            WSShieldsApps.Exam exam2Object = new WSShieldsApps.Exam();

            // pass the accession so we don't override
            exam2Object.AccessionNo = exam.AccessionNo;

            // get the updated exam id only
            exam.ExamId = ShieldsExpressLinkDAO.GetExamByAccessionNo(exam2Object).ExamId;

            // handle radiologist
            serviceMessage += ShieldsExpressLinkDAO.PutDoctor(radiologist);

            // handle exam
            serviceMessage += ShieldsExpressLinkDAO.PutExam(exam);

            // report needs exam id associated to it
            report.ExamId = exam.ExamId;

            // report needs radiologist id associated to it
            report.RadiologistId = radiologist.DoctorId;

            // handle orignal report
            serviceMessage += ShieldsExpressLinkDAO.PostReport(report);

            // handle addendum text only
            if (ShieldsExpressLinkUtility.isReportAddendum(hl7Message))
            {
                // for each report text starting at "2" (1 == orignal report) get all addendums after
                for (int reportIteration = 2, n = ShieldsExpressLinkUtility.getNumberOfReportEntries(hl7Message);
                     reportIteration <= n;
                     reportIteration++)
                {
                    // set the addendum flag
                    report.IsAddendum = true;

                    // re-define report text and observation date
                    report.ReportText = ShieldsExpressLinkUtility.getAddendumReportText(hl7Message, report, reportIteration);

                    // handle inserting of addendum report
                    serviceMessage += ShieldsExpressLinkDAO.PostReport(report, reportIteration);
                }
            }

            // message for the service
            handleAckForService(hl7Message, message, serviceMessage);

            // message log handler
            handleMessageLog(message);
        }
コード例 #2
0
        public static void handleProcessingForORM(List <WebserviceObject> wsObjects,
                                                  List <WebservicePropertySet> webserviceProperties,
                                                  HL7Message hl7Message,
                                                  List <MessageGroupInstance> messageGroupInstances,
                                                  List <MessageGroup> messageGroups,
                                                  Application app,
                                                  Message message)
        {
            string serviceMessage = BLANK;

            // make SEL exam object
            WSShieldsApps.Exam exam
                = new WSShieldsApps.Exam();
            WSShieldsApps.Location location
                = new WSShieldsApps.Location();
            WSShieldsApps.Patient patient
                = new WSShieldsApps.Patient();
            WSShieldsApps.Organization organization
                = new WSShieldsApps.Organization();
            WSShieldsApps.Doctor referring
                = new WSShieldsApps.Doctor();

            // for each object - for each property set for that object - handle accordingly
            wsObjects.ForEach(delegate(WebserviceObject wsObject)
            {
                List <WebservicePropertySet> wsProperties
                    = ConfigurationUtility.GetIncomingWebservicePropertySets(wsObject, webserviceProperties);

                if (app.name == RSERVER)
                {
                    if (ShieldsExpressLinkDAO.LOCATION == wsObject.name)
                    {
                        location = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Location>(
                            ShieldsExpressLinkUtility.ObjectType.Location,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.PATIENT == wsObject.name)
                    {
                        patient = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Patient>(
                            ShieldsExpressLinkUtility.ObjectType.Patient,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.ORGANIZATION == wsObject.name)
                    {
                        organization = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Organization>(
                            ShieldsExpressLinkUtility.ObjectType.Organization,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.EXAM == wsObject.name)
                    {
                        exam = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Exam>(
                            ShieldsExpressLinkUtility.ObjectType.Exam,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                    else if (ShieldsExpressLinkDAO.REFERRING == wsObject.name)
                    {
                        referring = ShieldsExpressLinkUtility.getShieldsAppObject <WSShieldsApps.Doctor>(
                            ShieldsExpressLinkUtility.ObjectType.Referring,
                            hl7Message, messageGroupInstances,
                            messageGroups,
                            wsProperties);
                    }
                }
            });

            // exam object
            exam.Location     = location;
            exam.Doctor       = referring;
            exam.Organization = organization;
            exam.Patient      = patient;

            // insert exam
            serviceMessage += ShieldsExpressLinkDAO.PutExam(exam);

            // message for the service
            handleAckForService(hl7Message, message, serviceMessage);

            // message log handler
            handleMessageLog(message);
        }