Skip to content
OpenSmartRoute
Skillv1.0.0

abridge-core-workflow-b

Implement Abridge patient-facing documentation and after-visit summary generation. Use when building patient portal integration, generating plain-language summaries, multi-language translations, or af

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (plugins/saas-packs/abridge-pack/skills/abridge-core-workflow-b/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill abridge-core-workflow-b. Copyright stays with the author (MIT).

Abridge Core Workflow B — Patient-Facing Documentation

Overview

Secondary workflow: generating plain-language patient summaries from the same clinical encounter captured in Workflow A. Abridge produces both clinician notes and patient-friendly after-visit summaries (AVS), supporting 28+ languages and multiple reading levels.

Prerequisites

  • Completed abridge-core-workflow-a (encounter-to-note pipeline)
  • Patient portal integration configured (Epic MyChart, Athena Patient Portal)
  • Understanding of health literacy requirements

Instructions

Step 1: Request Patient Summary from Completed Session

// src/workflows/patient-summary.ts
import axios, { AxiosInstance } from 'axios';

interface PatientSummary {
  summary_id: string;
  session_id: string;
  language: string;                    // ISO 639-1 code
  reading_level: 'basic' | 'intermediate' | 'advanced';
  sections: {
    visit_reason: string;              // Plain-language chief complaint
    what_we_discussed: string;         // Key discussion points
    your_diagnosis: string;            // Explained at target reading level
    next_steps: string;                // Action items for patient
    medications: Array<{
      name: string;
      instructions: string;           // "Take 1 pill by mouth twice daily"
      warnings: string;
    }>;
    follow_up: {
      when: string;                    // "Come back in 2 weeks"
      why: string;                     // "To check if your cough improved"
      scheduling_instructions: string;
    };
    questions_to_ask: string[];        // AI-suggested questions for next visit
  };
  source_encounter: {
    date: string;
    provider_name: string;
    department: string;
  };
}

async function generatePatientSummary(
  api: AxiosInstance,
  sessionId: string,
  language: string = 'en',
  readingLevel: PatientSummary['reading_level'] = 'basic'
): Promise<PatientSummary> {
  const { data } = await api.post(`/encounters/sessions/${sessionId}/patient-summary`, {
    language,
    reading_level: readingLevel,
    include_medications: true,
    include_follow_up: true,
    include_suggested_questions: true,
  });

  return data;
}

Step 2: Push to Patient Portal via FHIR

// src/workflows/patient-portal-push.ts
interface FhirCommunication {
  resourceType: 'Communication';
  status: 'completed';
  category: Array<{ coding: Array<{ system: string; code: string }> }>;
  subject: { reference: string };
  encounter: { reference: string };
  payload: Array<{ contentString: string }>;
  sent: string;
}

async function pushToMyChart(
  fhirBaseUrl: string,
  accessToken: string,
  summary: {
    patient_id: string;
    encounter_id: string;
    content: string;
    language: string;
  }
): Promise<string> {
  const communication: FhirCommunication = {
    resourceType: 'Communication',
    status: 'completed',
    category: [{
      coding: [{
        system: 'http://terminology.hl7.org/CodeSystem/communication-category',
        code: 'notification',
      }],
    }],
    subject: { reference: `Patient/${summary.patient_id}` },
    encounter: { reference: `Encounter/${summary.encounter_id}` },
    payload: [{ contentString: summary.content }],
    sent: new Date().toISOString(),
  };

  const response = await axios.post(
    `${fhirBaseUrl}/Communication`,
    communication,
    { headers: { Authorization: `Bearer ${accessToken}` } }
  );

  return response.data.id;
}

Step 3: Multi-Language Translation

// src/workflows/translation.ts
// Abridge supports 28+ languages natively — no external translation service needed

const SUPPORTED_LANGUAGES = [
  'en', 'es', 'zh', 'ar', 'vi', 'ko', 'tl', 'ru', 'fr', 'pt',
  'hi', 'de', 'ja', 'it', 'pl', 'ur', 'fa', 'bn', 'pa', 'gu',
  'ha', 'yo', 'am', 'so', 'sw', 'ne', 'my', 'th',
] as const;

async function generateMultiLanguageSummaries(
  api: AxiosInstance,
  sessionId: string,
  languages: string[]
): Promise<Map<string, PatientSummary>> {
  const summaries = new Map<string, PatientSummary>();

  // Generate summaries in parallel for requested languages
  const results = await Promise.allSettled(
    languages.map(lang =>
      generatePatientSummary(api, sessionId, lang, 'basic')
    )
  );

  results.forEach((result, index) => {
    if (result.status === 'fulfilled') {
      summaries.set(languages[index], result.value);
    } else {
      console.error(`Translation failed for ${languages[index]}:`, result.reason);
    }
  });

  return summaries;
}

Step 4: Format After-Visit Summary (AVS)

// src/workflows/avs-formatter.ts
function formatAfterVisitSummary(summary: PatientSummary): string {
  const lines: string[] = [
    `AFTER-VISIT SUMMARY`,
    `Date: ${summary.source_encounter.date}`,
    `Provider: ${summary.source_encounter.provider_name}`,
    `Department: ${summary.source_encounter.department}`,
    '',
    `WHY YOU CAME IN`,
    summary.sections.visit_reason,
    '',
    `WHAT WE DISCUSSED`,
    summary.sections.what_we_discussed,
    '',
    `YOUR DIAGNOSIS`,
    summary.sections.your_diagnosis,
    '',
    `WHAT TO DO NEXT`,
    summary.sections.next_steps,
  ];

  if (summary.sections.medications.length > 0) {
    lines.push('', 'YOUR MEDICATIONS');
    for (const med of summary.sections.medications) {
      lines.push(`  ${med.name}: ${med.instructions}`);
      if (med.warnings) lines.push(`    Important: ${med.warnings}`);
    }
  }

  lines.push(
    '',
    'FOLLOW-UP',
    `When: ${summary.sections.follow_up.when}`,
    `Why: ${summary.sections.follow_up.why}`,
    summary.sections.follow_up.scheduling_instructions,
  );

  return lines.join('\n');
}

Output

  • Patient-friendly after-visit summary at target reading level
  • Multi-language translations (28+ languages supported)
  • FHIR Communication resource pushed to patient portal
  • Formatted AVS document with medications, follow-up, and next steps

Examples

For a sandbox portal test, use a completed encounter containing only synthetic patient data to request a basic-reading-level English summary and a Spanish translation. Review both summaries for required medication and follow-up sections before formatting the English version as an AVS. Post the approved synthetic summary to the sandbox Communication endpoint and record only the returned resource ID. If translation or portal delivery fails, retain redacted error metadata, correct the test input or authorization, and never substitute production patient text in the retry.

Error Handling

Error Cause Solution
Unsupported language Language not in Abridge's 28+ set Check SUPPORTED_LANGUAGES list
Summary too vague Encounter transcript was short Ensure encounter has enough clinical detail
MyChart push 403 Patient portal not linked Verify patient has active MyChart account
Missing medications Provider didn't discuss meds Medications only included if mentioned in encounter

Resources

Next Steps

For common integration errors, see abridge-common-errors.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-abridge-core-8ab3ba/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-abridge-core-8ab3ba.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-abridge-core-8ab3ba",
  "kind": "skill",
  "name": "abridge-core-workflow-b",
  "description": "Implement Abridge patient-facing documentation and after-visit summary generation. Use when building patient portal integration, generating plain-language summaries, multi-language translations, or after-visit instructions from clinical encounters. Trigger: \"abridge patient summary\", \"after-visit summary\", \"patient portal abridge\", \"abridge patient-facing\", \"abridge multilingual\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "medical"
    ],
    "tags": [
      "skill-md",
      "saas",
      "healthcare",
      "ai",
      "abridge",
      "patient-engagement",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Implement Abridge patient-facing documentation and after-visit summary generation. Use when building patient portal integration, generating plain-language summaries, multi-language translations, or after-visit instructions from clinical encounters. Trigger: \"abridge patient summary\", \"after-visit summary\", \"patient portal abridge\", \"abridge patient-facing\", \"abridge multilingual\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "plugins/saas-packs/abridge-pack/skills/abridge-core-workflow-b/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/plugins/saas-packs/abridge-pack/skills/abridge-core-workflow-b/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/plugins/saas-packs/abridge-pack/skills/abridge-core-workflow-b/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(npm:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Abridge Core Workflow B — Patient-Facing Documentation\n\n## Overview\n\nSecondary workflow: generating plain-language patient summaries from the same clinical encounter captured in Workflow A. Abridge produces both clinician notes and patient-friendly after-visit summaries (AVS), supporting 28+ languages and multiple reading levels.\n\n## Prerequisites\n\n- Completed `abridge-core-workflow-a` (encounter-to-note pipeline)\n- Patient portal integration configured (Epic MyChart, Athena Patient Portal)\n- Understanding of health literacy requirements\n\n## Instructions\n\n### Step 1: Request Patient Summary ",
  "cost": {
    "context_tokens": 1847
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-abridge-core-8ab3ba/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.