Clinical Sync Batch Engine: first commit
This commit is contained in:
@@ -9,6 +9,7 @@ using FluentValidation;
|
||||
using FluentValidation.AspNetCore;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Reflection;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -46,7 +47,9 @@ try
|
||||
ValidAudience = jwtOptions.Audience,
|
||||
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(jwtOptions.SigningKey))
|
||||
};
|
||||
});
|
||||
})
|
||||
.AddScheme<AuthenticationSchemeOptions, GatewayApiKeyAuthenticationHandler>(
|
||||
GatewayApiKeyAuthenticationHandler.SchemeName, null);
|
||||
|
||||
builder.Services.AddSingleton<IAuthorizationPolicyProvider, PermissionPolicyProvider>();
|
||||
builder.Services.AddSingleton<IAuthorizationHandler, PermissionAuthorizationHandler>();
|
||||
@@ -126,6 +129,9 @@ try
|
||||
.GetSection(DashboardOptions.Section)
|
||||
.Get<DashboardOptions>() ?? new DashboardOptions();
|
||||
|
||||
builder.Services.Configure<ClinicalSyncOptions>(
|
||||
builder.Configuration.GetSection(ClinicalSyncOptions.Section));
|
||||
|
||||
builder.Services.Configure<FhirOptions>(
|
||||
builder.Configuration.GetSection(FhirOptions.Section));
|
||||
|
||||
@@ -140,6 +146,8 @@ try
|
||||
builder.Services.Configure<PhiEncryptionOptions>(
|
||||
builder.Configuration.GetSection(PhiEncryptionOptions.Section));
|
||||
|
||||
builder.Services.Configure<ClinicalSyncOptions>(builder.Configuration.GetSection(ClinicalSyncOptions.Section));
|
||||
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("Dashboard", policy =>
|
||||
@@ -191,12 +199,14 @@ try
|
||||
builder.Services.AddScoped<ICurrentUserService, CurrentUserService>();
|
||||
builder.Services.AddScoped<IAuthService, AuthService>();
|
||||
builder.Services.AddScoped<IAuditService, AuditService>();
|
||||
builder.Services.AddScoped<IClinicalSyncService, ClinicalSyncService>();
|
||||
builder.Services.AddScoped<ClinicalSyncBatchProcessor>();
|
||||
builder.Services.AddSingleton<IPhiEncryptionService, PhiEncryptionService>();
|
||||
builder.Services.AddScoped<IPhiAccessLogService, PhiAccessLogService>();
|
||||
|
||||
builder.Services.AddHostedService<ThresholdCacheLoader>();
|
||||
builder.Services.AddHostedService<KafkaTopicProvisioner>();
|
||||
builder.Services.AddHostedService<OutboxRelayService>();
|
||||
builder.Services.AddHostedService<ClinicalSyncBatchConsumer>();
|
||||
builder.Services.AddHostedService<ElasticIndexProvisioner>();
|
||||
builder.Services.AddHostedService<EsIndexerService>();
|
||||
builder.Services.AddHostedService<SepsisEngineService>();
|
||||
@@ -303,6 +313,7 @@ try
|
||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||
var redis = scope.ServiceProvider.GetRequiredService<IConnectionMultiplexer>();
|
||||
await DataSeeder.SeedAsync(db, redis);
|
||||
await GatewayRegistrySeeder.SeedAsync(db);
|
||||
await UserSeeder.SeedAsync(db);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user