DHTI ELIXIR BASE
Base library for creating new DHTI Elixirs.
What is DHTI? DHTI (Digital Health Tooling Interface) provides building blocks for interoperable, healthcare-focused AI tooling. This repository is the minimal foundation you extend to build your own "Elixir"—a reusable, testable component (chain/agent/server) that plugs into the wider DHTI ecosystem.
Status: WIP, but stable enough to scaffold new Elixirs and iterate quickly.
Overview
This package exposes lightweight, composable base classes:
BaseChain– a LangChain-compatible chain scaffold with sensible defaults.BaseAgent– an agent scaffold that can bind tools and work with LangGraph.BaseGraph,BaseLLM,BaseServer,BaseSpace, andBaseDhtiModel– helpers to organize more complex Elixirs.
Use these to rapidly create a new Elixir with a consistent structure, tests, and docs.
Dependency Injection (mydi.py / di)
The codebase uses a simple dependency injection pattern via mydi.py and the get_di function. This allows you to:
- Configure FHIR endpoints, authentication, and other settings at runtime
- Swap out implementations for testing or customization
- Keep your code modular and maintainable
CDS Hook Module (Frontend Integration)
The cds_hook module now provides request parsing and context extraction for CDS Hooks workflows. It supports:
- Parsing various CDS Hooks request formats
- Extracting patient and order context
This enables integration with frontend CDS Hooks clients.
FHIR Module (Backend Integration: SMART on FHIR & FHIRPath)
The fhir module includes advanced backend features:
- SMART on FHIR: The
SmartOnFhirSearchclass provides secure, standards-based access to FHIR resources using OAuth2 and the SMART on FHIR protocol. It supports:- Patient-centric resource queries (Conditions, Observations, Procedures, MedicationRequests, AllergyIntolerances)
- $everything operation for comprehensive patient data
- Automatic token management and authentication
- FHIRPath Support: All resource queries can apply FHIRPath expressions for flexible data extraction and transformation.
CrewAI Integration (Optional)
The crewai module provides wrapper classes that make DHTI's LangChain-based components compatible with the CrewAI framework:
- CrewAILLMWrapper: Wraps
BaseLLMandBaseChatLLMfor use with CrewAI agents - CrewAIAgentWrapper: Wraps
BaseAgentto create CrewAI-compatible agents - CrewAIChainToolWrapper: Wraps
BaseChainas a CrewAI tool - CrewAILangChainToolWrapper: Wraps LangChain tools for use in CrewAI
To use CrewAI integration, install with the optional dependency:
pip install dhti-elixir-base[crewai]
See the CrewAI documentation for detailed usage examples.
Project layout
src/dhti_elixir_base/– base classes and minimal utilities.tests/– example tests to keep your Elixir robust.examples/– quick patterns for chains/graphs.docs/– MkDocs configuration for documentation.
Learn more
- DHTI home: https://github.com/dermatologist/dhti
- This template docs: https://dermatologist.github.io/dhti-elixir-base/
Give us a star ⭐️
If you find this project useful, give us a star. It helps others discover the project.
Contributors
Metadata
Release files for dhti-elixir-base 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dhti_elixir_base-1.6.0.tar.gz | 729.3 kB | With provenance | Details for dhti_elixir_base-1.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dhti_elixir_base-1.6.0-py3-none-any.whl | Python 3 | none | any | Details for dhti_elixir_base-1.6.0-py3-none-any.whl |
Total release size: 781.0 kB
Release files / dhti_elixir_base-1.6.0.tar.gz
| Download URL | dhti_elixir_base-1.6.0.tar.gz |
|---|---|
| Size | 729.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3a64bde3a3c680713c27fe5abb05bcef9040f270bc72a8b1212a4e37f920d47
|
|
BLAKE2b-256 checksum How to use checksums |
143a7c3f321da79c00714aed99d8d2d27d806764a61b93d6b0c1bb372ca8dab4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / dhti_elixir_base-1.6.0-py3-none-any.whl
| Download URL | dhti_elixir_base-1.6.0-py3-none-any.whl |
|---|---|
| Size | 51.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc4092a8369f04b1725c18310f59f9dfdcbaf4da53a560aba4b54677603da0fd
|
|
BLAKE2b-256 checksum How to use checksums |
4471c609c622bbdb394161934adb08607499943af67194471371ab8c22d7d480
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for dhti-elixir-base 1.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dhti_elixir_base-1.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.