Name | hacs-models JSON |
Version |
0.4.3
JSON |
| download |
home_page | None |
Summary | HACS Healthcare Data Models - Pure Pydantic models for FHIR-compliant healthcare data |
upload_time | 2025-08-12 14:27:59 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT |
keywords |
agents
ai
fhir
healthcare
models
pydantic
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# HACS Models
**Pure Healthcare Data Models for AI Agent Systems**
[](https://www.python.org/downloads/)
[](http://mypy-lang.org/)
[](https://github.com/astral-sh/ruff)
[](https://hl7.org/fhir/)
## Overview
`hacs-models` provides pure, type-safe Pydantic data models for healthcare applications. These models are designed for AI agent communication and are fully compliant with FHIR R4/R5 standards.
## Design Principles
- **Pure Data Models**: No business logic, just data structures
- **Type Safety**: Full type annotations with mypy strict mode
- **FHIR Compliance**: Adherent to healthcare data standards
- **Zero Dependencies**: Minimal dependency footprint (only Pydantic)
- **Immutable Design**: Designed for functional programming patterns
- **AI-Optimized**: Structured for AI agent communication
## Features
### Core Healthcare Models
- `Patient` - Patient demographics and identifiers
- `Observation` - Clinical observations and measurements
- `Encounter` - Healthcare encounters and visits
- `Condition` - Medical conditions and diagnoses
- `Medication` - Medication information
- `MedicationRequest` - Medication prescriptions
- `Procedure` - Medical procedures
- `Goal` - Care goals and objectives
### Specialized Models
- `MemoryBlock` - AI agent memory structures
- `AgentMessage` - Inter-agent communication
- `ResourceBundle` - FHIR resource collections
- `WorkflowDefinition` - Clinical workflow definitions
### Base Classes
- `BaseResource` - Foundation for all healthcare resources
- `DomainResource` - Base for domain-specific resources
- `BackboneElement` - Reusable data structures
## Installation
```bash
# Install from PyPI (when published)
pip install hacs-models
# Install in development mode
uv add -e packages/hacs-models
```
## Quick Start
```python
from hacs_models import Patient, Observation
from datetime import date
# Create a patient
patient = Patient(
id="patient-001",
full_name="Jane Doe",
birth_date=date(1990, 1, 15),
gender="female"
)
# Create an observation
observation = Observation(
id="obs-001",
subject_reference=f"Patient/{patient.id}",
code="85354-9", # Blood pressure
value_quantity={"value": 120, "unit": "mmHg"}
)
# Models are immutable and type-safe
print(f"Patient: {patient.full_name}")
print(f"Blood Pressure: {observation.value_quantity}")
```
## Architecture
```
hacs-models/
├── base_resource.py # BaseResource, DomainResource
├── patient.py # Patient model
├── observation.py # Observation model
├── encounter.py # Encounter model
├── condition.py # Condition model
├── medication.py # Medication models
├── procedure.py # Procedure model
├── goal.py # Goal model
├── memory.py # AI memory models
├── workflow.py # Workflow models
└── types.py # Common types and enums
```
## Development
```bash
# Run tests
uv run pytest
# Type checking
uv run mypy src/hacs_models
# Code formatting
uv run ruff format src/hacs_models
# Linting
uv run ruff check src/hacs_models
```
## Contributing
1. Fork the repository
2. Create a feature branch
3. Add tests for new models
4. Ensure 100% type coverage
5. Submit a pull request
## License
MIT License - see LICENSE file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "hacs-models",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "Solano Todeschini <solanovisitor@gmail.com>",
"keywords": "agents, ai, fhir, healthcare, models, pydantic",
"author": null,
"author_email": "Solano Todeschini <solanovisitor@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/bd/dc/1903a9120923b8011a0c40cf27dc28931293525bfeee75e4470cca7c0193/hacs_models-0.4.3.tar.gz",
"platform": null,
"description": "# HACS Models\n\n**Pure Healthcare Data Models for AI Agent Systems**\n\n[](https://www.python.org/downloads/)\n[](http://mypy-lang.org/)\n[](https://github.com/astral-sh/ruff)\n[](https://hl7.org/fhir/)\n\n## Overview\n\n`hacs-models` provides pure, type-safe Pydantic data models for healthcare applications. These models are designed for AI agent communication and are fully compliant with FHIR R4/R5 standards.\n\n## Design Principles\n\n- **Pure Data Models**: No business logic, just data structures\n- **Type Safety**: Full type annotations with mypy strict mode\n- **FHIR Compliance**: Adherent to healthcare data standards\n- **Zero Dependencies**: Minimal dependency footprint (only Pydantic)\n- **Immutable Design**: Designed for functional programming patterns\n- **AI-Optimized**: Structured for AI agent communication\n\n## Features\n\n### Core Healthcare Models\n- `Patient` - Patient demographics and identifiers\n- `Observation` - Clinical observations and measurements \n- `Encounter` - Healthcare encounters and visits\n- `Condition` - Medical conditions and diagnoses\n- `Medication` - Medication information\n- `MedicationRequest` - Medication prescriptions\n- `Procedure` - Medical procedures\n- `Goal` - Care goals and objectives\n\n### Specialized Models\n- `MemoryBlock` - AI agent memory structures\n- `AgentMessage` - Inter-agent communication\n- `ResourceBundle` - FHIR resource collections\n- `WorkflowDefinition` - Clinical workflow definitions\n\n### Base Classes\n- `BaseResource` - Foundation for all healthcare resources\n- `DomainResource` - Base for domain-specific resources\n- `BackboneElement` - Reusable data structures\n\n## Installation\n\n```bash\n# Install from PyPI (when published)\npip install hacs-models\n\n# Install in development mode\nuv add -e packages/hacs-models\n```\n\n## Quick Start\n\n```python\nfrom hacs_models import Patient, Observation\nfrom datetime import date\n\n# Create a patient\npatient = Patient(\n id=\"patient-001\",\n full_name=\"Jane Doe\",\n birth_date=date(1990, 1, 15),\n gender=\"female\"\n)\n\n# Create an observation\nobservation = Observation(\n id=\"obs-001\",\n subject_reference=f\"Patient/{patient.id}\",\n code=\"85354-9\", # Blood pressure\n value_quantity={\"value\": 120, \"unit\": \"mmHg\"}\n)\n\n# Models are immutable and type-safe\nprint(f\"Patient: {patient.full_name}\")\nprint(f\"Blood Pressure: {observation.value_quantity}\")\n```\n\n## Architecture\n\n```\nhacs-models/\n\u251c\u2500\u2500 base_resource.py # BaseResource, DomainResource\n\u251c\u2500\u2500 patient.py # Patient model\n\u251c\u2500\u2500 observation.py # Observation model \n\u251c\u2500\u2500 encounter.py # Encounter model\n\u251c\u2500\u2500 condition.py # Condition model\n\u251c\u2500\u2500 medication.py # Medication models\n\u251c\u2500\u2500 procedure.py # Procedure model\n\u251c\u2500\u2500 goal.py # Goal model\n\u251c\u2500\u2500 memory.py # AI memory models\n\u251c\u2500\u2500 workflow.py # Workflow models\n\u2514\u2500\u2500 types.py # Common types and enums\n```\n\n## Development\n\n```bash\n# Run tests\nuv run pytest\n\n# Type checking \nuv run mypy src/hacs_models\n\n# Code formatting\nuv run ruff format src/hacs_models\n\n# Linting\nuv run ruff check src/hacs_models\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for new models\n4. Ensure 100% type coverage\n5. Submit a pull request\n\n## License\n\nMIT License - see LICENSE file for details.",
"bugtrack_url": null,
"license": "MIT",
"summary": "HACS Healthcare Data Models - Pure Pydantic models for FHIR-compliant healthcare data",
"version": "0.4.3",
"project_urls": {
"Changelog": "https://github.com/solanovisitor/hacs-ai/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/solanovisitor/hacs-ai/blob/main/docs/",
"Homepage": "https://github.com/solanovisitor/hacs-ai",
"Issues": "https://github.com/solanovisitor/hacs-ai/issues",
"Repository": "https://github.com/solanovisitor/hacs-ai"
},
"split_keywords": [
"agents",
" ai",
" fhir",
" healthcare",
" models",
" pydantic"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4f6ee2f9cfe964b89ae9c6be279d73149645b0a1cf2e33eacc4366881f0e46ce",
"md5": "eb18b0fd1f42d9c847a7e46eb5c435bd",
"sha256": "6836a4cf5088e9cdb0572aedaa0ee5a02f8dfb429a0bbe4006684a5e270b1044"
},
"downloads": -1,
"filename": "hacs_models-0.4.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eb18b0fd1f42d9c847a7e46eb5c435bd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 57473,
"upload_time": "2025-08-12T14:27:49",
"upload_time_iso_8601": "2025-08-12T14:27:49.469645Z",
"url": "https://files.pythonhosted.org/packages/4f/6e/e2f9cfe964b89ae9c6be279d73149645b0a1cf2e33eacc4366881f0e46ce/hacs_models-0.4.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bddc1903a9120923b8011a0c40cf27dc28931293525bfeee75e4470cca7c0193",
"md5": "9ed787980ca0564752688859cbab57a7",
"sha256": "ec9b3f99764213c74b610a78d49b5eaab0e6941667b9593a28cfe3af4c90b96d"
},
"downloads": -1,
"filename": "hacs_models-0.4.3.tar.gz",
"has_sig": false,
"md5_digest": "9ed787980ca0564752688859cbab57a7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 46814,
"upload_time": "2025-08-12T14:27:59",
"upload_time_iso_8601": "2025-08-12T14:27:59.772354Z",
"url": "https://files.pythonhosted.org/packages/bd/dc/1903a9120923b8011a0c40cf27dc28931293525bfeee75e4470cca7c0193/hacs_models-0.4.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-12 14:27:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "solanovisitor",
"github_project": "hacs-ai",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hacs-models"
}