/** * Minimal per-version configuration entries. * * Adding a new FHIR version is a one-liner: * just add its slug, semver string, and core package spec. * Everything else is derived from the core package's base StructureDefinitions. */ import type { FhirVersionSlug } from './types.js'; /** * Minimal configuration required to support a FHIR version. * All other data (resource names, interface names, data types, cardinality * tables, type fallbacks) is derived at generation time from the core package. */ export interface FhirVersionConfig { /** Short slug used in import paths and package names */ slug: FhirVersionSlug; /** Full semver FHIR version string */ version: string; /** Core package spec for download (e.g., 'hl7.fhir.r4.core@4.0.1') */ corePackage: string; } /** * Registry of supported FHIR versions. * To add a new version (e.g., R5), just add an entry here. */ export const FHIR_VERSIONS: Record = { r4: { slug: 'r4', version: '4.0.1', corePackage: 'hl7.fhir.r4.core@4.0.1', }, r4b: { slug: 'r4b', version: '4.3.0', corePackage: 'hl7.fhir.r4b.core@4.3.0', }, r5: { slug: 'r5', version: '5.0.0', corePackage: 'hl7.fhir.r5.core@5.0.0', }, };