Exemplo 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);
        }
Exemplo n.º 2
0
        public WCFPatient getPatient()
        {
            if (null == _patient)
            {
                _patient = new WCFPatient();

                _patient.PatientID = _adapter.PID?.Patient_Identifier_List?[0]?.IDNumber.Read();
                if (string.IsNullOrEmpty(_patient.PatientID))
                {
                    _patient.PatientID = _adapter.PID?.Patient_ID?.IDNumber.Read();
                }
                if (string.IsNullOrEmpty(_patient.PatientID))
                {
                    _patient.PatientID = _adapter.PID?.Set_ID_PID.Read();
                }
                _patient.IssuerOfPatientID     = _adapter.PID?.Patient_Identifier_List?[0]?.AssigningAuthority.NamespaceID.Read();
                _patient.PatientNameFamilyName = _adapter.PID?.Patient_Name?[0]?.FamilyName.Surname.Read();
                _patient.PatientNameGivenName  = _adapter.PID?.Patient_Name?[0]?.GivenName.Read();
                _patient.PatientNameMiddleName = _adapter.PID?.Patient_Name?[0]?.SecondAndFurtherGivenNamesOrInitialsThereof.Read();
                _patient.PatientNamePrefix     = _adapter.PID?.Patient_Name?[0]?.PrefixEgDR.Read();
                _patient.PatientNameSuffix     = _adapter.PID?.Patient_Name?[0]?.SuffixEgJRorIII.Read();
                _patient.PatientBirthDate      = LTConvert.ToDicomDateRange(_adapter.PID?.Date_Time_of_Birth.Month, _adapter.PID?.Date_Time_of_Birth.Day, _adapter.PID?.Date_Time_of_Birth.Year);
                _patient.PatientSex            = _adapter.PID?.Administrative_Sex.Read();
                if (!DicomValidation.IsValidPatientSex(_patient.PatientSex))
                {
                    _patient.PatientSex = null;
                }
                _patient.EthnicGroup = _adapter.PID?.Race.Read();
                //_adapter.PID?.Patient_Address;
                //_adapter.PID?.Patient_Account_Number;
                _patient.PatientState  = _adapter.OBR?.Danger_Code.Read();
                _patient.MedicalAlerts = _adapter.OBR?.Relevant_Clinical_Information.ReadAsList();//may add support for plural (all OBR segements combined)
                _patient.ConfidentialityConstraintonPatientDataDescription = _adapter.PV1?.VIP_Indicator.Read();
                _patient.PregnancyStatus          = _adapter.PV1?.Ambulatory_Status.Read();
                _patient.PatientWeight            = _adapter.OBX?.Observation_Value.Read();
                _patient.ContrastAllergies        = _adapter.AL1?.Allergen_Type_Code.ReadAsList();//may add support for plural (all AL1 segements combined)
                _patient.PatientComments          = _adapter.Zxx?.Field_2.Read();
                _patient.AdditionalPatientHistory = _adapter.Zxx?.Field_3.Read();
                _patient.SpecialNeeds             = _adapter.Zxx?.Field_4.Read();
                _patient.LastMenstrualDate        = LTConvert.HL7DateToDicomDateRange(_adapter.Zxx?.Field_5.Read());

                DefaultValuesProvider.Visit(_patient);
            }
            return(_patient);
        }
Exemplo n.º 3
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);
        }