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:
2026-11-22 02:54:23 -06:00
parent 6d01742a85
commit 1d52da79e4
5 changed files with 64 additions and 9 deletions
+4 -2
View File
@@ -9,12 +9,14 @@ from urllib.parse import urlencode
from flask import Response, request
from webapi.fhir_base import BASE as _BASE, STRUCTURE as _STRUCTURE
FHIR_VERSION = "4.0.1"
MEDIA_TYPE = "application/fhir+json"
BASE = "https://isssteleon.org/fhir"
BASE = _BASE
CODE_SYSTEM = f"{BASE}/CodeSystem"
VALUE_SET = f"{BASE}/ValueSet"
STRUCTURE = f"{BASE}/StructureDefinition"
STRUCTURE = _STRUCTURE
SIMULATED = {"system": f"{CODE_SYSTEM}/etiqueta", "code": "simulado", "display": "Datos simulados"}
MAX_COUNT = 200
DEFAULT_COUNT = 50