|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using Dapper; |
|
|
|
using Npgsql; |
|
|
|
using Shentun.Peis.PlugIns.LisRequests; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Data.Common; |
|
|
|
@ -7,20 +8,20 @@ using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
namespace Shentun.Peis.PlugIns |
|
|
|
namespace Shentun.Peis.PlugIns.ImportLisResults |
|
|
|
{ |
|
|
|
public class ImportLisResultPlugInsBase : ThirdPlugInsBase |
|
|
|
{ |
|
|
|
public ImportLisResultPlugInsBase(Guid thirdInterfaceId) : base(thirdInterfaceId) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//protected string AppLisUser;
|
|
|
|
//protected string AppLisPassword;
|
|
|
|
public ImportLisResultPlugInsBase(string parmValue) : base(parmValue) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
//AppLisUser = AppConfig.GetSection("App")
|
|
|
|
// .GetSection("LisUser").Value;
|
|
|
|
//AppLisPassword = AppConfig.GetSection("App")
|
|
|
|
@ -47,7 +48,7 @@ namespace Shentun.Peis.PlugIns |
|
|
|
where patient_register.id = @PatientRegisterId |
|
|
|
";
|
|
|
|
var lisRequestForImportResultPlugInss = (await conn.QueryAsync<LisRequestForImportResultPlugIns>(sql, |
|
|
|
new { PatientRegisterId = patientRegisterId })).ToList(); |
|
|
|
new { PatientRegisterId = patientRegisterId })).ToList(); |
|
|
|
return lisRequestForImportResultPlugInss; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -71,14 +72,14 @@ lis_request.creation_time > @StartDate |
|
|
|
ORDER BY register_check.patient_register_id |
|
|
|
";
|
|
|
|
var patientRegisterForLisRequests = (await conn.QueryAsync<PatientRegisterForLisRequest>(sql, |
|
|
|
new { MedicalCenterId = _thirdInterfaceDto.MedicalCenterId, StartDate = startDate })).ToList(); |
|
|
|
new { _thirdInterfaceDto.MedicalCenterId, StartDate = startDate })).ToList(); |
|
|
|
|
|
|
|
return patientRegisterForLisRequests; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public override Task DoWork() |
|
|
|
public override Task DoWork() |
|
|
|
{ |
|
|
|
//var loginResult = LoginAsync().Result;
|
|
|
|
var queryDaysStr = InterfaceConfig.GetSection("Interface").GetSection("Scheduler").GetSection("QueryDays").Value; |
|
|
|
@ -96,15 +97,15 @@ ORDER BY register_check.patient_register_id |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
var result = ImportResultByPatientRegisterIdAsync(patientRegister.PatientRegisterId).Result; |
|
|
|
var result = ImportResultByPatientRegisterIdAsync(patientRegister.PatientRegisterId).Result; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
return Task.CompletedTask ; |
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
//protected async override Task<LoginOutDto> LoginAsync()
|