Ejemplo n.º 1
0
        public WCFPPSInformation getPPS()
        {
            if (_pps == null)
            {
                _pps = new WCFPPSInformation();

                _pps.PPSDiscontinuationReasonCodeSequence = new List <PPSDiscontinuationReasonCodeSequence>()
                {
                };
                _pps.ProcedureCodeSequence = new List <ProcedureCodeSequence>()
                {
                };
                _pps.PerformedProtocolCodeSequence = new List <PerformedProtocolCodeSequence>()
                {
                };
                _pps.PPSRelationShip = new List <PPSRelationship>()
                {
                };
                _pps.PerformedSeriesSequence = new List <PerformedSeriesSequence>()
                {
                };
                _pps.ReferencedImageSequence = new List <WCFReferencedImageSequence>()
                {
                };
                _pps.ReferencedNonImageCompositeSequence = new List <ReferencedNonImageCompositeSequence>()
                {
                };
                _pps.UnscheduledPatient = new PatientInfoforUnscheduledPPS();
                _pps.Patient            = getPatient();
                _pps.StudyInstanceUID   = _adapter.IPC?.Study_Instance_UID.Read();
                if (string.IsNullOrEmpty(_pps.StudyInstanceUID))
                {
                    _pps.StudyInstanceUID = _adapter.Zxx?.Field_1.Read(0);
                }
                _pps.StudyID  = _adapter.Zxx?.Field_23.Read();
                _pps.Modality = _adapter.IPC?.Modality.Read();
                if (string.IsNullOrEmpty(_pps.Modality))
                {
                    _pps.Modality = _adapter.OBR?.Diagnostic_Serv_Sect_ID.Read();
                }
                if (!DicomValidation.IsValidModality(_pps.Modality))
                {
                    _pps.Modality = null;
                }
                _pps.CommentsonthePerformedProcedureStep = _adapter.Zxx?.Field_24.Read();
                _pps.PerformedProcedureTypeDescription   = _adapter.Zxx?.Field_25.Read();
                _pps.PerformedProcedureStepDescription   = _adapter.Zxx?.Field_26.Read();
                _pps.PerformedProcedureStepStatus        = _adapter.Zxx?.Field_27.Read();
                _pps.PerformedLocation        = _adapter.Zxx?.Field_28.Read();
                _pps.PerformedStationName     = _adapter.Zxx?.Field_29.Read();
                _pps.PerformedStationAETitle  = _adapter.Zxx?.Field_30.Read();
                _pps.PerformedProcedureStepID = _adapter.Zxx?.Field_31.Read();
                _pps.MPPSSOPInstanceUID       = _adapter.Zxx?.Field_32.Read();

                DefaultValuesProvider.Visit(_pps);
            }

            return(_pps);
        }
Ejemplo n.º 2
0
        public WCFScheduledProcedureStep getProcedureStep()
        {
            if (_procedureStep == null)
            {
                _procedureStep = new WCFScheduledProcedureStep();

                _procedureStep.ScheduledProcedureStepID = _adapter.IPC?.Scheduled_Procedure_Step_ID.Read();
                if (string.IsNullOrEmpty(_procedureStep.ScheduledProcedureStepID))
                {
                    _procedureStep.ScheduledProcedureStepID = _adapter.OBR?.Filler_Field_1.Read();
                }
                _procedureStep.ScheduledProcedureStepStartDate_Time = LTConvert.HL7DateToDateRange(_adapter.Zxx?.Field_8.Read());
                _procedureStep.Modality = _adapter.IPC?.Modality.Read();
                if (string.IsNullOrEmpty(_procedureStep.Modality))
                {
                    _procedureStep.Modality = _adapter.OBR?.Diagnostic_Serv_Sect_ID.Read();
                }
                if (!DicomValidation.IsValidModality(_procedureStep.Modality))
                {
                    _procedureStep.Modality = null;
                }
                _procedureStep.ScheduledProcedureStepDescription = _adapter.Zxx?.Field_9.Read();
                _procedureStep.ScheduledStationAETitle           = _adapter.IPC?.Scheduled_Station_AE_Title.ReadAsList();
                if (_procedureStep.ScheduledStationAETitle == null)
                {
                    _procedureStep.ScheduledStationAETitle = _adapter.Zxx?.Field_10.ReadAsList();
                }
                _procedureStep.ScheduledProcedureStepLocation             = _adapter.Zxx?.Field_11.Read();
                _procedureStep.ScheduledPerformingPhysicianNameFamilyName = _adapter.OBR?.Technician?[0]?.Name.FamilyName.Read();
                _procedureStep.ScheduledPerformingPhysicianNameGivenName  = _adapter.OBR?.Technician?[0]?.Name.GivenName.Read();
                _procedureStep.ScheduledPerformingPhysicianNameMiddleName = _adapter.OBR?.Technician?[0]?.Name.SecondAndFurtherGivenNamesOrInitialsThereof.Read();
                _procedureStep.ScheduledPerformingPhysicianNamePrefix     = _adapter.OBR?.Technician?[0]?.Name.PrefixEgDR.Read();
                _procedureStep.ScheduledPerformingPhysicianNameSuffix     = _adapter.OBR?.Technician?[0]?.Name.SuffixEgJRorIII.Read();
                _procedureStep.Pre_Medication         = _adapter.Zxx?.Field_12.Read();
                _procedureStep.RequestedContrastAgent = _adapter.Zxx?.Field_13.Read();

                DefaultValuesProvider.Visit(_procedureStep);
            }
            return(_procedureStep);
        }