fix: web demo token tok-andrey shares Andrey's ЕМИАС record; REVISION written only after a healthy deploy
CI / ruff · pytest (pull_request) Successful in 2m44s
CI / ruff · pytest (pull_request) Successful in 2m44s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,11 @@ def _load(path: Path) -> dict[str, PatientRecord]:
|
||||
raw = yaml.safe_load(path.read_text(encoding="utf-8")) or {}
|
||||
out: dict[str, PatientRecord] = {}
|
||||
for snils, rec in (raw.get("records") or {}).items():
|
||||
out[pseudo_id(snils)] = PatientRecord.model_validate(rec)
|
||||
aliases = rec.pop("tokens", []) if isinstance(rec, dict) else []
|
||||
record = PatientRecord.model_validate(rec)
|
||||
out[pseudo_id(snils)] = record
|
||||
for token in aliases: # demo tokens used by the patient web app (e.g. tok-andrey) share the record
|
||||
out[token] = record
|
||||
return out
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user