Skip to main content

DHTI ELIXIR BASE

Release Build status codecov Commit activity Downloads Documentation

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.

Generated by github-dependents-info

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, and BaseDhtiModel – 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 SmartOnFhirSearch class 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 BaseLLM and BaseChatLLM for use with CrewAI agents
  • CrewAIAgentWrapper: Wraps BaseAgent to create CrewAI-compatible agents
  • CrewAIChainToolWrapper: Wraps BaseChain as 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.

Documentation

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

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.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dhti-elixir-base 1.5.2
File Size Uploaded
dhti_elixir_base-1.5.2.tar.gz 547.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dhti-elixir-base 1.5.2
File Interpreter ABI Platform
dhti_elixir_base-1.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 598.7 kB

Release files / dhti_elixir_base-1.5.2.tar.gz

Download URL dhti_elixir_base-1.5.2.tar.gz
Size 547.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ad003615566511054672e251e7a4e3171183f761b09ac604d623dd5cfcd47e1d
BLAKE2b-256 checksum
How to use checksums
c2e8546eb561a1358e649554ddf9af27ebd7005f03e633d177aee2f1e0e67cfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 24, 2026.

Transparency log

Release files / dhti_elixir_base-1.5.2-py3-none-any.whl

Download URL dhti_elixir_base-1.5.2-py3-none-any.whl
Size 51.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee7095ce6da310526605fe2277202ccc497c183612a0d4247c02edd9da05d248
BLAKE2b-256 checksum
How to use checksums
717beb10d3ba0d7d3b1b0ef86663be0df7e7c178b7579a3fa4b60c605da7a9c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.5.2 This release

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page