Skip to main content
Physicians spend a significant portion of their day on documentation — writing progress notes, discharge summaries, and referral letters. This administrative load contributes to burnout and takes time away from patient care. Clinical notes must be thorough, accurate, and compliant with coding requirements, which makes shortcuts risky. The challenge is reducing the effort without sacrificing quality. Wayak deploys an agent that drafts clinical documentation by pulling structured data from your EHR and referencing clinical practice guidelines stored in a knowledge space. The agent produces note drafts that clinicians review and finalize, cutting documentation time while maintaining clinical accuracy and coding compliance.

What you need

Data sources

  • EHR system — patient encounters, diagnoses, orders, lab results, vital signs, medications, and problem lists
  • Billing database — historical claim codes, reimbursement outcomes, and denial reasons

Knowledge spaces

  • Clinical practice guidelines — upload condition-specific guidelines (e.g., AHA for cardiovascular, ADA for diabetes) that inform documentation standards
  • Documentation templates — upload your organization’s note templates for progress notes, H&P, discharge summaries, and referral letters
Semantic layer: Define these in your ontology before setting up the agent.
ComponentNameDefinition
ObjectEncounterMaps to the encounters table in the EHR. Represents a single patient visit with diagnoses, orders, and notes
ObjectPatientMaps to patients in the EHR. Represents a patient with their complete medical record
MetricDocumentation Completion RatePercentage of encounters with finalized notes within 24 hours of the visit
MetricAverage Note TurnaroundMean elapsed hours from encounter close to note finalization
DimensionVisit TypeCategorizes encounters as office visit, inpatient, emergency, telehealth, or procedure
DimensionSpecialtyGroups encounters by clinical specialty (cardiology, orthopedics, primary care, etc.)
See building a semantic layer for a step-by-step guide.

Agent setup

1

Create the agent

Go to Agent SpaceNew agent.
FieldValue
NameClinical Documentation Assistant
RoleMedical Documentation Specialist
GoalDraft clinical notes from EHR encounter data and clinical guidelines, structured according to organizational templates, for physician review and finalization
2

Set the description

You are a clinical documentation specialist who drafts medical notes from structured EHR data. You follow organizational note templates and reference clinical practice guidelines to ensure completeness and accuracy. You use precise medical terminology, include all relevant clinical data points (vitals, labs, medications, assessments), and structure notes for downstream coding compliance. You always produce drafts — never final notes — and flag any data gaps that the clinician should address during review.
3

Scope data access

Grant access to:
  • EHR system (encounters, diagnoses, orders, labs, vitals, medications)
  • Billing database (claim codes, denial reasons)
  • Clinical practice guidelines knowledge space
  • Documentation templates knowledge space
  • Encounter and Patient objects, Documentation Completion Rate metric
4

Add skills

Trigger: User asks the agent to draft a progress note for a specific encounter.
  1. Retrieve the encounter record from the EHR, including chief complaint, vitals, active medications, and orders.
  2. Pull the patient’s problem list, recent lab results, and relevant prior encounters.
  3. Load the appropriate note template from the documentation templates knowledge space based on visit type.
  4. Reference clinical practice guidelines for the primary diagnosis to ensure documentation covers guideline-recommended elements.
  5. Draft the note following the SOAP structure (Subjective, Objective, Assessment, Plan) using data from the encounter.
  6. Flag any missing data points (e.g., vitals not recorded, labs pending) that the clinician should complete.
  7. Return the draft note with flagged items highlighted for review.
Trigger: User asks the agent to draft a discharge summary.
  1. Retrieve the full inpatient encounter from the EHR, including admission diagnosis, procedures performed, and daily progress.
  2. Pull the patient’s medication reconciliation, follow-up orders, and discharge instructions.
  3. Load the discharge summary template from the documentation templates knowledge space.
  4. Compile the hospital course narrative from daily progress entries.
  5. Include the discharge medication list, pending lab results, and follow-up appointment details.
  6. Return the draft discharge summary formatted for the receiving provider.
Trigger: User asks the agent to draft a referral letter to a specialist.
  1. Retrieve the referring encounter and the reason for referral from the EHR.
  2. Pull the patient’s relevant medical history, current medications, and recent diagnostics.
  3. Load the referral letter template from the documentation templates knowledge space.
  4. Include pertinent positive and negative findings related to the referral reason.
  5. Return the draft referral letter addressed to the receiving specialist with all supporting clinical data.

Automation

Playbook: End-of-day documentation reminder

1

Set the trigger

Set the trigger to Schedule — Daily at 6:00 PM to catch encounters with missing documentation before the end of the business day.
2

Build the workflow

The workflow identifies encounters with incomplete documentation and sends reminders:
  1. Query all encounters from the current day that do not have a finalized note in the EHR system.
  2. Loop — for each incomplete encounter, pull the encounter details and the assigned provider.
  3. Condition — check if a draft note already exists. If not, generate a draft using the encounter data and documentation template.
  4. Action — save the generated draft to the EHR system’s note queue for the provider.
  5. Delivery — notify providers of their outstanding documentation.
3

Configure delivery

  • Email — send each provider a list of their encounters pending documentation, with links to pre-populated drafts
  • Slack — post a department-level summary to #clinical-ops showing the count of incomplete notes by provider
4

Test and activate

Click Run now to test with live data, then toggle to Active.

What’s next

Medical coding review

Validate medical codes against clinical documentation to reduce claim denials.

All Healthcare use cases

See the full list.