Forces Analysis
Understanding the forces that drive pattern selection is crucial for successful FHIR implementations. This analysis breaks down the key tensions and constraints that healthcare interoperability systems must address.
What are Forces?
In pattern-oriented design, forces are the conflicting concerns and constraints that shape a problem space. They represent the tensions that must be balanced when choosing and implementing design patterns.
For FHIR implementations, forces typically arise from:
- Technical constraints (performance, reliability, capability differences)
- Regulatory requirements (audit, consent, privacy)
- Organizational needs (federated access, legacy integration)
- Clinical workflows (real-time collaboration, imaging integration)
Detailed Force Analysis
Force Analysis Template
Each force follows a consistent structure:
- Problem Statement: Core issue or tension
- Manifestations: Real-world symptoms and examples
- Pattern Solutions: Specific patterns that address this force
People & Governance Forces
Forces arising from team dynamics, decision-making, and organisational constraints.
Decision Debt
Problem: Design rationale gets lost over time, leading to regressions and re-litigation of past decisions.
Manifestations:
- Team members re-debate settled constraints
- New joiners repeat past mistakes
- Audit trails missing for compliance
Pattern Solutions:
- ADR Log: Make design rationale discoverable and reviewable so that future team members understand why constraints exist, not just what they are. ADRs create an auditable trail of decisions that supports governance and prevents decision debt.
Distributed Ownership
Problem: Multiple contributors edit shared artifacts without clear accountability.
Manifestations:
- Merge conflicts on critical files
- Unclear who approves changes
- Quality drift in unowned areas
Pattern Solutions:
- Co-authoring Workflow: Enable concurrent edits with clear ownership and review
- PR Templates & CODEOWNERS: Guided reviews with clear ownership
Tooling & Reproducibility Forces
Forces arising from build tools, CI/CD pipelines, and environment consistency.
Environment Drift
Problem: Local builds produce different results than CI pipelines.
Manifestations:
- Works on my machine failures
- Version mismatches between local and CI
- Unpinned tool versions causing regressions
Pattern Solutions:
- Local Build Parity: Ensure the same toolchain runs locally and in CI
CI/CD Complexity
Problem: Setting up and maintaining CI pipelines for IG publishing is error-prone.
Manifestations:
- Failed deployments to staging
- Missing preview builds for PRs
- Inconsistent artifact naming
Pattern Solutions:
- GitHub Actions Pipeline: Establish standard CI for GitHub-hosted IG repositories that builds, validates, and deploys on every push. Reviewers can see rendered output before merging, and releases are automated from tags.
- GitLab CI Pipeline: Establish standard CI for GitLab-hosted IG repositories, providing equivalent capabilities to the GitHub Actions pipeline. Essential for organisations using GitLab for private hosting or enterprise features.
- SemVer and Release Channels: Publish predictable versions and previews so consumers know what to expect. CI builds provide instant feedback, snapshots let integrators test against latest, and releases provide stable baselines for production use.
Architecture & Modularity Forces
Forces arising from IG structure, artifact reuse, and cross-IG dependencies.
Artifact Duplication
Problem: Related IGs duplicate profiles, extensions, and terminology rather than sharing.
Manifestations:
- Same extension defined in multiple IGs
- Version conflicts when IGs depend on each other
- Maintenance burden of keeping copies in sync
Pattern Solutions:
- Shared Modules IG: Extract cross-cutting profiles, extensions, and terminology into a shared package that can be versioned and released independently. This enables multiple domain IGs to depend on common definitions without copy-paste duplication.
Inconsistent Naming
Problem: Profiles, packages, and files are named inconsistently across modules and releases.
Manifestations:
- Canonical URL changes break dependents
- Package IDs don't follow conventions
- File names don't match resource IDs
Pattern Solutions:
- Canonical URL and Package ID: Ensure stable discovery and dependency management across IGs by establishing consistent, predictable identifiers from the start of the project.
- Standard IG Layout: Keep authors and tools in sync by adopting the HL7 IG Publisher folder schema. When everyone follows the same conventions, onboarding is faster, CI is simpler, and cross-IG contributions become practical.
FSH Sprawl
Problem: FSH code becomes repetitive and hard to maintain without reuse patterns.
Manifestations:
- Duplicated constraint blocks
- Inconsistent terminology bindings
- Large diffs on routine changes
Pattern Solutions:
- Aliases and RuleSets: Centralise constants and reusable rule blocks to reduce duplication, improve consistency, and make refactoring safer. When terminology URLs and common constraints are defined once, changes propagate automatically.
- Extensions and Slicing: Constrain responsibly with clear invariants and named slices
Documentation & Examples Forces
Forces arising from keeping documentation current and examples valid.
Example Drift
Problem: Examples no longer reflect current profiles; narrative and instance validation diverge.
Manifestations:
- Examples fail validation after profile changes
- Narrative describes outdated constraints
- Implementers use stale examples
Pattern Solutions:
- Use Cases and Examples: Organise narrative use cases alongside validated examples
Forces Summary Table
| Force Area | Force | Description |
|---|---|---|
| People & Governance | Decision Debt | Design rationale gets lost over time, leading to regressions and re-litigation of past decisions. |
| People & Governance | Distributed Ownership | Multiple contributors edit shared artifacts without clear accountability. |
| Tooling & Reproducibility | Environment Drift | Local builds produce different results than CI pipelines. |
| Tooling & Reproducibility | CI/CD Complexity | Setting up and maintaining CI pipelines for IG publishing is error-prone. |
| Architecture & Modularity | Artifact Duplication | Related IGs duplicate profiles, extensions, and terminology rather than sharing. |
| Architecture & Modularity | Inconsistent Naming | Profiles, packages, and files are named inconsistently across modules and releases. |
| Architecture & Modularity | FSH Sprawl | FSH code becomes repetitive and hard to maintain without reuse patterns. |
| Documentation & Examples | Example Drift | Examples no longer reflect current profiles; narrative and instance validation diverge. |
How to Use This Analysis
-
Identify Your Forces: Review the force areas above to identify which forces are most relevant to your implementation context.
-
Prioritize: Not all forces carry equal weight in every scenario. Consider your specific regulatory, technical, and organizational constraints.
-
Select Patterns: Use the pattern solutions listed for each force as starting points for your architecture decisions.
-
Consider Interactions: Many forces are interconnected. Address related forces together using pattern combinations from the Co-Usage Map.
Start Small
Begin with the most critical forces for your use case, then incrementally address additional forces as your implementation matures.