Skip to main content

DHTI Elixir Base

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dhti_elixir_base-1.5.0.tar.gz (530.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dhti_elixir_base-1.5.0-py3-none-any.whl (51.2 kB view details)

Uploaded Python 3

File details

Details for the file dhti_elixir_base-1.5.0.tar.gz.

File metadata

  • Download URL: dhti_elixir_base-1.5.0.tar.gz
  • Upload date:
  • Size: 530.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dhti_elixir_base-1.5.0.tar.gz
Algorithm Hash digest
SHA256 4c9f80a2c6e6f67e90d0bd95104907b17fe245401042ea20c2f1902fd5f6e7b3
MD5 f89e6e3c58cbf92fe944d001521db884
BLAKE2b-256 40eea1683f6463ace825fa34793780de9ba49a2dcfff028fee0051dbe1eb6cdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhti_elixir_base-1.5.0.tar.gz:

Publisher: publish.yml on dermatologist/dhti-elixir-base

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dhti_elixir_base-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dhti_elixir_base-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8dc1fde9429b91a4b1c6f133f9bd6b752d8338e1e8fbe6b3e2c87bcec0d619c
MD5 04126529f1c90f04dc405077ec79981e
BLAKE2b-256 33adb9362f5ad922a7d7c188a64691e214bf3b8e6e4643788e685f04575c7866

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhti_elixir_base-1.5.0-py3-none-any.whl:

Publisher: publish.yml on dermatologist/dhti-elixir-base

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page