Command-line interface for Healthcare Agent Communication Standard (HACS)
Project description
HACS CLI
Command-line interface for Healthcare Agent Communication Standard (HACS).
Overview
hacs-cli provides a comprehensive command-line interface for managing HACS healthcare data, performing CRUD operations, running validations, and integrating with various healthcare systems and agent frameworks.
Key Features
Data Management
- Patient, observation, and encounter management
- Bulk data operations and imports
- Data validation and integrity checks
- Export to various formats (JSON, CSV, FHIR)
Agent Integration
- Agent registration and management
- Message routing and delivery
- Protocol adapter configuration
- Workflow execution and monitoring
System Operations
- Health checks and diagnostics
- Performance monitoring
- Configuration management
- Database operations
Installation
pip install hacs-cli
Quick Start
Basic Commands
# Get help
hacs --help
# Create a patient
hacs patient create --name "John Doe" --birth-date "1980-01-01" --gender "male"
# List patients
hacs patient list
# Get patient details
hacs patient get --id PATIENT_ID
# Create observation
hacs observation create --patient-id PATIENT_ID --type "blood_pressure" --value "120/80" --unit "mmHg"
# List observations for a patient
hacs observation list --patient-id PATIENT_ID
Bulk Operations
# Import patients from CSV
hacs patient import --file patients.csv --format csv
# Export patients to JSON
hacs patient export --format json --output patients.json
# Bulk create observations
hacs observation import --file observations.json --format json
Commands Reference
Patient Management
# Create patient
hacs patient create --name "Jane Smith" --birth-date "1985-03-15"
# Update patient
hacs patient update --id PATIENT_ID --name "Jane Smith-Jones"
# Delete patient
hacs patient delete --id PATIENT_ID
# Search patients
hacs patient search --query "hypertension" --limit 10
Observation Management
# Create observation
hacs observation create \
--patient-id PATIENT_ID \
--type "vital_signs" \
--value '{"systolic": 120, "diastolic": 80}' \
--unit "mmHg"
# List observations
hacs observation list --patient-id PATIENT_ID --type "blood_pressure"
# Update observation
hacs observation update --id OBS_ID --value '{"systolic": 125, "diastolic": 82}'
Agent Operations
# Register agent
hacs agent register --id "dr_smith" --type "clinician" --name "Dr. Sarah Smith"
# Send message
hacs agent message send \
--from "dr_smith" \
--to "nurse_jones" \
--content "Patient needs follow-up" \
--type "clinical_note"
# List messages
hacs agent message list --agent-id "dr_smith"
System Operations
# Health check
hacs system health
# Database status
hacs system db status
# Run migrations
hacs system db migrate
# Performance metrics
hacs system metrics
# Configuration
hacs system config show
hacs system config set --key "api.timeout" --value "30"
Configuration
Configuration File
Create ~/.hacs/config.yaml:
database:
url: postgresql://user:pass@localhost/hacs
api:
base_url: http://localhost:8000
timeout: 30
auth:
token: your-api-token
logging:
level: INFO
file: ~/.hacs/logs/hacs.log
Environment Variables
export HACS_DATABASE_URL=postgresql://user:pass@localhost/hacs
export HACS_API_BASE_URL=http://localhost:8000
export HACS_AUTH_TOKEN=your-token
export HACS_LOG_LEVEL=INFO
Integration Examples
FHIR Integration
# Export to FHIR format
hacs patient export --format fhir --output patients.fhir.json
# Import from FHIR server
hacs patient import --fhir-server https://fhir.example.com --format fhir
Agent Framework Integration
# Start MCP adapter
hacs adapter mcp start --port 8080
# Configure LangGraph workflow
hacs adapter langgraph configure --workflow clinical_assessment
# Run CrewAI integration
hacs adapter crewai run --crew medical_team --input patient_data.json
Scripting and Automation
Batch Processing
#!/bin/bash
# Process multiple patients
for patient_file in patients/*.json; do
hacs patient import --file "$patient_file" --format json
done
Monitoring Script
#!/bin/bash
# Health monitoring
hacs system health --format json | jq '.status'
hacs system metrics --format json | jq '.memory_usage'
Documentation
For complete documentation, see the HACS Documentation.
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Contributing
See Contributing Guidelines for information on how to contribute to HACS CLI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hacs_cli-0.2.1-py3-none-any.whl.
File metadata
- Download URL: hacs_cli-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d56c057725a1668d906bfc8dd4c427c9e0ffe9494ff641aed98c2de604decf0
|
|
| MD5 |
aa8b6ded01dd95d1fb16c5b8d1f92f5d
|
|
| BLAKE2b-256 |
3a3e32c66a07fbe7de5723a44a3021824389554940c9fddb4369266eb7ff0243
|