← Back to Skills Marketplace
aipoch-ai

Discharge Summary Writer

by AIpoch · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ Security Clean
174
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install discharge-summary-writer
Description
Generate hospital discharge summaries from admission data, hospital course, medications, and follow-up plans. Trigger when user needs to create a discharge s...
README (SKILL.md)

Discharge Summary Writer

Generate standardized, clinically accurate hospital discharge summaries by integrating all inpatient medical data.

When to Use

  • Patient discharge preparation requires comprehensive summary documentation
  • Compiling admission, treatment, and discharge data into unified records
  • Generating follow-up instructions and medication lists for post-discharge care
  • Creating legally compliant discharge documentation for medical records

Input Requirements

Required Patient Data

{
  "patient_info": {
    "name": "string",
    "gender": "string",
    "age": "number",
    "medical_record_number": "string",
    "admission_date": "YYYY-MM-DD",
    "discharge_date": "YYYY-MM-DD",
    "department": "string",
    "attending_physician": "string"
  },
  "admission_data": {
    "chief_complaint": "string",
    "present_illness_history": "string",
    "past_medical_history": "string",
    "physical_examination": "string",
    "admission_diagnosis": ["string"]
  },
  "hospital_course": {
    "treatment_summary": "string",
    "procedures_performed": ["string"],
    "significant_findings": "string",
    "complications": ["string"],
    "consultations": ["string"]
  },
  "discharge_status": {
    "discharge_diagnosis": ["string"],
    "discharge_condition": "string",
    "hospital_stay_days": "number"
  },
  "medications": {
    "discharge_medications": [
      {
        "name": "string",
        "dosage": "string",
        "frequency": "string",
        "route": "string",
        "duration": "string"
      }
    ]
  },
  "follow_up": {
    "instructions": "string",
    "follow_up_appointments": ["string"],
    "warning_signs": ["string"],
    "activity_restrictions": "string",
    "diet_instructions": "string"
  }
}

Usage

Python Script

python scripts/main.py --input patient_data.json --output discharge_summary.md --format standard

Parameters

Parameter Type Default Required Description
--input string - Yes Path to JSON file containing patient data
--output string discharge_summary.md No Output file path
--format string standard No Output format (standard, structured, json)
--template string - No Custom template file path
--language string zh No Output language (zh or en)

Output Formats

Standard Format

Human-readable markdown document following clinical discharge summary structure:

  1. Patient Information
  2. Admission Information
  3. Hospital Course
  4. Discharge Status
  5. Discharge Medications
  6. Follow-up Instructions
  7. Physician Signature

Structured Format

Sectioned markdown with clear headers for EMR integration.

JSON Format

Machine-readable structured data for system integration.

Technical Difficulty

⚠️ HIGH - Manual Review Required

This skill handles critical medical documentation. Output requires:

  • Physician verification before use
  • Compliance with local medical documentation standards
  • Review for accuracy and completeness
  • Institutional approval for template formats

Safety Considerations

  1. Never use generated summaries without physician review
  2. Verify all medication dosages and instructions
  3. Confirm follow-up appointments with hospital scheduling system
  4. Ensure discharge diagnoses match official medical records
  5. Validate patient identifiers and dates

References

  • references/discharge_template.md - Standard discharge summary template
  • references/medical_terms.json - Standardized medical terminology
  • references/section_guidelines.md - Guidelines for each section

Limitations

  • Does not access live EMR systems (requires manual data input)
  • Medication interactions not validated
  • Does not generate ICD-10 codes automatically
  • Requires structured input data
  • Output format must align with institutional requirements

Risk Assessment

Risk Indicator Assessment Level
Code Execution Python/R scripts executed locally Medium
Network Access No external API calls Low
File System Access Read input files, write output files Medium
Instruction Tampering Standard prompt guidelines Low
Data Exposure Output files saved to workspace Low

Security Checklist

  • No hardcoded credentials or API keys
  • No unauthorized file system access (../)
  • Output does not expose sensitive information
  • Prompt injection protections in place
  • Input file paths validated (no ../ traversal)
  • Output directory restricted to workspace
  • Script execution in sandboxed environment
  • Error messages sanitized (no stack traces exposed)
  • Dependencies audited

Prerequisites

No additional Python packages required.

Evaluation Criteria

Success Metrics

  • Successfully executes main functionality
  • Output meets quality standards
  • Handles edge cases gracefully
  • Performance is acceptable

Test Cases

  1. Basic Functionality: Standard input → Expected output
  2. Edge Case: Invalid input → Graceful error handling
  3. Performance: Large dataset → Acceptable processing time

Lifecycle Status

  • Current Stage: Draft
  • Next Review Date: 2026-03-06
  • Known Issues: None
  • Planned Improvements:
    • Performance optimization
    • Additional feature support
Usage Guidance
This skill appears to do what it claims, but before installing or running it consider: 1) This processes protected health information—run only in a secure, access-controlled environment and ensure compliance with your institution's privacy policies (HIPAA/GDPR equivalents). 2) The script reads the input JSON and writes output files in the workspace; verify output paths and restrict who can access the workspace to avoid PHI leakage. 3) SKILL.md's security checklist suggests input path validation and sandboxing, but the included script does not enforce path traversal checks—avoid passing untrusted paths and consider running in a sandbox/container. 4) Always require physician review of generated summaries (the skill itself does not validate clinical correctness or drug interactions). 5) If you need stricter guarantees, inspect/modify the script to add explicit input validation, logging controls, and an allowlist for output directories before deployment. 6) If institutional integration (EMR, scheduling) is required later, expect additional credentials and network safeguards to be necessary.
Capability Analysis
Type: OpenClaw Skill Name: discharge-summary-writer Version: 0.1.0 The discharge-summary-writer skill is a legitimate utility designed to generate medical discharge summaries from structured JSON input. The core logic in scripts/main.py is a straightforward template engine that performs basic data validation and string formatting without any network calls, external dependencies, or high-risk execution patterns (like eval or subprocess). The documentation in SKILL.md and the reference files (e.g., section_guidelines.md) provide comprehensive safety warnings and clinical guidelines, emphasizing the necessity of physician review and data accuracy.
Capability Assessment
Purpose & Capability
Name/description (discharge summary generation) match the included artifacts: SKILL.md, templates, example input, and a Python script that reads a JSON patient file and writes a summary. No unrelated environment variables, binaries, or cloud creds are requested.
Instruction Scope
Runtime instructions are narrowly scoped (run scripts/main.py with a local JSON input). SKILL.md includes a security checklist item requiring input path validation (no ../ traversal) and sandboxing, but the provided scripts/main.py does not implement explicit path traversal or sandbox checks— it directly opens the supplied input path and writes output to the specified path. The code also prints and writes generated summaries to workspace storage (PHI exposure risk) as expected for the task.
Install Mechanism
No install spec; this is an instruction-only skill plus a local Python script that uses only the standard library. No network downloads or external package installation are required.
Credentials
No environment variables, credentials, or config paths are requested. The data the skill processes is patient data provided by the user; that is appropriate for the stated purpose. The only notable requirement is that it will read files and write output to the agent's workspace, which is proportional but carries PHI handling implications.
Persistence & Privilege
Skill is not always-on, does not request elevated platform privileges, and does not modify agent/system-wide settings. Autonomous invocation is allowed by default (normal), but there is no indication this skill requires permanent presence or other unusual privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install discharge-summary-writer
  3. After installation, invoke the skill by name or use /discharge-summary-writer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release of Discharge Summary Writer. - Generates standardized hospital discharge summaries from structured patient data. - Supports multiple output formats: human-readable, structured, and JSON. - Requires manual clinical data input; does not connect to live EMR systems. - Provides safety guidance and technical documentation to ensure compliant use. - Includes customizable templates and language settings (zh/en). - Marked as high-risk: output requires physician review before use.
Metadata
Slug discharge-summary-writer
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Discharge Summary Writer?

Generate hospital discharge summaries from admission data, hospital course, medications, and follow-up plans. Trigger when user needs to create a discharge s... It is an AI Agent Skill for Claude Code / OpenClaw, with 174 downloads so far.

How do I install Discharge Summary Writer?

Run "/install discharge-summary-writer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Discharge Summary Writer free?

Yes, Discharge Summary Writer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Discharge Summary Writer support?

Discharge Summary Writer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Discharge Summary Writer?

It is built and maintained by AIpoch (@aipoch-ai); the current version is v0.1.0.

💬 Comments