Allow simulation for UAT and add more mimic-iv scenarios
CI / backend (push) Successful in 9m56s
CI / frontend (push) Successful in 1m54s

This commit is contained in:
2026-08-11 07:25:55 +08:00
parent 87e551c0d7
commit 8f36ffbb02
17 changed files with 18608 additions and 7 deletions
+4 -1
View File
@@ -15,7 +15,10 @@ infra/
VigilCareClinicalAPI.Tests/ VigilCareClinicalAPI.Tests/
VigilCare.WardGateway.Tests/ VigilCare.WardGateway.Tests/
VigilCare.ClinicalContracts.Tests/ VigilCare.ClinicalContracts.Tests/
VigilCare.Simulator/ # Keep scenario JSON for the API image; exclude the rest of the Simulator tree.
VigilCare.Simulator/**
!VigilCare.Simulator/Scenarios/
!VigilCare.Simulator/Scenarios/**
vigilcare-dashboard/ vigilcare-dashboard/
*.log *.log
.env .env
+5
View File
@@ -88,3 +88,8 @@ SEED_NURSE_DISPLAY_NAME=Charge Nurse
SEED_PHYSICIAN_USERNAME=physician SEED_PHYSICIAN_USERNAME=physician
SEED_PHYSICIAN_PASSWORD=CHANGE_ME SEED_PHYSICIAN_PASSWORD=CHANGE_ME
SEED_PHYSICIAN_DISPLAY_NAME=Attending Physician SEED_PHYSICIAN_DISPLAY_NAME=Attending Physician
# ---- clinical simulation (UAT / training; leave enabled only on synthetic data) ----
SIMULATION_ENABLED=true
SIMULATION_RUNNER_PASSWORD=CHANGE_ME
# SIMULATION_MAX_CONCURRENT_RUNS=8
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -42,6 +42,20 @@
"uti-sepsis-elderly-01", "sepsis-sofa-progression-01", "uti-sepsis-elderly-01", "sepsis-sofa-progression-01",
"neurological-decline-gcs-01", "post-op-hemorrhage-01" "neurological-decline-gcs-01", "post-op-hemorrhage-01"
] ]
},
{
"id": "session-e-mimic-ward",
"name": "Session E — MIMIC-IV real stays",
"goal": "Exercise alert quality on de-identified MIMIC-IV ICU trajectories across care units.",
"estimatedMinutes": 45,
"defaultSpeed": 240,
"scenarios": [
"mimic-s35396193",
"mimic-s38329661",
"mimic-s30876334",
"mimic-s38017367",
"mimic-s31248398"
]
} }
] ]
} }
+6 -1
View File
@@ -15,10 +15,14 @@ RUN dotnet restore VigilCareClinicalAPI/VigilCareClinicalAPI.csproj
COPY VigilCare.ClinicalContracts/ VigilCare.ClinicalContracts/ COPY VigilCare.ClinicalContracts/ VigilCare.ClinicalContracts/
COPY VigilCare.Simulation.Core/ VigilCare.Simulation.Core/ COPY VigilCare.Simulation.Core/ VigilCare.Simulation.Core/
COPY VigilCareClinicalAPI/ VigilCareClinicalAPI/ COPY VigilCareClinicalAPI/ VigilCareClinicalAPI/
# Scenario catalogue + session presets for in-app Simulation (UAT / training).
COPY VigilCare.Simulator/Scenarios/ VigilCare.Simulator/Scenarios/
FROM src AS build FROM src AS build
RUN dotnet publish VigilCareClinicalAPI/VigilCareClinicalAPI.csproj \ RUN dotnet publish VigilCareClinicalAPI/VigilCareClinicalAPI.csproj \
-c Release -o /app/publish --no-restore -c Release -o /app/publish --no-restore \
&& mkdir -p /app/publish/Scenarios \
&& cp -a VigilCare.Simulator/Scenarios/. /app/publish/Scenarios/
# Scrub development secrets from the published appsettings.json (Step 4). # Scrub development secrets from the published appsettings.json (Step 4).
# Production supplies Jwt / PHI / API keys via environment variables only. # Production supplies Jwt / PHI / API keys via environment variables only.
@@ -27,6 +31,7 @@ RUN sed -i \
-e 's/"SearchTokenKey": "[^"]*"/"SearchTokenKey": ""/' \ -e 's/"SearchTokenKey": "[^"]*"/"SearchTokenKey": ""/' \
-e 's/"Gateway": "dev-[^"]*"/"Gateway": ""/' \ -e 's/"Gateway": "dev-[^"]*"/"Gateway": ""/' \
-e 's/"ApiKey": "dev-integration[^"]*"/"ApiKey": ""/' \ -e 's/"ApiKey": "dev-integration[^"]*"/"ApiKey": ""/' \
-e 's/"RunnerPassword": "[^"]*"/"RunnerPassword": ""/' \
/app/publish/appsettings.json /app/publish/appsettings.json
# Self-contained EF bundle for CD (docker build --target migrate). # Self-contained EF bundle for CD (docker build --target migrate).
@@ -41,8 +41,16 @@
"Swagger": { "Enabled": false }, "Swagger": { "Enabled": false },
"Seeding": { "EnableDemoData": false }, "Seeding": { "EnableDemoData": false },
"Simulation": { "Simulation": {
// Patient-safety gate: never expose scenario replay against real care data. // UAT / clinical evaluation: in-app scenario replay is on so testers can
// Flip only for dedicated training/staging environments with synthetic patients. // exercise the ward without a terminal. Patients created here are marked
"Enabled": false // IsSimulated; Reset ward only deletes those rows. Do not enable against a
// database that also holds real care data — use a dedicated UAT DB.
"Enabled": true,
"ScenarioDirectory": "Scenarios/List",
"LoopbackBaseUrl": "http://localhost:8080",
"RunnerUsername": "simulation.runner",
"MaxConcurrentRuns": 8,
"MaxSpeed": 600,
"RunHistoryLimit": 50
} }
} }
+3 -2
View File
@@ -233,10 +233,11 @@
"Physician": null "Physician": null
}, },
"Simulation": { "Simulation": {
"Enabled": false, "Enabled": true,
"ScenarioDirectory": "Scenarios", "ScenarioDirectory": "../VigilCare.Simulator/Scenarios/List",
"LoopbackBaseUrl": "http://localhost:5270", "LoopbackBaseUrl": "http://localhost:5270",
"RunnerUsername": "simulation.runner", "RunnerUsername": "simulation.runner",
"RunnerPassword": "DemoSimulation1!",
"MaxConcurrentRuns": 8, "MaxConcurrentRuns": 8,
"MaxSpeed": 600, "MaxSpeed": 600,
"RunHistoryLimit": 50 "RunHistoryLimit": 50
+9
View File
@@ -68,6 +68,15 @@ services:
Seeding__GatewayCode: "${GATEWAY_CODE:-GW-ICU-1}" Seeding__GatewayCode: "${GATEWAY_CODE:-GW-ICU-1}"
Seeding__GatewayDepartment: "${GATEWAY_DEPARTMENT:-ICU}" Seeding__GatewayDepartment: "${GATEWAY_DEPARTMENT:-ICU}"
Swagger__Enabled: "false" Swagger__Enabled: "false"
# UAT clinical simulation — scenarios ship in the image under Scenarios/List.
# SIMULATION_ENABLED defaults on for this evaluation environment; set false
# when promoting to a DB that holds real care data.
Simulation__Enabled: "${SIMULATION_ENABLED:-true}"
Simulation__ScenarioDirectory: "Scenarios/List"
Simulation__LoopbackBaseUrl: "http://localhost:8080"
Simulation__RunnerUsername: "simulation.runner"
Simulation__RunnerPassword: "${SIMULATION_RUNNER_PASSWORD}"
Simulation__MaxConcurrentRuns: "${SIMULATION_MAX_CONCURRENT_RUNS:-8}"
volumes: volumes:
# CRITICAL: the Data Protection keyring encrypts patient PHI. If this # CRITICAL: the Data Protection keyring encrypts patient PHI. If this
# volume is lost, every encrypted patient record becomes unreadable. # volume is lost, every encrypted patient record becomes unreadable.