|
|
|
@ -32,6 +32,7 @@ namespace Shentun.Peis.PlugIns.Extensions.ThirdPushs.Hty |
|
|
|
public class PushPeisResultPlugInsHty : PushPeisResultPlugInsBase |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
public PushPeisResultPlugInsHty(Guid thirdInterfaceId) : base(thirdInterfaceId) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -62,6 +63,11 @@ namespace Shentun.Peis.PlugIns.Extensions.ThirdPushs.Hty |
|
|
|
var pushBaseApi = InterfaceConfig.GetValue("Interface:PushBaseApi", ""); |
|
|
|
var columnReferenceId = InterfaceConfig.GetValue("Interface:ColumnReferenceId", ""); |
|
|
|
|
|
|
|
var token = GetThirdToken(); |
|
|
|
if (string.IsNullOrWhiteSpace(token)) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException("获取token失败"); |
|
|
|
} |
|
|
|
|
|
|
|
using (DbConnection conn = new NpgsqlConnection(AppConnctionStr)) |
|
|
|
{ |
|
|
|
@ -126,11 +132,11 @@ namespace Shentun.Peis.PlugIns.Extensions.ThirdPushs.Hty |
|
|
|
{ |
|
|
|
var constr = new pushHtyDataItemDto |
|
|
|
{ |
|
|
|
dicValue = itemRow.reference_range_value.ToString(), |
|
|
|
dicValue = itemRow.reference_range_value, |
|
|
|
ordinary = 1, |
|
|
|
p_value = itemRow.result.ToString(), |
|
|
|
p_value = itemRow.result, |
|
|
|
sysCode = itemCode.interface_code_value, |
|
|
|
unit = itemRow.unit.ToString() |
|
|
|
unit = itemRow.unit |
|
|
|
}; |
|
|
|
var dcIndex = contents.Count + 1; |
|
|
|
|
|
|
|
@ -148,7 +154,7 @@ namespace Shentun.Peis.PlugIns.Extensions.ThirdPushs.Hty |
|
|
|
//推送信息
|
|
|
|
|
|
|
|
var formContent = new MultipartFormDataContent(); |
|
|
|
formContent.Add(new StringContent(_thirdToken), "token"); |
|
|
|
formContent.Add(new StringContent(token), "token"); |
|
|
|
formContent.Add(new StringContent("fbpc"), "urlFrom"); |
|
|
|
formContent.Add(new StringContent("-1"), "tmId"); |
|
|
|
formContent.Add(new StringContent(pushRequestJsonString, Encoding.UTF8, "application/json"), "pushData"); |
|
|
|
@ -159,7 +165,7 @@ namespace Shentun.Peis.PlugIns.Extensions.ThirdPushs.Hty |
|
|
|
if (resultModel.stateMessage == "suc") |
|
|
|
{ |
|
|
|
#region 更新人员状态
|
|
|
|
|
|
|
|
conn.Execute("update patient_register set is_push_third_result='Y' where id=@patient_register_id", new { patient_register_id = patientRegisterId }); |
|
|
|
#endregion
|
|
|
|
} |
|
|
|
|
|
|
|
|