scientific-skills/Academic Writing/digital-twin-discharge-drafter/SKILL.md
Use when drafting patient discharge summaries, creating personalized discharge instructions, simulating post-discharge outcomes, reducing hospital readmissions, or optimizing care transitions. Generates AI-enhanced discharge documentation with digital twin predictions for improved patient safety.
npx skillsauth add aipoch/medical-research-skills digital-twin-discharge-drafterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate AI-enhanced discharge summaries and personalized care plans using digital twin patient models to predict outcomes and optimize post-discharge care transitions.
scripts/main.py.references/ for task-specific guidance.Python: 3.10+. Repository baseline for current packaged skills.dataclasses: unspecified. Declared in requirements.txt.dateutil: unspecified. Declared in requirements.txt.cd "20260318/scientific-skills/Academic Writing/digital-twin-discharge-drafter"
python -m py_compile scripts/main.py
python scripts/main.py --help
Example run plan:
CONFIG block or documented parameters if the script uses fixed settings.python scripts/main.py with the validated inputs.See ## Workflow above for related details.
scripts/main.py.references/ contains supporting rules, prompts, or checklists.Use this command to verify that the packaged script entry point can be parsed before deeper execution.
python -m py_compile scripts/main.py
Use these concrete commands for validation. They are intentionally self-contained and avoid placeholder paths.
python -m py_compile scripts/main.py
python scripts/main.py --help
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']
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:
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 |
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:
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 | <0.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 |
qa_report = drafter.validate_summary(
discharge_summary,
checks=[
"completeness_jcaho",
"medication_accuracy",
"readability_score",
"prediction_confidence"
]
)
# 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
Digital Twin Insights:
Generated Interventions:
Digital Twin Insights:
Generated Plan:
Pre-Discharge:
Discharge Summary:
Post-Discharge (24-48 hours):
Digital Twin Model Maintenance:
Patient Communication:
❌ 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
Every final response should make these items explicit when they are relevant:
scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.This skill accepts requests that match the documented purpose of digital-twin-discharge-drafter and include enough context to complete the workflow safely.
Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:
digital-twin-discharge-drafteronly handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.
Use the following fixed structure for non-trivial requests:
If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.
tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.