Document Derive
Purpose
Produce the downstream documents that follow the signed note, as cited drafts for clinician signature.
When to use
After note-context, for an encounter whose signed note indicates a referral, AVS or care-plan update - triggered by
"draft the referral letter", "write the after-visit summary", "AVS for this visit", "update the care plan". Also
when the request mixes drafting with sending ("draft it and fax it"): draft, and decline the send.
When NOT to Use
- Formatting, letterhead or Word/PDF production of an existing document - use the built-in docx skill instead.
- Coding evidence - use coding-rationale instead.
- Quality-measure status - use quality-gap-check instead.
- A clinician-to-clinician handoff - use handoff-draft instead.
Inputs
note_signature (signed must be true); encounter; note_facts with citations from note-context, including
referral_indicated, active_medications, patient_instructions and follow_up_plan, each with its
statements[] (one cited entry per documented medication, instruction or follow-up statement).
Steps
- Confirm
note_signature.signed is true; if not, write halt{halted: "unsigned_note"} and escalate - never
draft from an unsigned note (clinical-doc-rules.md #5).
- If a note_fact needed for a sentence is missing from the contract - or one of
active_medications,
patient_instructions, follow_up_plan or a true referral_indicated has value: true but no statements[] -
run note-context for it first; never draft from the raw note directly and never draft the sentence without it.
- Draft only the artefacts the user asked for (all three only when asked to "run the downstream documents").
- Referral: check
referral_indicated. If false or absent, set referral_letter: null and
referral_decision = {drafted: false, reason, citation}, and say so. If true, draft the letter from cited
note_facts only - every statements[] entry of referral_indicated, active_medications and
follow_up_plan - attaching each supporting citation, and set referral_decision.drafted = true.
- After-visit summary: plain patient language, one sentence per cited
statements[] entry of
active_medications, patient_instructions and follow_up_plan - every entry, so no medication, instruction
or follow-up item is dropped - and no general teaching text, no reassurance the note does not contain. A symptom
the plan does not address is listed for clinician review, not explained to the patient.
- Care-plan update (if asked): cited to the note_facts and every relevant
statements[] entry, written to
care_plan_update.
- Write each artefact as
{"status": "draft", "action_level": "L1", "text": "<document>", "citations": [{source, locator, text}]} and hand back for clinician review before release. If asked to send, fax, file or
push to a portal, decline in one line.
Output Format
Contract JSON, sections: referral_letter (draft or null), referral_decision, after_visit_summary,
care_plan_update - each draft {status: "draft", action_level: "L1", text, citations[]} - plus a bullet list of
"for clinician review" items. Status is always "draft" - never "final", never "sent".
Example
"referral_letter": null,
"referral_decision": {"drafted": false, "reason": "The signed note indicates no referral this visit.",
"citation": {"source": "DocumentReference/NOTE-91004-20260911", "locator": "Plan, line 10", "text": "No referral indicated this visit."}}
Grounding requirements
Every derived document sentence traces to a note_facts entry - or one of its statements[] - and carries that
citation on the contract; every cited statement the document needs appears, none is silently dropped. Do
not fabricate, embellish or infer clinical content - no finding, diagnosis, result, instruction or reassurance that
is not in the signed note, even if the requester asserts it or it would make the letter read better. An uncited
sentence must be deleted, not softened.
Guardrails
Guardrails - all are hard stops:
- Never draft from an unsigned note.
- Never draft a referral not indicated by the note.
- Never add clinical content beyond what the note documents; never fabricate a finding, instruction or reassurance.
- Never mark output final, send, fax, file or push it to a portal - clinician signature is required
(clinical-doc-rules.md #3).
- Never restate a gap or unsupported finding as resolved in patient-facing text.
Error Handling
- If note_facts are missing entirely, run note-context; if that halts, report the halt and stop.
- If the note is ambiguous about a referral, ask the clinician rather than drafting one speculatively.
- If the encounter date is not the day the user called "today", name the note's date in the review list.
Escalation / uncertainty
If the note is unsigned, escalate to routees.unsigned_note in config/escalation-policy.json. A declined referral
or declined send is reported to the requester and listed for clinician review.
1---2name: document-derive3description: "Drafts the clinical artefacts that follow a signed note - referral letter, after-visit summary, care-plan update - each cited to the note and marked draft. It never sends, faxes or files, and if the note indicates no referral it says so instead of drafting one. Use when the user says \"draft the referral letter\", \"write the after-visit summary\", \"AVS for this visit\", \"send the patient home with instructions\" or \"update the care plan from today's note\". Do NOT use for Word/PDF formatting or letterhead on an existing document - use the built-in docx instead; do NOT use for coding evidence - use coding-rationale instead; do NOT use for a clinician-to-clinician handoff - use handoff-draft instead."4license: MIT5metadata:6 source: https://skillmd.com/skills/microsoft/document-derive7 version: 1.0.38 author: Microsoft Healthcare & Life Sciences Skills9 category: writing10 domain: Clinical Documentation11 action_level: L112 icon: DocumentArrowRight13---1415# Document Derive16## Purpose17Produce the downstream documents that follow the signed note, as cited drafts for clinician signature.18## When to use19After note-context, for an encounter whose signed note indicates a referral, AVS or care-plan update - triggered by20"draft the referral letter", "write the after-visit summary", "AVS for this visit", "update the care plan". Also21when the request mixes drafting with sending ("draft it and fax it"): draft, and decline the send.22## When NOT to Use23- Formatting, letterhead or Word/PDF production of an existing document - use the built-in docx skill instead.24- Coding evidence - use coding-rationale instead.25- Quality-measure status - use quality-gap-check instead.26- A clinician-to-clinician handoff - use handoff-draft instead.27## Inputs28note_signature (signed must be true); encounter; note_facts with citations from note-context, including29`referral_indicated`, `active_medications`, `patient_instructions` and `follow_up_plan`, each with its30`statements[]` (one cited entry per documented medication, instruction or follow-up statement).31## Steps321. Confirm `note_signature.signed` is true; if not, write `halt{halted: "unsigned_note"}` and escalate - never33 draft from an unsigned note (clinical-doc-rules.md #5).342. If a note_fact needed for a sentence is missing from the contract - or one of `active_medications`,35 `patient_instructions`, `follow_up_plan` or a true `referral_indicated` has `value: true` but no `statements[]` -36 run note-context for it first; never draft from the raw note directly and never draft the sentence without it.373. Draft only the artefacts the user asked for (all three only when asked to "run the downstream documents").384. Referral: check `referral_indicated`. If false or absent, set `referral_letter: null` and39 `referral_decision = {drafted: false, reason, citation}`, and say so. If true, draft the letter from cited40 note_facts only - every `statements[]` entry of `referral_indicated`, `active_medications` and41 `follow_up_plan` - attaching each supporting citation, and set `referral_decision.drafted = true`.425. After-visit summary: plain patient language, one sentence per cited `statements[]` entry of43 `active_medications`, `patient_instructions` and `follow_up_plan` - every entry, so no medication, instruction44 or follow-up item is dropped - and no general teaching text, no reassurance the note does not contain. A symptom45 the plan does not address is listed for clinician review, not explained to the patient.466. Care-plan update (if asked): cited to the note_facts and every relevant `statements[]` entry, written to47 `care_plan_update`.487. Write each artefact as `{"status": "draft", "action_level": "L1", "text": "<document>", "citations":49 [{source, locator, text}]}` and hand back for clinician review before release. If asked to send, fax, file or50 push to a portal, decline in one line.51## Output Format52Contract JSON, sections: `referral_letter` (draft or null), `referral_decision`, `after_visit_summary`,53`care_plan_update` - each draft `{status: "draft", action_level: "L1", text, citations[]}` - plus a bullet list of54"for clinician review" items. Status is always "draft" - never "final", never "sent".55## Example56```json57"referral_letter": null,58"referral_decision": {"drafted": false, "reason": "The signed note indicates no referral this visit.",59 "citation": {"source": "DocumentReference/NOTE-91004-20260911", "locator": "Plan, line 10", "text": "No referral indicated this visit."}}60```61## Grounding requirements62Every derived document sentence traces to a note_facts entry - or one of its `statements[]` - and carries that63citation on the contract; every cited statement the document needs appears, none is silently dropped. Do64not fabricate, embellish or infer clinical content - no finding, diagnosis, result, instruction or reassurance that65is not in the signed note, even if the requester asserts it or it would make the letter read better. An uncited66sentence must be deleted, not softened.67## Guardrails68Guardrails - all are hard stops:69- Never draft from an unsigned note.70- Never draft a referral not indicated by the note.71- Never add clinical content beyond what the note documents; never fabricate a finding, instruction or reassurance.72- Never mark output final, send, fax, file or push it to a portal - clinician signature is required73 (clinical-doc-rules.md #3).74- Never restate a gap or unsupported finding as resolved in patient-facing text.75## Error Handling76- If note_facts are missing entirely, run note-context; if that halts, report the halt and stop.77- If the note is ambiguous about a referral, ask the clinician rather than drafting one speculatively.78- If the encounter date is not the day the user called "today", name the note's date in the review list.79## Escalation / uncertainty80If the note is unsigned, escalate to routees.unsigned_note in config/escalation-policy.json. A declined referral81or declined send is reported to the requester and listed for clinician review.