Xpersona
C

Clinical Doc Assistant

CLAWHUB · Unverified

Use this skill when a clinician, practice manager, or healthcare developer needs to draft, structure, or retrieve clinical documentation — including SOAP not...

62
Rank
84
Safety
977
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 977 downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1701rtpn3c1z5nppqjqt8tkm583vx8j:clinical-doc-assistant
  1. Install using `clawhub skill install s1701rtpn3c1z5nppqjqt8tkm583vx8j:clinical-doc-assistant` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/optimusprime19/clinical-doc-assistant before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-optimusprime19-clinical-doc-assistant/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

112,711 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: clinical-doc-assistant
version: "1.0.4"
description: "Use this skill when a clinician, practice manager, or healthcare developer needs to draft, structure, or retrieve clinical documentation — including SOAP notes, referral letters, prior authorization forms, discharge summaries, and care plan narratives. Connects to FHIR R4-compliant APIs (Epic, Cerner, Azure Health Data Services, HAPI FHIR) to pull structured patient data and generate documentation drafts. Also supports manual input when no EHR connection is available. DO NOT use for direct diagnosis, prescribing decisions, or any task requiring a licensed clinical judgment — this skill assists with documentation only."
tags: ["healthcare", "fhir", "clinical", "ehr", "documentation", "soap", "prior-auth", "referral", "discharge"]
author: "optimusprime19"
license: "MIT"
homepage: https://github.com/optimusprime19/clinical-doc-assistant
repository: https://github.com/optimusprime19/clinical-doc-assistant
requiredEnv:
  - FHIR_BASE_URL        # e.g. https://your-ehr.example.com/fhir/R4 (not needed if FHIR_SANDBOX_MODE=true)
  - FHIR_CLIENT_ID       # OAuth2 client ID from your EHR app registration
  - FHIR_CLIENT_SECRET   # OAuth2 client secret
  - FHIR_TOKEN_URL       # Token endpoint for SMART on FHIR auth
optionalEnv:
  - FHIR_TENANT_ID       # Required for Azure Health Data Services only
  - FHIR_SANDBOX_MODE    # Set to "true" to use public HAPI sandbox — no credentials needed
  - CLINICAL_DOC_API_URL # Hosted backend URL for credit-based generation (see backend.py)
  - CLINICAL_DOC_API_KEY # API key for the hosted backend
  - ANTHROPIC_API_KEY    # Required server-side if you self-host backend.py. When the hosted backend is used, patient_context is forwarded to Anthropic's API to generate documents. Do NOT use with real PHI unless you have a BAA with Anthropic and your backend is deployed in a HIPAA-eligible environment.
---

# Clinical Documentation Assistant

## Overview

This skill enables an OpenClaw agent to connect to any FHIR R4-compliant EHR, retrieve structured patient data, and generate high-quality clinical documentation drafts. It covers the most time-consuming document types in outpatient and inpatient settings.

**Supported document types:**
- SOAP notes (Subjective / Objective / Assessment / Plan)
- Referral letters (specialist, imaging, therapy)
- Prior authorization requests (insurance)
- Discharge summaries
- Care plan narratives
- Patient-facing after-visit summaries

**Supported FHIR backends:**
- Epic (SMART on FHIR)
- Cerner (Millennium)
- Azure Health Data Services
- HAPI FHIR (public sandbox for testing)
- Any R4-compliant server

> ⚠️ **Clinical Disclaimer:** All output is a documentation *draft* intended to be reviewed, edited, and signed by a licensed clinician. This skill does not provide clinical advice, diagnoses, or prescriptions.

> 🔒 **Privacy / PHI Warning:** FHIR data is fetched into the agent's context for the session only and is not written to 

README.md

# clinical-doc-assistant

> **ClawHub Skill** — Clinical Documentation Assistant for OpenClaw  
> Generate SOAP notes, referrals, prior auths, discharge summaries, and after-visit summaries from FHIR R4 data.

---

## Files in This Package

| File | Purpose |
|------|---------|
| `SKILL.md` | The skill itself — publish this to ClawHub |
| `FHIR-REFERENCE.md` | Supporting reference for FHIR queries and EHR-specific notes |
| `backend.py` | FastAPI scaffold for the hosted credit-based backend |
| `README.md` | This file |

---

## Publishing to ClawHub

### 1. Install the ClawHub CLI
```bash
npm i -g clawhub
```

### 2. Log in with GitHub
```bash
clawhub login
```

### 3. Update SKILL.md author field
Edit `SKILL.md` and replace `your-clawhub-handle` with your actual handle.

### 4. Publish
```bash
clawhub publish ./clinical-doc-assistant
```

### 5. Verify
```bash
clawhub inspect your-handle/clinical-doc-assistant
```

---

## Monetization Setup

### Free Tier (Local Mode)
The skill works out of the box with FHIR sandbox — no backend needed.
This gets you installs and builds trust.

### Paid Tier (Hosted Backend)
1. Deploy `backend.py` to Render, Railway, or Fly.io
2. Add your `ANTHROPIC_API_KEY` as an env var on the server
3. Set up Supabase (free tier) for accounts + credit tracking
4. Integrate Stripe for credit purchases (uncomment the Stripe code in backend.py)
5. Update `CLINICAL_DOC_API_URL` in SKILL.md to point to your deployed backend

### Suggested Credit Pricing
| Package | Credits | Price | Per-doc cost |
|---------|---------|-------|-------------|
| Starter | 10 | $9 | $0.90 |
| Pro | 50 | $39 | $0.78 |
| Team | 200 | $129 | $0.65 |

At $0.78/doc and 100 users generating 10 docs/month = **$780 MRR from one skill.**

---

## Recommended Launch Sequence

1. **Day 1** — Publish to ClawHub with sandbox mode working perfectly
2. **Day 2** — Post in OpenClaw Discord `#skills` channel + Reddit r/OpenClaw
3. **Day 3** — Tweet/post on X with a demo video (screen record a SOAP note being generated)
4. **Week 2** — Deploy hosted backend, announce paid tier to early installers
5. **Month 2** — Publish Skill #2 (Drug Interaction Checker) and cross-link both skills

---

## HIPAA Note

This skill is a documentation *drafting* tool. For production use with real PHI:
- Deploy the backend on HIPAA-eligible infrastructure (AWS, Azure, GCP)
- Sign a BAA with your cloud provider
- Do not log PHI in your backend — audit IDs only
- Review with your organization's compliance team

---

## License

MIT — fork, modify, and build on this freely.

_meta.json

{
  "ownerId": "kn75pk01d69eyfmka42f0vc8n583vfpg",
  "slug": "clinical-doc-assistant",
  "version": "1.0.4",
  "publishedAt": 1774828020371
}

FHIR-REFERENCE.md

# FHIR R4 Reference — Clinical Documentation Assistant

This reference covers FHIR resource mappings, query patterns, and data extraction logic used by the skill. Read this if you're customizing the skill, debugging data retrieval, or integrating with a non-standard FHIR server.

---

## Resource Mapping by Document Type

| Document Type       | FHIR Resources Used                                              |
|---------------------|------------------------------------------------------------------|
| SOAP Note           | Patient, Condition, MedicationRequest, Observation, Encounter    |
| Referral Letter     | Patient, Condition, MedicationRequest, Observation, Practitioner |
| Prior Auth          | Patient, Condition, MedicationRequest, Observation, Coverage     |
| Discharge Summary   | Patient, Condition, Procedure, MedicationRequest, Encounter      |
| After-Visit Summary | Patient, Condition, MedicationRequest, Appointment              |

---

## Key FHIR Query Patterns

### Active conditions with ICD-10 codes
```
GET /Condition?patient={id}&clinical-status=active&_include=Condition:asserter
```
Extract: `code.coding[system="http://hl7.org/fhir/sid/icd-10-cm"].code`

### Current medications
```
GET /MedicationRequest?patient={id}&status=active&_include=MedicationRequest:medication
```
Extract: `medicationCodeableConcept.text` or `medicationReference`

### Vital signs (last 10)
```
GET /Observation?patient={id}&category=vital-signs&_sort=-date&_count=10
```
LOINC codes for common vitals:
- BP systolic: `8480-6`
- BP diastolic: `8462-4`
- Heart rate: `8867-4`
- Weight: `29463-7`
- BMI: `39156-5`
- O2 sat: `2708-6`

### HbA1c
```
GET /Observation?patient={id}&code=4548-4&_sort=-date&_count=3
```
LOINC: `4548-4` (Hemoglobin A1c/Hemoglobin.total in Blood)

### Basic metabolic panel
```
GET /Observation?patient={id}&code=24323-8&_sort=-date&_count=1
```

### Insurance/coverage (for prior auth)
```
GET /Coverage?patient={id}&status=active
```
Extract: `payor[0].display`, `subscriberId`, `class[type=plan].value`

---

## ICD-10 to Clinical Text Mapping

The skill maps common ICD-10 codes to plain-English descriptions for patient-facing documents:

| ICD-10  | Description                          |
|---------|--------------------------------------|
| E11.9   | Type 2 Diabetes Mellitus             |
| I10     | Essential (primary) hypertension     |
| E78.5   | Hyperlipidemia, unspecified          |
| N18.2   | Chronic kidney disease, stage 2      |
| J44.1   | COPD with acute exacerbation         |
| F32.1   | Major depressive disorder, moderate  |
| M54.5   | Low back pain                        |
| Z79.4   | Long-term use of insulin             |

For codes not in the local map, the skill falls back to `Condition.code.text` from the FHIR response.

---

## SMART on FHIR Token Flow

```
1. Agent reads FHIR_TOKEN_URL, FHIR_CLIENT_ID, FHIR_CLIENT_SECRET
2. POST to token URL:
   grant_type=client_credentials
   client_id={FHIR_CLIENT_ID}
   client_s

skill-card.md

## Description:

Clinical Doc Assistant helps clinicians, practice managers, and healthcare developers draft clinical documentation from FHIR R4 data or manual patient context, including SOAP notes, referrals, prior authorizations, discharge summaries, and care-plan narratives; it is not for diagnosis, prescribing, or unsupervised clinical judgment.

This skill is ready for commercial/non-commercial use.

## Publisher:

[optimusprime19](https://clawhub.ai/user/optimusprime19)

### License/Terms of Use:

MIT-0

## Use Case:

Clinicians, practice managers, and healthcare developers use this skill to retrieve relevant FHIR R4 data or enter patient context manually, then produce reviewable documentation drafts for common clinical workflows. Generated text requires licensed clinician review before use.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Patient data or PHI may be sent to external services when hosted generation is used.

Mitigation: Use synthetic sandbox data unless compliant infrastructure and BAAs are verified for every service that can receive PHI; minimize or redact patient data before LLM calls.

Risk: The hosted backend scaffold is not production-ready for healthcare use.

Mitigation: Before deployment, replace test-key authentication, persist credit accounting, restrict CORS, add rate limits, and complete compliance review.

Risk: Generated clinical documentation may be incomplete, inaccurate, or misleading if used without review.

Mitigation: Require licensed clinician review, editing, and signature before any generated draft is used in patient care or records.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/optimusprime19/skills/clinical-doc-assistant)
- [Publisher profile](https://clawhub.ai/user/optimusprime19)
- [Project homepage](https://github.com/optimusprime19/clinical-doc-assistant)
- [FHIR R4 Reference](FHIR-REFERENCE.md)
- [HAPI FHIR R4 sandbox](https://hapi.fhir.org/baseR4)
- [Epic FHIR developer portal](https://fhir.epic.com)
- [Cerner developer portal](https://code.cerner.com)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, guidance]

**Output Format:** [Markdown or plain text clinical documentation drafts with optional setup commands and configuration guidance]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Drafts may include missing-data placeholders and must be reviewed, edited, and signed by a licensed clinician before use.]

## Skill Version(s):

1.0.4 (source: server release evidence and SKILL.md frontmatter)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Clinical Doc Assistant and adjacent AI workflows.