update docs and prep for frontend
This commit is contained in:
@@ -74,6 +74,23 @@ try
|
||||
builder.Services.Configure<MedicationCorrelationOptions>(
|
||||
builder.Configuration.GetSection(MedicationCorrelationOptions.SectionName));
|
||||
|
||||
builder.Services.Configure<DashboardOptions>(
|
||||
builder.Configuration.GetSection(DashboardOptions.Section));
|
||||
|
||||
var dashboardOptions = builder.Configuration
|
||||
.GetSection(DashboardOptions.Section)
|
||||
.Get<DashboardOptions>() ?? new DashboardOptions();
|
||||
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("Dashboard", policy =>
|
||||
{
|
||||
policy.WithOrigins(dashboardOptions.CorsOrigins)
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod();
|
||||
});
|
||||
});
|
||||
|
||||
builder.Services.AddScoped<IPatientService, PatientService>();
|
||||
builder.Services.AddScoped<IEncounterService, EncounterService>();
|
||||
builder.Services.AddScoped<IAlertThresholdService, AlertThresholdService>();
|
||||
@@ -83,6 +100,7 @@ try
|
||||
builder.Services.AddScoped<IOrderService, OrderService>();
|
||||
builder.Services.AddScoped<IAnalyticsService, AnalyticsService>();
|
||||
builder.Services.AddScoped<INews2Service, News2Service>();
|
||||
builder.Services.AddScoped<IQsofaService, QsofaService>();
|
||||
builder.Services.AddScoped<ISepsisBundleService, SepsisBundleService>();
|
||||
builder.Services.AddScoped<SepsisAlertHandler>();
|
||||
builder.Services.AddScoped<SirsDetector>();
|
||||
@@ -185,6 +203,8 @@ try
|
||||
app.UseMiddleware<CorrelationIdMiddleware>();
|
||||
app.UseMiddleware<ExceptionHandlerMiddleware>();
|
||||
|
||||
app.UseCors("Dashboard");
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user