What is it?
healthdbModels is a python package which defines a database structure to house clinical data of any type. This database schema is constructed using SQLAlchemy and can be modified to suit any business needs. For instance, if your institution uses the SNOMED-CT terminology, the Encounter
, Procedure
, Condition
(Diagnoses), and Medication
tables could be specificed accordingly. Simply apply, adjust, or remove the string length restriction for code
in each corresponding table, and update term
to the appropriate terminology enum. A list of terminology standards can be found at the following HIMSS page.
Additional tables could be created to house unique terminology definitions, which could reduce the requisite size of each associated table and improve performance. Simply add another class coresponding to your desired terminology (see: healthdb.SNOMED
, healthdb.RXNORM
), and join on the appropriate term
and code
fields.
Existing Tables:
Table Name | Description |
---|---|
Patient |
Name, Demographics, Address |
Encounter |
Date(s), Encounter type and description, links to [Organization, Payer, Provider] |
Condition |
Code and description to link associated conditions |
Medication |
Medications administered and/or prescribed |
Procedure |
Procedures performed and their associated codes |
Imaging |
Overview of imaging performed |
Provider |
The providers associated with delivery of care |
Organization |
Organizations from which care was delivered |
Payer |
Payer organization for which care was delivered |
A diagram of the HealthDB schema can be found in this diagrams.net document
Where to get it:
The source code is currently hosted on GitHub at: https://github.com/jdeferio/healthdbModels
Binary installers for the latest released version are not currently available, but the package can be installed using either Pip, Poetry or a package manager of your choosing.
# pip
pip install git+https://www.github.com/jdeferio/healthdbModels
# or poetry
poetry add git+https://www.github.com/jdeferio/healthdbModels
Dependencies:
- Pandas - allows for efficient declaration of field types
- SQLAlchemy - allows the user to interact with the ORM on which the database is modeled
License: MIT