Tiro-health / FHIRkit

Toolkit for efficient and pythonic FHIR resource manipulation
MIT License
9 stars 0 forks source link
fhir healthcare pydantic python

FHIRkit

PyPI version

Handle FHIR resources in a more efficient, and pythonic way

Why FHIRKit

FHIRKit is a wrapper around Pydantic that will help you parse FHIR JSON data. It comes with some utility functions to display resources πŸ‘€ and validate codes in those resources βœ….

After implementing calls to terminology servers over and over again πŸ˜₯, we realized that Python developpers and data scientists want code like this:

target_code = SCTCoding(code="298364001")
vs = target_code.descendants() # create a valueset by retrieving all descendants of a SNOMED-CT code
obs = Observation.parse_file("my_observation.json")
assert obs.code in vs, f"Observation has an invalid code={obs.code}, please provide a {target_code}"
#
# AssertionError
# Observation has an invalid code="55406008 | Hyperalgesia |", please provide a "298364001 | Finding of head region |"

Calls to terminology servers are handled for you and boilerplate code is reduced to simple Python operations πŸŽ‰.

The goals of this package in a nutshell: