Skip to main content
From patient arrival to bed assignment in four coordinated agents — with built-in HIPAA-compliant data handling and safety red-flag detection at every step.

Quick Start

1

Run the prebuilt triage workflow

from praisonaiagents import Agent, tool
from examples.cookbooks.Industry_Templates.healthcare_template import emergency_triage_workflow

result = emergency_triage_workflow(
    patient_id="PT-2024-00123",
    chief_complaint="severe chest pain radiating to left arm"
)

print(result["clinical_pathway"])
print(result["safety_checks"])
2

Add a specialised coordinator for labs or radiology

from examples.cookbooks.Industry_Templates.healthcare_template import (
    HealthcareCoordinationPatterns, TriageLevel
)

lab_agent = HealthcareCoordinationPatterns.coordinate_lab_orders(
    patient_id="PT-2024-00123",
    triage_level=TriageLevel.EMERGENT.value
)

lab_result = lab_agent.start("Order STAT troponin and CBC")
print(lab_result)

How It Works

AgentResponsibilitySLA
VitalSignsCaptureCapture vital signs from monitoring devices with HIPAA handling≤ 30 s
EMRRetrievalRetrieve patient EMR with consent verification and audit trail≤ 5 s
TriageRecommendationESI-based triage assessment with red-flag detection≤ 1 min
ResourceAllocatorAssign bed, staff, and equipment by priority score≤ 30 s

Configuration Options

Pydantic I/O schemas used by this template:
SchemaKey Fields
VitalSignspatient_id, heart_rate, blood_pressure_systolic, blood_pressure_diastolic, respiratory_rate, temperature, oxygen_saturation, pain_scale, consciousness_level
MedicalHistorypatient_id, allergies, chronic_conditions, current_medications, recent_visits, insurance_status
TriageAssessmentassessment_id, patient_id, triage_level, chief_complaint, recommended_department, estimated_wait_time, required_resources, red_flags
ResourceAllocationallocation_id, patient_id, assigned_bed, assigned_staff, equipment_needed, department, priority_score
Triage Levels (ESI standard)
LevelValueMeaning
11_resuscitationImmediate life-saving intervention
22_emergentHigh risk, severe pain or distress
33_urgentStable but multiple resources needed
44_less_urgentStable, one resource needed
55_non_urgentStable, no resources needed

Common Patterns

Audit every EMR access for HIPAA compliance
from examples.cookbooks.Industry_Templates.healthcare_template import HIPAACompliancePatterns

audit = HIPAACompliancePatterns.audit_log_access(
    user_id="DR-001",
    patient_id="PT-2024-00123",
    action="EMR_ACCESS",
    reason="emergency_triage"
)
print(audit)
Anonymise data before sending to analytics
from examples.cookbooks.Industry_Templates.healthcare_template import HIPAACompliancePatterns

raw_triage = {
    "patient_id": "PT-123",
    "triage_level": "2_emergent",
    "department": "emergency",
    "wait_time": 10
}
safe_data = HIPAACompliancePatterns.anonymize_patient_data(raw_triage)
print(safe_data)
Coordinate radiology for an urgent patient
from examples.cookbooks.Industry_Templates.healthcare_template import HealthcareCoordinationPatterns

radiology = HealthcareCoordinationPatterns.coordinate_radiology(
    patient_id="PT-2024-00123",
    imaging_type="chest_xray"
)
schedule = radiology.start("Book urgent chest X-ray, check for contrast allergy")
print(schedule)

Best Practices

If TriageRecommendation fails, the built-in fallback defaults to 3_urgent. This is a conservative choice — always escalate to a human nurse when the AI pipeline cannot complete.
TriageAssessment.red_flags is populated when vital signs suggest life-threatening conditions (e.g. low_oxygen, altered_consciousness). Wire these to your nurse-call or PA system with zero delay.
ResourceAllocator returns allocation_id and assigned_staff. Persist every allocation to your incident tracking system to satisfy accreditation and shift-handover requirements.

Industry Templates Overview

Hub page — choose the right template and understand cross-industry reuse.

Agriculture Template

Multispectral crop analysis, disease detection, and yield forecasting.