{"data":{"slug":"github-aipoch-medical-research-skills-scientific-skills-academic-writing-automated-soap-note-generator-f3d660072ff9","title":"Automated SOAP Note Generator for Clinical Documentation","summary":"Generate structured SOAP notes from de-identified clinical narratives, transcripts, or existing notes, with clear separation of Subjective, Objective, Assessment, and Plan sections for clinical review.","url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-academic-writing-automated-soap-note-generator-f3d660072ff9","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-aipoch-medical-research-skills-scientific-skills-academic-writing-automated-soap-note-generator-f3d660072ff9","markdown_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-academic-writing-automated-soap-note-generator-f3d660072ff9.md","download_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-scientific-skills-academic-writing-automated-soap-note-generator-f3d660072ff9\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_note":"Verify input text quality (clear audio \u2192 better transcription \u2192 better SOAP). Remove patient identifiers before processing unless in a secure environment. Use either `input_text` or `transcript_path` as required inputs.","instructions":"---\nname: automated-soap-note-generator\ndescription: Generate structured SOAP notes from clinical narratives, transcripts, or existing notes; use when the user needs de-identified clinical documentation organized into Subjective, Objective, Assessment, and Plan sections, with clear assumptions and review points.\nlicense: MIT\nauthor: AIPOCH\n---\n> **Source**: [https:\/\/github.com\/aipoch\/medical-research-skills](https:\/\/github.com\/aipoch\/medical-research-skills)\n\n# Automated SOAP Note Generator\n\n## Quick Check\n\nUse this command to verify that the packaged script entry point can be parsed before deeper execution.\n\n```bash\npython -m py_compile scripts\/main.py\n```\n\n## Audit-Ready Commands\n\nUse these concrete commands for validation. They are intentionally self-contained and avoid placeholder paths.\n\n```bash\npython -m py_compile scripts\/main.py\npython scripts\/main.py --help\npython scripts\/main.py --input \"Audit validation sample with explicit symptoms, history, assessment, and next-step plan.\" --patient-id P12345 --provider \"Dr. Smith\" --format json\n```\n\n## Workflow\n\n1. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.\n2. Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.\n3. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.\n4. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.\n5. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.\n\n## Overview\n\nAI-powered clinical documentation tool that converts unstructured clinical input into professionally formatted SOAP notes compliant with medical documentation standards.\n\n**Key Capabilities:**\n- **Intelligent Parsing**: Extracts structured information from free-text clinical narratives\n- **SOAP Classification**: Automatically categorizes content into Subjective, Objective, Assessment, Plan sections\n- **Medical Entity Recognition**: Identifies symptoms, diagnoses, medications, procedures, and anatomical locations\n- **Temporal Analysis**: Extracts timeline information (onset, duration, progression)\n- **Template Generation**: Produces standardized SOAP format suitable for EHR integration\n- **Multi-modal Input**: Accepts text dictation, transcripts, or clinical notes\n\n## When to Use\n\n- Use this skill when the user provides de-identified clinical narratives, dictation, or transcripts and needs a structured SOAP note.\n- Use this skill when the output must clearly separate Subjective, Objective, Assessment, and Plan sections for clinical review.\n- Use this skill when you need a reproducible script-backed workflow with explicit assumptions, unresolved items, and fallback handling.\n\n## Core Capabilities\n\n### 1. Input Processing and Preprocessing\n\nHandle various input formats and prepare for NLP analysis:\n\n```python\nfrom scripts.soap_generator import SOAPNoteGenerator\n\ngenerator = SOAPNoteGenerator()\n\n# Process text input\nsoap_note = generator.generate(\n    input_text=\"Patient presents with 2-day history of chest pain, radiating to left arm...\",\n    patient_id=\"P12345\",\n    encounter_date=\"2026-01-15\",\n    provider=\"Dr. Smith\"\n)\n\n# Process from audio transcript\nsoap_note = generator.generate_from_transcript(\n    transcript_path=\"consultation_transcript.txt\",\n    patient_id=\"P12345\"\n)\n```\n\n**Input Preprocessing Steps:**\n1. **Text Cleaning**: Remove filler words (\"um\", \"uh\"), timestamps, speaker labels\n2. **Sentence Segmentation**: Split into clinically meaningful segments\n3. **Normalization**: Standardize abbreviations and medical shorthand\n4. **Encoding Detection**: Handle various file formats (UTF-8, ASCII, etc.)\n\n**Parameters:**\n| Parameter | Type | Required | Description | Default |\n|-----------|------|----------|-------------|---------|\n| `input_text` | str | Yes* | Raw clinical text or dictation | None |\n| `transcript_path` | str | Yes* | Path to transcript file | None |\n| `patient_id` | str | No | Patient identifier (MUST be de-identified for testing) | None |\n| `encounter_date` | str | No | Date in ISO 8601 format (YYYY-MM-DD) | Current date |\n| `provider` | str | No | Healthcare provider name | None |\n| `specialty` | str | No | Medical specialty context | \"general\" |\n| `verbose` | bool | No | Include confidence scores | False |\n\n*Either `input_text` or `transcript_path` required\n\n**Best Practices:**\n- Always verify input text quality (clear audio \u2192 better transcription \u2192 better SOAP)\n- Remove patient identifiers before processing unless in secure environment\n- Split long encounters (>30 minutes) into logical segments\n- Flag ambiguous abbreviations for manual review\n\n### 2. Medical Named Entity Recognition (NER)\n\nIdentify and extract medical concepts from unstructured text:\n\n```python\n# Extract entities with context\nentities = generator.extract_medical_entities(\n    \"Patient has history of hypertension and diabetes, \n     currently taking lisinopril 10mg daily and metformin 500mg BID\"\n)\n\n# Returns structured entities:\n# {\n#   \"diagnoses\": [\"hypertension\", \"diabetes mellitus\"],\n#   \"medications\": [\n#     {\"name\": \"lisinopril\", \"dose\": \"10mg\", \"frequency\": \"daily\"},\n#     {\"name\": \"metformin\", \"dose\": \"500mg\", \"frequency\": \"BID\"}\n#   ]\n# }\n```\n\n**Entity Types Recognized:**\n| Category | Examples | Notes |\n|----------|----------|-------|\n| **Diagnoses** | diabetes, hypertension, pneumonia | ICD-10 compatible where possible |\n| **Symptoms** | chest pain, headache, nausea | Includes severity modifiers |\n| **Medications** | metformin, lisinopril, aspirin | Extracts dose, route, frequency |\n| **Procedures** | ECG, CT scan, blood draw | Includes body site |\n| **Anatomy** | left arm, chest, abdomen | Laterality and location |\n| **Lab Values** | glucose 120, BP 140\/90 | Units and reference ranges |\n| **Temporal** | yesterday, 3 days ago, chronic | Normalized to relative dates |\n\n**Common Issues and Solutions:**\n\n**Issue: Missed medications**\n- Symptom: Generic names not recognized (e.g., \"water pill\" for diuretic)\n- Solution: Manual review required; tool flags colloquial terms for verification\n\n**Issue: Ambiguous abbreviations**\n- Symptom: \"SOB\" could be shortness of breath or something else\n- Solution: Context-aware disambiguation; flag uncertain cases\n\n**Issue: Misspelled drug names**\n- Symptom: \"metfomin\" instead of \"metformin\"\n- Solution: Fuzzy matching with confidence threshold; flag low-confidence matches\n\n### 3. SOAP Section Classification\n\nAutomatically categorize sentences into appropriate SOAP sections:\n\n```python\n# Classify content into SOAP sections\nclassified = generator.classify_soap_sections(\n    \"Patient reports chest pain for 2 days. Physical exam shows BP 140\/90. \n     Likely angina. Schedule stress test and start aspirin 81mg daily.\"\n)\n\n# Output structure:\n# {\n#   \"Subjective\": [\"Patient reports chest pain for 2 days\"],\n#   \"Objective\": [\"Physical exam shows BP 140\/90\"],\n#   \"Assessment\": [\"Likely angina\"],\n#   \"Plan\": [\"Schedule stress test\", \"start aspirin 81mg daily\"]\n# }\n```\n\n**Classification Rules:**\n| Section | Content Type | Examples |\n|---------|--------------|----------|\n| **S** - Subjective | Patient-reported information | \"Patient states...\", \"Patient reports...\", \"Complains of...\" |\n| **O** - Objective | Observable\/measurable findings | Vital signs, physical exam, lab results, imaging |\n| **A** - Assessment | Clinical interpretation | Diagnosis, differential, clinical impression |\n| **P** - Plan | Actions to be taken | Medications, procedures, follow-up, patient education |\n\n**Multi-label Handling:**\nSome sentences span multiple sections (e.g., \"Patient reports chest pain [S], which was sharp and 8\/10 [S], with ECG showing ST elevation [O]\")\n- Tool splits compound sentences at conjunctions\n- Assigns primary and secondary labels with confidence scores\n\n**Best Practices:**\n- Review classification accuracy, especially for complex multi-part statements\n- Manually verify Assessment section (most critical for patient care)\n- Ensure temporal context preserved (recent vs. chronic symptoms)\n\n### 4. Temporal Information Extraction\n\nParse and normalize timeline information:\n\n```python\n# Extract temporal relationships\ntimeline = generator.extract_temporal_info(\n    \"Patient had chest pain starting 3 days ago, worsening since yesterday. \n     Had similar episode 2 months ago that resolved with rest.\"\n)\n\n# Returns:\n# {\n#   \"onset\": \"3 days ago\",\n#   \"progression\": \"worsening\",\n#   \"previous_episodes\": [\n#     {\"time\": \"2 months ago\", \"resolution\": \"with rest\"}\n#   ]\n# }\n```\n\n**Temporal Elements Extracted:**\n- **Onset**: When symptoms started (\"2 days ago\", \"this morning\")\n- **Duration**: How long symptoms lasted (\"for 3 hours\", \"ongoing\")\n- **Frequency**: How often symptoms occur (\"daily\", \"intermittently\")\n- **Progression**: Getting better\/worse\/stable\n- **Prior Episodes**: Previous similar events\n- **Context**: \"before meals\", \"with exertion\", \"at night\"\n\n**Normalization:**\nConverts relative dates to standardized format:\n- \"yesterday\" \u2192 Encounter date minus 1 day\n- \"3 days ago\" \u2192 Specific date calculated\n- \"chronic\" \u2192 Flagged for chronic condition tracking\n\n### 5. Negation and Uncertainty Detection\n\nCritical for accurate medical documentation:\n\n```python\n# Detect negations and uncertainties\nanalysis = generator.analyze_certainty(\n    \"Patient denies chest pain. No shortness of breath. \n     Possibly had fever yesterday but not sure.\"\n)\n\n# Identifies:\n# - \"denies chest pain\" \u2192 Negative finding (important!)\n# - \"No shortness of breath\" \u2192 Negative finding\n# - \"Possibly had fever\" \u2192 Uncertain finding (flag for verification)\n```\n\n**Detection Categories:**\n| Type | Cues | Action |\n|------|------|--------|\n| **Negation** | denies, no, without, absent | Mark as negative finding |\n| **Uncertainty** | possibly, maybe, uncertain, ? | Flag for physician review |\n| **Hypothetical** | if, would, could | Note as conditional |\n| **Family History** | family history of, mother had | Separate from patient findings |\n\n**\u26a0\ufe0f Critical:**\nNegation errors are high-risk (e.g., missing \"denies\" \u2192 documenting symptom they don't have)\n- Always verify negative findings in Subjective section\n- Uncertain findings must be explicitly marked for review\n\n### 6. Structured SOAP Generation\n\nProduce final formatted output:\n\n```python\n# Generate complete SOAP note\nsoap_output = generator.generate_soap_document(\n    structured_data=classified,\n    format=\"markdown\",  # Options: markdown, json, hl7, text\n    include_metadata=True\n)\n```\n\n**Output Format:**\n```markdown\n# SOAP Note\n\n**Patient ID:** P12345  \n**Date:** 2026-01-15  \n**Provider:** Dr. Smith\n\n## Subjective\nPatient reports [extracted symptoms with duration]. History of [chronic conditions]. \nCurrently taking [medications]. Patient denies [negative findings].\n\n## Objective\n**Vital Signs:** [BP, HR, RR, Temp, O2Sat]  \n**Physical Examination:** [Exam findings by system]  \n**Laboratory\/Data:** [Relevant results]\n\n## Assessment\n[Primary diagnosis\/differential]  \n[Clinical reasoning summary]\n\n## Plan\n1. [Action item 1]\n2. [Action item 2]\n3. [Follow-up instructions]\n\n---\n*Generated by AI. REQUIRES PHYSICIAN REVIEW before entry into patient record.*\n```\n\n**Export Formats:**\n| Format | Use Case | Notes |\n|--------|----------|-------|\n| **Markdown** | Human review, documentation | Default, readable |\n| **JSON** | System integration, research | Structured data |\n| **HL7 FHIR** | EHR integration | Healthcare standard |\n| **Plain Text** | Simple documentation | Minimal formatting |\n| **CSV** | Data analysis, research | Tabular data export |\n\n## Limitations\n\n- **Not a diagnostic tool**: Cannot make medical decisions or diagnoses\n- **Specialty coverage**: Best performance in internal medicine, family practice; variable in highly specialized fields\n- **Language**: Optimized for English; limited support for other languages\n- **Context window**: May lose context in very long, complex encounters\n- **Ambiguity**: Struggles with highly ambiguous or contradictory input\n- **Rare conditions**: May not recognize very rare diseases or new medications\n- **Non-verbal cues**: Cannot interpret tone, emphasis, or non-verbal information from audio\n\n## Parameters\n\n| Parameter | Type | Default | Required | Description |\n|-----------|------|---------|----------|-------------|\n| `--input`, `-i` | string | - | No | Input clinical text directly |\n| `--input-file`, `-f` | string | - | No | Path to input text file |\n| `--output`, `-o` | string | - | No | Output file path |\n| `--patient-id`, `-p` | string | - | No | Patient identifier |\n| `--provider` | string | - | No | Healthcare provider name |\n| `--format` | string | markdown | No | Output format (markdown, json) |\n\n## Usage\n\n### Basic Usage\n\n```text\n# Generate SOAP from text\npython scripts\/main.py --input \"Patient reports chest pain...\" --output note.md\n\n# From file\npython scripts\/main.py --input-file consultation.txt --patient-id P12345 --provider \"Dr. Smith\"\n\n# JSON output\npython scripts\/main.py --input-file notes.txt --format json --output note.json\n```\n\n## Output Requirements\n\nEvery final response should make these items explicit when they are relevant:\n\n- Objective or requested deliverable\n- Inputs used and assumptions introduced\n- Workflow or decision path\n- Core result, recommendation, or artifact\n- Constraints, risks, caveats, or validation needs\n- Unresolved items and next-step checks\n\n## Error Handling\n\n- If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.\n- If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.\n- If `scripts\/main.py` fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.\n- Do not fabricate files, citations, data, search results, or execution outcomes.\n\n## Input Validation\n\nThis skill accepts requests that match the documented purpose of `automated-soap-note-generator` and include enough context to complete the workflow safely.\n\nDo not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:\n\n> `automated-soap-note-generator` only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.\n\n## Response Template\n\nUse the following fixed structure for non-trivial requests:\n\n1. Objective\n2. Inputs Received\n3. Assumptions\n4. Workflow\n5. Deliverable\n6. Risks and Limits\n7. Next Checks\n\nIf the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.\n\n## When Not to Use\n\n- Do not proceed when required input files, identifiers, parameters, or context are missing \u2014 ask the user to provide them first.\n- Do not assume capabilities beyond this skill's declared scope when the user requests external operations or inferences.\n- Do not proceed without user confirmation when overwriting existing results, executing high-cost batch operations, or expanding task scope.\n\n## Required Inputs\n\n| Field | Required | Format\/Source | Example | If Missing |\n|---|---|---|---|---|\n| User task description | Yes | Text | Research question, writing goal, analysis objective | Stop and ask user to provide |\n| Primary input material | Depends on task | Text, file path, ID, table, or literature | PMID, PDF, CSV, DOCX, keywords, etc. | Specify which material type is missing |\n| Output preference | No | Text | Language, format, target journal, template | Use skill default format |\n\n## Output Contract\n\n- Primary output: Structured result or target file aligned with this skill's objective.\n- Optional output: Intermediate check notes, issue list, supplementary suggestions, or generated file paths.\n- Format requirement: Unless the user specifies otherwise, prefer stable, reviewable Markdown or JSON; if the skill's bundled script requires a fixed format, use that format.\n- If partially complete: Must explicitly mark as PARTIAL and state which steps are completed and which remain.\n\n## Failure Handling\n\n- Missing critical input: Explicitly state which fields, files, or identifiers are missing and pause.\n- Script, template, or resource execution failure: Report the failing step, likely cause, and recovery suggestions \u2014 do not silently degrade.\n- Partial completion only: Return the verified portion first, then list remaining blockers and suggested next steps.\n\n## User Checkpoints\n\n- Before executing batch processing, overwriting files, long-running searches, or multi-stage generation, confirm scope and output format with the user.\n- Before proceeding when a key judgment is ambiguous, evidence is insufficient, or the workflow is entering the next stage, confirm with the user.\n\n## Quick Validation\n\n- Check that key scripts, templates, or reference file paths this skill depends on exist.\n- Check that the final output contains the core fields, sections, or files specified for this task.\n- Check that results clearly mark assumptions, limitations, and incomplete items.\n","use_cases":["Generate SOAP notes from clinical narratives for EHR integration","Create structured SOAP notes from audio transcripts for review","Standardize clinical documentation for audit-ready records"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/aipoch\/medical-research-skills\/blob\/686e09dfdb45d9fa1a08664f06bb93769b3c9d91\/scientific-skills\/Academic%20Writing\/automated-soap-note-generator\/SKILL.md","source_commit":"686e09dfdb45d9fa1a08664f06bb93769b3c9d91","license":"MIT","version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T09:17:55.000000Z","updated_at":"2026-11-24T07:13:43.000000Z","seo_title":"Automated SOAP Note Generator for Clinical Documentation","seo_description":"Generate structured SOAP notes from clinical narratives, transcripts, or existing notes for de-identified clinical documentation.","seo_keywords":["SOAP note generator","clinical documentation tool","structured SOAP note creation","medical record formatting","clinical note generator"]}}