|
@@ -183,9 +183,9 @@ namespace Worklist_SCP.Model
|
|
|
// Parsing result
|
|
|
foreach (var result in results)
|
|
|
{
|
|
|
- var resultingSPS = new DicomDataset();
|
|
|
+ // var resultingSPS = new DicomDataset();
|
|
|
var resultDataset = new DicomDataset();
|
|
|
- var resultingSPSSequence = new DicomSequence(DicomTag.ScheduledProcedureStepSequence, resultingSPS);
|
|
|
+ // var resultingSPSSequence = new DicomSequence(DicomTag.ScheduledProcedureStepSequence, resultingSPS);
|
|
|
|
|
|
// DicomDataset dds = new DicomDataset();
|
|
|
string EXAM_NO = result.EXAM_NO.ToString();
|
|
@@ -201,7 +201,7 @@ namespace Worklist_SCP.Model
|
|
|
//
|
|
|
PatientSex = FormatSex(PatientSex);
|
|
|
PatientAge = FormatAge(PatientAge);
|
|
|
- //
|
|
|
+ // //
|
|
|
// if (string.IsNullOrEmpty(PinyinName)) {
|
|
|
// PinyinName = HanziToPinyin(HanziName);
|
|
|
// }
|
|
@@ -211,51 +211,68 @@ namespace Worklist_SCP.Model
|
|
|
if (string.IsNullOrEmpty(StudyUid)) {
|
|
|
StudyUid = "1.3.6.1.4.1.30071.8." + PatientID + "." + EXAM_NO;
|
|
|
}
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.ScheduledStationAETitle, "CFINDSCP"); // 西门子需要设置aetitle
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.AccessionNumber, AccessionNb);
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.PatientID, PatientID);
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.PatientSex, PatientSex);
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.PatientAge, PatientAge);
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.PatientName, PinyinName);
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.StudyInstanceUID, StudyUid);
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.StudyInstanceUID, StudyUid);
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.ScheduledStationAETitle, "CFINDSCP"); // 西门子需要设置aetitle
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.AccessionNumber, AccessionNb);
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.PatientID, PatientID);
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.PatientSex, PatientSex);
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.PatientAge, PatientAge);
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.PatientName, PinyinName);
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.StudyInstanceUID, StudyUid);
|
|
|
+ // // AddIfExistsInRequest(resultDataset, request, DicomTag.PatientBirthDate, result.DATE_OF_BIRTH);
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.PatientBirthDate, birthDate);
|
|
|
+ // if (!string.IsNullOrEmpty(Patient_Weight)) {
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.PatientWeight, Patient_Weight);
|
|
|
+ // }
|
|
|
+ // DicomDataset backSR = new DicomDataset();;
|
|
|
+ // AddIfExistsInRequest(backSR, request, DicomTag.AccessionNumber, AccessionNb);
|
|
|
+ // AddIfExistsInRequest(backSR, request, DicomTag.ScheduledStationAETitle, "CFINDSCP");
|
|
|
+ // resultDataset.Add(DicomTag.ReferencedStudySequence, backSR);
|
|
|
+ // DicomDataset backsps = new DicomDataset();
|
|
|
+ // AddIfExistsInRequest(backsps, request, DicomTag.RequestedProcedureDescription, result.REQ_MEMO.ToString());
|
|
|
+ // AddIfExistsInRequest(backsps, request, DicomTag.ScheduledProcedureStepStartDate, result.SCHEDULED_DATE_TIME);
|
|
|
+ // AddIfExistsInRequest(backsps, request, DicomTag.ScheduledProcedureStepEndTime, result.SCHEDULED_DATE_TIME);
|
|
|
+ // AddIfExistsInRequest(backsps, request, DicomTag.Modality, MODALITY);
|
|
|
+ // AddIfExistsInRequest(backsps, request, DicomTag.ScheduledProcedureStepID, "8008" + result.EXAM_NO);
|
|
|
+ // resultDataset.Add(DicomTag.ScheduledProcedureStepSequence, backsps);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ resultDataset.Add(DicomTag.ScheduledStationAETitle, "CFINDSCP"); // 西门子需要设置aetitle
|
|
|
+ resultDataset.Add(DicomTag.AccessionNumber, AccessionNb);
|
|
|
+ resultDataset.Add(DicomTag.PatientID, PatientID);
|
|
|
+ resultDataset.Add(DicomTag.PatientSex, PatientSex);
|
|
|
+ resultDataset.Add(DicomTag.PatientAge, PatientAge);
|
|
|
+ resultDataset.Add(DicomTag.PatientName, PinyinName);
|
|
|
+ resultDataset.Add(DicomTag.StudyInstanceUID, StudyUid);
|
|
|
+ // AddIfExistsInRequest(resultDataset, request, DicomTag.PatientBirthDate, result.DATE_OF_BIRTH);
|
|
|
+ resultDataset.Add(DicomTag.PatientBirthDate, birthDate);
|
|
|
+
|
|
|
if (!string.IsNullOrEmpty(Patient_Weight)) {
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.PatientWeight, Patient_Weight);
|
|
|
+ resultDataset.Add(DicomTag.PatientWeight, Patient_Weight);
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.PatientWeight, "");
|
|
|
- }
|
|
|
- DicomDataset backSR = new DicomDataset();
|
|
|
- backSR.Add(DicomTag.AccessionNumber, AccessionNb);
|
|
|
+
|
|
|
+ DicomDataset backSR = new DicomDataset();;
|
|
|
+ backSR.Add(DicomTag.AccessionNumber, AccessionNb);
|
|
|
backSR.Add(DicomTag.ScheduledStationAETitle, "CFINDSCP");
|
|
|
resultDataset.Add(DicomTag.ReferencedStudySequence, backSR);
|
|
|
+
|
|
|
+
|
|
|
DicomDataset backsps = new DicomDataset();
|
|
|
- // backsps.Add(DicomTag.RequestedProcedureDescription, result.REQ_MEMO.ToString());
|
|
|
- DateTime spsStartDate = result.SCHEDULED_DATE_TIME;
|
|
|
- backsps.Add(DicomTag.ScheduledProcedureStepStartDate, spsStartDate);
|
|
|
- //backsps.Add(DicomTag.ScheduledProcedureStepStartTime, "010203"); //胶囊胃镜需要传
|
|
|
- backsps.Add(DicomTag.ScheduledProcedureStepEndTime, spsStartDate);
|
|
|
- backsps.Add(DicomTag.Modality, MODALITY);
|
|
|
- backsps.Add(DicomTag.ScheduledProcedureStepID, "8008" + result.EXAM_NO.ToString());
|
|
|
+ backsps.Add(DicomTag.RequestedProcedureDescription, result.REQ_MEMO.ToString());
|
|
|
+ backsps.Add(DicomTag.ScheduledProcedureStepStartDate, result.SCHEDULED_DATE_TIME);
|
|
|
+ backsps.Add(DicomTag.ScheduledProcedureStepEndTime, result.SCHEDULED_DATE_TIME);
|
|
|
+ backsps.Add(DicomTag.Modality, MODALITY);
|
|
|
+ backsps.Add(DicomTag.ScheduledProcedureStepID, "8008" + result.EXAM_NO);
|
|
|
resultDataset.Add(DicomTag.ScheduledProcedureStepSequence, backsps);
|
|
|
|
|
|
- // Put blanks in for unsupported fields which are type 2 (i.e. must have a value even if NULL)
|
|
|
- // In a real server, you may wish to support some or all of these, but they are not commonly supported
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.ReferencedStudySequence, new DicomDataset()); // Ref//d Study Sequence
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.Priority, ""); // Priority
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.PatientTransportArrangements, ""); // Transport Arrangements
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.AdmissionID, ""); // Admission ID
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.CurrentPatientLocation, ""); // Patient Location
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.ReferencedPatientSequence, new DicomDataset()); // Ref//d Patient Sequence
|
|
|
- AddIfExistsInRequest(resultDataset, request, DicomTag.ConfidentialityConstraintOnPatientDataDescription, ""); // Confidentiality Constraint
|
|
|
- // AddIfExistsInRequest(resultDataset, request, DicomTag.ScheduledProcedureStepID , "8008" + result.EXAM_NO.ToString()); // Confidentiality Constraint
|
|
|
- // AddIfExistsInRequest(resultDataset, request, DicomTag.PerformedProcedureStepID , "8008" + result.EXAM_NO.ToString()); // Confidentiality Constraint
|
|
|
-
|
|
|
// Send Reponse Back
|
|
|
yield return resultDataset;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
public static string FormatSex(string sex)
|
|
|
{
|