Skip to content
Dealing with multiple fhir versions at once
Clojure Other
  1. Clojure 97.6%
  2. Other 2.4%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Table of Contents

  1. FHIR multiverse
    1. Implementation steps
      1. Sample data generation and testing
      2. Diff fhir r3 to r4 data
      3. Implement converters
      4. Implement simple CRUD
      5. Think about search generation for r5
    2. Useful links

FHIR multiverse

Get all fhir version universes at once

Implementation steps

Sample data generation and testing

  1. Generate or write connected sample data
  2. Define testing criteria
  3. Implement data generator
  4. Implement data validator

Artifacts: testing criteria, sample data, data generator

Diff fhir r3 to r4 data

  1. Check useful links
  2. Generate diff from metadata
  3. Highlight differences not described in useful links or generated diffs

Artifacts: edn/json diff, description of other differences

Implement converters

  1. Generate ironhide converters from diff
  2. Test convertation quality using testing criteria

Artifacts: r3<->r4 converter

Implement simple CRUD

  1. /r3 /r4 endpoints or fhirVersion header?

Keep in mind that behaviour of CRUD operations also differs for different fhir versions

  1. Implement r4 resource storage
  2. Implement GET/PUT

Artfiacts: http-server+db

Think about search generation for r5

How to migrate search implementation from r3 to r4 to r5?

Artifacts: draft search implementation, migration guide

Useful links


make up
make repl

> cider-connect

or run code at the bottom of multiverse.core

OPEN http://localhost:8887/?_format=edn
OPEN http://localhost:8887/?_format=yaml
OPEN http://localhost:8887/

OPEN http://localhost:8887/r4/Patient
OPEN http://localhost:8887/r3/Patient

  1. Results
    1. Mapping steps (hypotetical guide)
    2. Demo
    3. Technical details
    4. Future steps
    5. Diff and Converter


Mapping steps (hypotetical guide)

  • Pick r3 resources and profiles
  • (Optionally) generate profiles by real data
  • Generate automated bidirectional mapping (shared and renamed and profile)
  • Suggest unmapped fields (added/deleted)
  • Add custom transformations
  • Profit


  • Pick r3 resources without profiles
  • Generate !bidirectional! converter
  • Show valuesets, extensions! fetaure!!!
  • Get r3 data example -> r4
  • Edit r4
  • Run r4 -> r3
  • Show git diff
  • No data lost because of extensions

Technical details

  • metadata -> diff
  • diff -> copy-converter
  • fhir mapping -> bidirectional converter
  • merge bidirectional converter + copy-converter
  • for each resource converter added to super converter
  • rules for each resource created

Future steps

  • Problems we don't solve
    • Delegate split resource converters to the user
    • Delegate required field creation to the user
    • Delegate profile convertation
  • What we can improve
    • Automated cardinality transformation
    • Profile generation by sample data
    • Profile usage in converter generation
    • Contained resource transformations

Diff and Converter

  • One-way FHIR mappings -> renamed fields and changed valuesets

  • FHIR metadata -> shared fields -> part of converter

  • Lost fields to extensions

  • Emulate web server function

  • Add profile support to reduce field mapping

You can’t perform that action at this time.