← 返回 Skills 市场
aipoch-ai

Digital Twin Discharge Drafter

作者 AIpoch · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
156
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install digital-twin-discharge-drafter
功能描述
Use when drafting patient discharge summaries, creating personalized discharge instructions, simulating post-discharge outcomes, reducing hospital readmissio...
使用说明 (SKILL.md)

Digital Twin Discharge Drafter

Generate AI-enhanced discharge summaries and personalized care plans using digital twin patient models to predict outcomes and optimize post-discharge care transitions.

Quick Start

from scripts.discharge_drafter import DischargeDrafter

drafter = DischargeDrafter()

# Generate comprehensive discharge summary
summary = drafter.generate(
    patient_id="PT12345",
    admission_data=admission_info,
    hospital_course=treatment_history,
    digital_twin_model=patient_model,
    output_format="structured"
)

# Export patient-friendly version
patient_version = drafter.generate_patient_friendly(summary)

print(summary.readmission_risk_score)  # 0.23
print(summary.key_interventions)       # ['home_health', 'med_reconciliation']

Core Capabilities

1. Digital Twin-Powered Summary Generation

summary = drafter.create_summary(
    patient_data=patient_record,
    digital_twin_model=twin_model,
    include_predictions=True,
    risk_stratification="high",
    readmission_risk_threshold=0.15
)

Summary Components:

  • Hospital Course: AI-summarized treatment narrative
  • Digital Twin Predictions: 7-day, 30-day outcome probabilities
  • Risk Stratification: Readmission risk score with factors
  • Medication Reconciliation: AI-validated med list
  • Follow-up Schedule: Optimized based on patient model

2. Post-Discharge Outcome Simulation

scenarios = drafter.simulate_outcomes(
    patient_model=digital_twin,
    scenarios=[
        "medication_adherent",
        "medication_non_adherent", 
        "follow_up_missed",
        "social_support_optimal"
    ],
    timeframe="30_days",
    metrics=["readmission_risk", "recovery_trajectory", "cost_projection"]
)

Simulation Outputs:

Scenario Readmission Risk Recovery Time Cost Impact
Optimal adherence 5% 14 days Baseline
Med non-adherent 25% 28 days +$8,500
Missed follow-up 18% 21 days +$4,200

3. Personalized Patient Instructions

instructions = drafter.create_personalized_instructions(
    patient_profile=profile,
    health_literacy_level="assessed",  # or "8th_grade", "college"
    language_preference="English",
    cultural_considerations=True,
    access_barriers=["transportation", "cost"]
)

# Returns structured instructions
print(instructions.medication_list)      # Formatted medication table
print(instructions.followup_appointments)  # Scheduled visits
print(instructions.red_flags)            # When to call doctor
print(instructions.lifestyle_changes)    # Diet, activity restrictions

Personalization Factors:

  • Health Literacy: Adjust complexity (Flesch-Kincaid 6th-12th grade)
  • Language: Multi-language support with medical accuracy
  • Cultural: Dietary restrictions, family dynamics, beliefs
  • Barriers: Transportation, cost, caregiver availability

4. Risk-Based Care Planning

care_plan = drafter.create_risk_based_plan(
    patient_risk_score=0.72,
    risk_factors=["CHF", "diabetes", "living_alone"],
    interventions=[
        "telehealth_monitoring",
        "home_health_visit",
        "pharmacy_consult"
    ]
)

Risk Stratification:

Risk Level Score Interventions
Low \x3C0.10 Standard discharge + phone follow-up
Moderate 0.10-0.25 + Telehealth monitoring
High 0.25-0.50 + Home health visit within 48h
Very High >0.50 + Care coordination + daily check-ins

5. Quality Assurance

qa_report = drafter.validate_summary(
    discharge_summary,
    checks=[
        "completeness_jcaho",
        "medication_accuracy",
        "readability_score",
        "prediction_confidence"
    ]
)

CLI Usage

# Generate complete discharge package
python scripts/discharge_drafter.py \
  --patient PT12345 \
  --digital-twin-model models/patient_v2.pkl \
  --include-predictions \
  --output-format both \
  --output-dir discharge_summaries/

# Batch process high-risk patients
python scripts/discharge_drafter.py \
  --batch high_risk_patients.csv \
  --priority ICU,CCU \
  --auto-escalate-risk 0.30

# Generate patient-friendly only
python scripts/discharge_drafter.py \
  --patient PT12345 \
  --mode patient-friendly \
  --reading-level 6th_grade \
  --language Spanish \
  --output patient_handout.pdf

Common Patterns

Pattern 1: CHF Patient Discharge

Digital Twin Insights:

  • Baseline readmission risk: 22%
  • With medication adherence: 8%
  • Without follow-up: 35%

Generated Interventions:

  • Daily weight telemonitoring
  • Cardiology appointment within 7 days
  • Medication reconciliation with pharmacist
  • Home health evaluation

Pattern 2: Post-Surgical Patient

Digital Twin Insights:

  • Infection risk peaks day 3-5
  • Mobility compliance critical for recovery

Generated Plan:

  • Wound care video instructions
  • Physical therapy schedule
  • Red flag symptom checklist
  • Pain management protocol

Quality Checklist

Pre-Discharge:

  • Digital twin model updated with hospital course
  • Readmission risk calculated and documented
  • Medication reconciliation completed
  • Follow-up appointments scheduled
  • Patient/caregiver education requirements assessed

Discharge Summary:

  • Includes digital twin predictions with confidence intervals
  • Risk factors clearly listed with mitigation strategies
  • Patient-friendly instructions at appropriate literacy level
  • Emergency contact numbers provided
  • 24/7 nurse line access included

Post-Discharge (24-48 hours):

  • Automated follow-up call triggered
  • Pharmacy notified of new prescriptions
  • Primary care provider receives summary
  • Home health services activated (if indicated)

Best Practices

Digital Twin Model Maintenance:

  • Update models weekly with new patient data
  • Validate predictions against actual outcomes
  • Retrain models quarterly for accuracy improvement

Patient Communication:

  • Always provide both clinical and patient-friendly versions
  • Use teach-back method to confirm understanding
  • Document health literacy level in patient record

Common Pitfalls

Over-reliance on AI: Digital twin predictions supplement, not replace, clinical judgment ✅ Clinical Oversight: Physician reviews and approves all AI-generated content

Generic Instructions: One-size-fits-all discharge plans ✅ Personalized Plans: Tailored to individual patient models and barriers

Ignoring Low-Risk Patients: Focusing only on high-risk cases ✅ Universal Application: All patients benefit from digital twin insights


Skill ID: 214 | Version: 1.0 | License: MIT

安全使用建议
This skill appears coherent with its stated purpose, but before installing or using it with real patients: 1) Verify PHI handling and compliance (HIPAA): ensure logs, outputs, and any model files stay on approved infrastructure and are encrypted/authorized. 2) Confirm the model-loading behavior: main._load_model currently returns {} and SKILL.md references a different module name (scripts.discharge_drafter) — fix/test the code to ensure it actually loads and validates local model files and does not call unexpected endpoints. 3) Test with synthetic data first to validate outputs and to ensure no accidental network calls or telemetry exist. 4) Review and pin any runtime dependencies and run a code review for secure handling of files/paths. If you need the skill to integrate with other systems (EHR, messaging), require explicit, minimal credentials and audit those integrations separately.
功能分析
Type: OpenClaw Skill Name: digital-twin-discharge-drafter Version: 0.1.0 The skill bundle is a legitimate tool for drafting medical discharge summaries using simulated 'digital twin' logic. The Python code in scripts/main.py implements standard data processing for patient records and risk stratification without any network calls, obfuscation, or unauthorized file access. No evidence of prompt injection or malicious intent was found in SKILL.md or the supporting documentation.
能力评估
Purpose & Capability
Name and description (discharge summaries, personalized instructions, simulations) align with the provided code and references. The included Python class implements summary generation, simulation, personalization, risk-based plans, and QA checks — all consistent with the stated purpose.
Instruction Scope
SKILL.md instructs only local operations (generate summaries, read local model files, write outputs). It does not ask for unrelated system files or credentials. Minor issues: examples import from scripts.discharge_drafter or call scripts/discharge_drafter.py, but the repository contains scripts/main.py (which defines DischargeDrafter). The SKILL.md and main.py appear truncated in places; main._load_model currently returns an empty dict rather than loading a model file, so model-loading behavior may be incomplete — a functionality concern, not a security inconsistency.
Install Mechanism
No install spec is provided (instruction-only skill with code files bundled). That is lowest-risk from an install perspective. requirements.txt lists small, common Python deps; no remote downloads or archive extraction are performed by an installer here.
Credentials
The skill declares no required environment variables, no credentials, and no config paths. The code does not access environment variables or external secrets. This is proportionate to its stated function, which operates on supplied patient data and local model files.
Persistence & Privilege
The skill is not always-enabled and does not request elevated or persistent privileges. It does not modify other skills or system-wide settings in the provided files. Autonomous invocation is allowed by default (platform default) and is not, by itself, a concern.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install digital-twin-discharge-drafter
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /digital-twin-discharge-drafter 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
- Initial release of digital-twin-discharge-drafter. - Generates AI-powered discharge summaries and structured care plans using digital twin patient models. - Supports outcome simulation for various post-discharge scenarios to predict readmission risks and optimize interventions. - Personalizes patient instructions based on health literacy, language, culture, and potential barriers. - Enables risk-based care planning with automated stratification and targeted interventions. - Quality assurance features included for completeness, medication accuracy, and readability validation.
元数据
Slug digital-twin-discharge-drafter
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Digital Twin Discharge Drafter 是什么?

Use when drafting patient discharge summaries, creating personalized discharge instructions, simulating post-discharge outcomes, reducing hospital readmissio... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 156 次。

如何安装 Digital Twin Discharge Drafter?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install digital-twin-discharge-drafter」即可一键安装,无需额外配置。

Digital Twin Discharge Drafter 是免费的吗?

是的,Digital Twin Discharge Drafter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Digital Twin Discharge Drafter 支持哪些平台?

Digital Twin Discharge Drafter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Digital Twin Discharge Drafter?

由 AIpoch(@aipoch-ai)开发并维护,当前版本 v0.1.0。

💬 留言讨论