使用公用tag 传递信息
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-08-12 16:06:01 +08:00
parent b5956ef6d2
commit 94c4a81974
2 changed files with 10 additions and 9 deletions

View File

@ -232,8 +232,7 @@ namespace IRaCIS.Core.SCP.Service
{ {
#region 测试接收课题组信息 #region 测试接收课题组信息
var privateTag = new DicomTag(0x9999, 0x1001, "HIR"); var groupIdsJson = request.Dataset.GetSingleValueOrDefault<string>(DicomTag.PatientName, string.Empty);
var groupIdsJson = request.Dataset.GetSingleValueOrDefault<string>(privateTag, string.Empty);
var projectGroupIds = JsonConvert.DeserializeObject<List<string>>(groupIdsJson); var projectGroupIds = JsonConvert.DeserializeObject<List<string>>(groupIdsJson);
Log.Logger.Information("收到课题组信息: " + string.Join(", ", projectGroupIds)); Log.Logger.Information("收到课题组信息: " + string.Join(", ", projectGroupIds));
#endregion #endregion

View File

@ -3410,15 +3410,17 @@ namespace IRaCIS.Application.Services
cmoveRequest.OnResponseReceived += responseDelegate; cmoveRequest.OnResponseReceived += responseDelegate;
#region 测试私有tag 传输信息 #region 测试私有tag 传输信息
// 声明私有Creator //// 声明私有Creator
var privateCreator = new DicomTag(0x9999, 0x0010); //var privateCreator = new DicomTag(0x9999, 0x0010);
cmoveRequest.Dataset.Add(new DicomLongString(privateCreator, "HIR")); //cmoveRequest.Dataset.Add(new DicomLongString(privateCreator, "HIR"));
//// 添加私有Tag元素号 >= 0x1000
//var privateTag = new DicomTag(0x9999, 0x1001);
//var groupIdsJson = (new List<string> { "KTGroup1", "KTGroup2" }).ToJson();
// 添加私有Tag元素号 >= 0x1000
var privateTag = new DicomTag(0x9999, 0x1001);
var groupIdsJson = (new List<string> { "KTGroup1", "KTGroup2" }).ToJson(); var groupIdsJson = (new List<string> { "KTGroup1", "KTGroup2" }).ToJson();
cmoveRequest.Dataset.Add(new DicomLongString(privateTag, groupIdsJson)); cmoveRequest.Dataset.Add(DicomTag.PatientName, groupIdsJson);
#endregion #endregion
@ -3443,7 +3445,7 @@ namespace IRaCIS.Application.Services
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError($"cmove error{ex.Message}"); _logger.LogError($"cmove error{ex.Message + ex.InnerException?.Message}");
} }
}); });