|
@@ -5,6 +5,7 @@ using WingInterfaceLibrary.Request.DBVitalRequest;
|
|
|
using WingInterfaceLibrary.DTO.Vital;
|
|
|
using WingInterfaceLibrary.Request;
|
|
|
using WingInterfaceLibrary.Enum;
|
|
|
+using Newtonsoft.Json;
|
|
|
|
|
|
namespace VitalService.Service
|
|
|
{
|
|
@@ -164,13 +165,26 @@ namespace VitalService.Service
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- var jingQiRes = await _jingQiApiHelper.ExamRegisterAsync(new Factury.JingQiExamRegisterRequest
|
|
|
+ var jingQiReq = new Factury.JingQiExamRegisterRequest
|
|
|
{
|
|
|
identity = request.Identity,
|
|
|
orgcode = facturyOrg.FacturyCode,
|
|
|
usrcode = facturyUser.FacturyCode,
|
|
|
phydatetime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
|
|
- }, facturyOrg.FacturyData);
|
|
|
+ };
|
|
|
+ var jingQiRes = await _jingQiApiHelper.ExamRegisterAsync(jingQiReq, facturyOrg.FacturyData);
|
|
|
+ await _vitalFacturyPostHistoryDBService.CreateFacturyPostHistoryDBAsync(new CreateFacturyPostHistoryDBRequest
|
|
|
+ {
|
|
|
+ ApiType = "ExamRegisterAsync",
|
|
|
+ FacturyUrl = _jingQiApiHelper.RegisterUrl,
|
|
|
+ IDCardNo = request.Identity,
|
|
|
+ PatientName = request.PatientName,
|
|
|
+ Status = jingQiRes.status == "0" ? 2 : 3,
|
|
|
+ PostTime = DateTime.UtcNow,
|
|
|
+ Headers = facturyOrg.FacturyData,
|
|
|
+ Content = JsonConvert.SerializeObject(jingQiReq),
|
|
|
+ Result = JsonConvert.SerializeObject(jingQiRes),
|
|
|
+ });
|
|
|
return new FacturyExamRegisterResult
|
|
|
{
|
|
|
Status = jingQiRes.status,
|
|
@@ -228,10 +242,23 @@ namespace VitalService.Service
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- var jingQiRes = await _jingQiApiHelper.ExamDeleteAsync(new Factury.JingQiExamDeleteRequest
|
|
|
+ var jingQiReq = new Factury.JingQiExamDeleteRequest
|
|
|
{
|
|
|
phyid = request.PhyId,
|
|
|
- }, facturyOrg.FacturyData);
|
|
|
+ };
|
|
|
+ var jingQiRes = await _jingQiApiHelper.ExamDeleteAsync(jingQiReq, facturyOrg.FacturyData);
|
|
|
+ await _vitalFacturyPostHistoryDBService.CreateFacturyPostHistoryDBAsync(new CreateFacturyPostHistoryDBRequest
|
|
|
+ {
|
|
|
+ ApiType = "ExamDeleteAsync",
|
|
|
+ FacturyUrl = _jingQiApiHelper.DeleteRegisterUrl,
|
|
|
+ IDCardNo = request.Identity,
|
|
|
+ PatientName = request.PatientName,
|
|
|
+ Status = jingQiRes.status == "0" ? 2 : 3,
|
|
|
+ PostTime = DateTime.UtcNow,
|
|
|
+ Headers = facturyOrg.FacturyData,
|
|
|
+ Content = JsonConvert.SerializeObject(jingQiReq),
|
|
|
+ Result = JsonConvert.SerializeObject(jingQiRes),
|
|
|
+ });
|
|
|
return new FacturyExamDeleteResult
|
|
|
{
|
|
|
Status = jingQiRes.status,
|