Inera Core Implementation Guide - Local Development build (v0.2.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
FHIR Dependencies
FHIR Implementation Guide Dependencies
This page explains the dependencies used in the Inera Core Implementation Guide and their purpose.
Direct Dependencies
hl7se.fhir.base (HL7 Sweden Base Profiles) v1.1.0
Purpose: Swedish national base profiles defining the common Swedish healthcare context.
Why we use it:
- Primary Swedish foundation: Defines Swedish identifier systems, terminology, and extensions
- HL7 Sweden governance: Maintained by HL7 Sweden working group with broad stakeholder input
- Proven implementation: Used across Swedish healthcare systems
- Reduces duplication: Reuses common Swedish patterns rather than redefining them
What it includes:
- Patient profile: personnummer, samordningsnummer, Swedish name extensions (mellannamn, eget efternamn)
- Practitioner profile: HSA-ID, Swedish professional qualifications (HOSP, SOSNYK)
- Organization profile: HSA-ID, Swedish organization types
- Swedish terminology: Marital status, address types, security labels, occupations
- Extensions: Swedish-specific data elements
Canonical URL: http://hl7.se/fhir/ig/base
Package: hl7se.fhir.base#1.1.0
Documentation: https://build.fhir.org/ig/HL7Sweden/basprofiler-r4/
hl7.fhir.uv.ipa (International Patient Access) v1.1.0
Purpose: Provides internationally standardized patient access profiles for common clinical resources.
Why we use it:
- Establishes baseline international interoperability patterns
- Provides well-tested profiles for Patient, Observation, Condition, etc.
- Aligns Swedish healthcare with global FHIR standards
- Enables international data exchange when needed
What it includes:
- Patient access patterns and profiles
- Security requirements (SMART on FHIR)
- Core clinical resource profiles
hl7.fhir.us.core v7.0.0
Purpose: US-specific implementation of FHIR for national healthcare data exchange.
Why we use it:
- Required dependency of IPA - IPA builds on US Core profiles
- Provides mature, tested implementations of common patterns
- Swedish profiles can adapt proven US patterns to Swedish context
Trade-offs:
- Brings US-specific terminology (VSAC, PHINVADS) that we don't use
- Larger package size than needed
- Some US-specific constraints that don't apply to Sweden
Alternative considered:
- Implementing directly from FHIR R4 core would reduce dependencies
- However, would lose IPA alignment and require more custom development
Transitive Dependencies
These packages are automatically installed as dependencies of IPA and US Core:
hl7.fhir.uv.smart-app-launch v2.0.0
- Source: Required by IPA
- Purpose: OAuth 2.0/OIDC authentication for FHIR apps
- Relevance to Sweden: Needed for secure patient access
hl7.fhir.uv.sdc v3.0.0
- Source: Required by US Core
- Purpose: Structured Data Capture (forms, questionnaires)
- Relevance to Sweden: Low - could be excluded if we drop US Core dependency
us.nlm.vsac v0.18.0
- Source: Required by US Core
- Purpose: US National Library of Medicine Value Set Authority Center
- Relevance to Sweden: None - we use Swedish terminology (SNOMED CT SE, NPU, KVÅ, ICD-10-SE)
- Impact: Large package (~100+ MB) with US-only value sets
us.cdc.phinvads v0.12.0
- Source: Required by US Core
- Purpose: US CDC Public Health Information Network Vocabulary Access and Distribution System
- Relevance to Sweden: None - US public health specific
- Impact: Additional terminology that's never referenced in Swedish profiles
hl7.terminology.r4 (multiple versions)
- Source: Required by various packages
- Purpose: HL7 international terminology (UCUM, LOINC, RxNorm, etc.)
- Relevance to Sweden: Partial - UCUM and LOINC are internationally used
- Issue: Multiple versions (5.5.0, 6.2.0, 7.0.0) installed due to different dependency requirements
hl7.fhir.uv.extensions.r4 (multiple versions)
- Source: Base FHIR extensions
- Purpose: Common extensions used across FHIR implementations
- Relevance to Sweden: High - needed for various profile extensions
Dependency Size Impact
Approximate package sizes being downloaded:
| Package |
Size |
Used in Swedish Profiles? |
| hl7se.fhir.base |
~3 MB |
✅ Yes - Swedish foundation |
| hl7.fhir.uv.ipa |
~2 MB |
✅ Yes - base profiles |
| hl7.fhir.us.core |
~15 MB |
⚠️ Indirectly via IPA |
| hl7.terminology.r4 (3 versions) |
~300 MB |
⚠️ Partially (UCUM, LOINC) |
| us.nlm.vsac |
~100 MB |
❌ No - US only |
| us.cdc.phinvads |
~50 MB |
❌ No - US only |
| hl7.fhir.uv.sdc |
~5 MB |
❌ Not currently |
| hl7.fhir.uv.smart-app-launch |
~2 MB |
✅ Yes - for security |
| hl7.fhir.uv.extensions.r4 |
~5 MB |
✅ Yes - common extensions |
Total: ~500 MB of dependencies, with only ~200 MB directly relevant to Swedish healthcare.
Future Optimization Options
Option 1: Remove US Core dependency
- Benefit: Eliminates US-specific packages (VSAC, PHINVADS, SDC)
- Cost: Lose IPA alignment, need to reimplement some profiles
- Effort: High - would require rewriting profiles from FHIR R4 core
Option 2: Use hl7se.fhir.base (Swedish base profiles)
- Status: ✅ IMPLEMENTED as of version 0.2.0
- Benefit: Swedish-specific base profiles from HL7 Sweden
- Package: hl7se.fhir.base#1.1.0
- Impact:
- Reduces custom profile complexity
- Aligns with other Swedish FHIR implementations
- Reuses Swedish identifier and terminology patterns
- Maintained by HL7 Sweden working group
Option 3: Keep current approach
- Benefit: Maintains international alignment via IPA
- Cost: Larger dependency footprint
- Rationale: IPA provides valuable international interoperability
Option 4: Align with European Patient Summary (EPS)
- Status: 🔮 Future consideration
- Package: hl7.fhir.eu.eps (when available)
- Purpose: European Health Data Space (EHDS) alignment
- Benefit: EU-level interoperability and EHDS compliance
- Documentation: https://build.fhir.org/ig/hl7-eu/eps/
For EHDS architectural considerations, see the Migration Guide.
Recommendation
Current approach (Option 3 with Swedish base profiles) is recommended because:
- Swedish foundation: HL7 Sweden base profiles provide Swedish-specific requirements
- International alignment: IPA ensures Swedish profiles work internationally
- Proven patterns: US Core provides battle-tested implementations
- Development efficiency: Less custom code to maintain
- Future-proof: Well positioned to align with European initiatives when EHDS requirements are finalized
The unused US-specific packages (VSAC, PHINVADS) add build time and cache size but don't affect runtime or published IG size significantly. The trade-off is acceptable for the benefits gained.
Future European alignment: Monitor the European Patient Summary IG development and EHDS regulations. When EU requirements become clearer, evaluate alignment path between Swedish base profiles, NPÖ/TKB requirements, and EPS profiles.
Swedish Terminology Integration
While we depend on international packages, Swedish profiles use Swedish national terminology:
- ICD-10-SE: Swedish version of ICD-10
- NPU: Nordic clinical laboratory terminology
- KVÅ: Classification of healthcare procedures
- SNOMED CT SE: Swedish edition of SNOMED CT
- kv_* codes: Swedish national code systems (vårdkontakttyp, yrkeskod, etc.)
These are referenced via the Swedish terminology server:
https://terminologitjansten.inera.se/
See Terminology Integration for details.
Memory Requirements
The large dependency tree impacts build memory requirements:
- Minimum: 2 GB heap
- Recommended: 3.5 GB heap (set in CI pipeline)
- Reason: Loading 4000+ resources from hl7.terminology.r4 and other large packages
Build scripts configure this via Java options:
java -Xms512m -Xmx3584m -jar publisher.jar
Questions or Concerns?
If you have questions about these dependencies or suggestions for optimization, please contact:
- Technical Lead: info@inera.se
- HL7 Sweden: http://hl7.se/