FHIR: every URL the API emits hangs from one base, set by FHIR_BASE_URL
The code systems, value sets and the extensions (cut-offs, report id, interval, quartiles) each wrote the domain by hand. They now derive from webapi.fhir_base, a leaf module so metrics and durations can use it without a cycle. The default is unchanged; the WebApp still reads the same URLs by exact match, so changing the domain goes to both. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
"""The base of every FHIR URL this API emits: code systems, value sets and extensions.
|
||||
|
||||
It is a name we mint, not an address that has to resolve. `FHIR_BASE_URL` sets it. The WebApp reads these URLs by
|
||||
exact match (`fhir.ts` CODE_SYSTEM and `paciente-riesgo.validation.ts` INTERVAL), so a change of domain goes to both.
|
||||
|
||||
A module of its own, with no imports from the package, so `metrics` and `durations` can use it without a cycle.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
BASE = os.environ.get("FHIR_BASE_URL", "https://isssteleon.org/fhir").rstrip("/")
|
||||
STRUCTURE = f"{BASE}/StructureDefinition"
|
||||
Reference in New Issue
Block a user