Workflows fire from platform events: appointment created, encounter signed off, lab
result received, claim denied, patient registered, referral ordered. Each workflow
definition is a chain of typed steps — GenerateDocument,
CreateTask, SendNotification, CheckCondition,
WaitForEvent, HumanGate — that execute in order with
configurable branching on failure. Practices customize trigger conditions and step
configurations without code. A single trigger can spawn parallel sub-chains
(e.g., an encounter sign-off fires both the billing chain and the patient
communication chain simultaneously).
Document Generation & Workflows
Every clinical and administrative event that should produce a document or trigger a follow-up chain is modeled as a workflow. When an appointment is created, a patient onboarded, or a claim denied, a chain of connected steps fires automatically: documents generate from AI-populated templates, human gates ensure clinical sign-off, tasks route to the right staff, and notifications go out to patients. The result: no document is forgotten, no follow-up falls through the cracks, and every output traces back to the event that caused it.
Document templates are AI-generated and human-gated. The platform drafts each document from chart data in under 30 seconds, then routes it to the appropriate role for review and sign-off before finalization. Templates are versioned, org-customizable, and delivered via portal, fax, Direct message, print, or email.
Key Capabilities
Twenty-two template types ship out of the box, covering clinical, administrative, financial, and patient communication documents. AI populates merge fields from chart data — demographics, diagnoses, medications, lab values, encounter notes — and generates a draft in under 30 seconds. Every document passes through a human gate: the appropriate role (provider for clinical docs, biller for financial docs, front desk for administrative) reviews and signs off before the document is finalized and delivered. Templates are versioned independently from workflows so a template update does not require a workflow redeploy.
| Category | Templates | Sign-off Role |
|---|---|---|
| Clinical | After-Visit Summary, Progress Note, Referral Letter, Clinical Summary (C-CDA), Discharge Summary, Prior Auth Letter, Return-to-Work Clearance | Provider (MD/DO/PA/NP) |
| Administrative | HIPAA Notice, Treatment Consent, Telehealth Consent, CCM/RPM Consent, FMLA Certification, Disability Certification, Records Release Authorization | Front Desk / MA |
| Financial | Patient Statement, Good Faith Estimate, Superbill, Appeal Letter, Corrected Claim Cover | RCM / Biller |
| Communication | Recall Reminder, Abnormal Results Letter, Welcome Letter | Nurse / Provider |
Twelve end-to-end workflow scenarios are pre-configured for common primary care events. Each scenario defines the trigger, every step in the chain, the documents generated, the human gates required, and the expected completion time. Select a scenario below to see the full workflow pipeline.
Real-time visibility into every running workflow: which step is current, which gate is waiting for sign-off, which steps completed or failed. Staff see their pending gates in the unified task queue alongside denial follow-ups and co-sign requests. A workflow that stalls at a human gate for longer than the configured timeout escalates automatically — first to the assignee's supervisor, then to a practice-wide alert.
Documents deliver via patient portal, secure fax, Direct messaging (for C-CDA exchange), print queue, or email (encrypted link). The delivery method is configured per template and overridable per instance. Delivery confirmation is tracked: portal-viewed timestamp, fax confirmation code, Direct message acknowledgment, print pickup flag. Failed deliveries auto-retry with channel fallback (e.g., fax failure falls back to portal + SMS notification).
Every template version is a separate artifact with its own merge-field set, body, and
output format. Practices clone system defaults and customize headers, logos, verbiage,
and merge fields. Version history is auditable: who changed what, when, and why.
Rollback is one click — the previous version becomes current, and any in-flight
documents already generated from the new version are flagged for re-review. Templates
follow the IC versioning scheme: break.feature.bug.buildtimestamp.
Metrics on workflow completion rates, average time-to-completion, most common failure points, document sign-off latency, and delivery success rates. The dashboard identifies bottlenecks — for example, "FMLA certifications average 4.2 days to sign-off; assign to PA/NP for faster turnaround" or "Prior auth appeal letters have a 12% failure rate at the payer submission step; review fax delivery logs." Drill down by workflow type, persona, time range, or patient cohort.
Persona Connections
- Doctor — Reviews and signs clinical documents (referral letters, FMLA certifications, care plans, discharge summaries). Approves human gates on clinical workflows. Sees pending sign-offs in the task queue prioritized by urgency.
- MA — Manages intake workflows and consent form collection. Prepares pre-visit documents (intake questionnaires, medication reconciliation forms). Routes completed intake packets to the provider.
- Nurse — Handles care plan documents, CCM enrollment forms, patient education materials, and care transition summaries. Monitors chronic care workflows and flags overdue check-ins.
- Reception — Manages new patient onboarding workflows, consent collection, welcome packets, and appointment confirmation documents. Generates Good Faith Estimates for self-pay patients at booking.
- RCM — Manages financial documents: appeal letters, claim forms, patient statements, superbills. Approves financial document gates. Monitors the denial-and-appeal workflow end-to-end.
- Patient — Views documents via the portal: after-visit summaries, lab results letters, statements, consent forms. Signs digital consent forms. Downloads or prints any document in their history.
Technical Highlights
Seven noun-apps compose the document and workflow surface on the IC platform:
DocumentTemplate, DocumentTemplateVersion, GeneratedDocument, WorkflowDefinition,
WorkflowStep, WorkflowInstance, and WorkflowStepExecution. Every entity is
org-scoped, carrying OrganizationID as the Cosmos
partition key and the full four-field audit trail
(LastUpdatedDateTimeUtc, LastUpdatedByUserID,
IsSoftDeletedBool, CreatedDateTimeUtc). Relationships
are enforced by API, not FK constraints, following IC hard rule #14.
Data Model
- DocumentTemplate — org-scoped template definition.
Fields:
DocumentTemplateName200,DocumentTemplateCategoryString50(Clinical, Administrative, Financial, Communication),DocumentTemplateTypeString50(AVS, ReferralLetter, AppealLetter, etc.),DocumentTemplateBodyHtml(Handlebars template with merge fields),IsActiveBool,IsSystemDefaultBool,DocumentTemplateRequiresSignOffBool,DocumentTemplateSignOffRoleLevelInt. - DocumentTemplateVersion — versioned template body, separate
artifact from the template definition per IC rule DEC-005. Each version carries its
own
DocumentTemplateVersionBodyHtmlandDocumentTemplateVersionMergeFieldsJson.IsCurrentVersionBoolmarks the active version. - GeneratedDocument — a rendered document instance. References
DocumentTemplate, Patient, Encounter (optional), and WorkflowInstance (optional).
Status lifecycle: Draft → PendingReview → Approved → Signed → Delivered.
Tracks
IsAiGeneratedBool,IsHumanReviewedBool,GeneratedDocumentDeliveryMethodString20(Portal, Fax, DirectMessage, Print, Email), and delivery confirmation timestamps. - WorkflowDefinition — a workflow blueprint.
WorkflowDefinitionTriggerTypeString50maps to platform events (AppointmentCreated, EncounterSignedOff, LabResultReceived, DenialPosted, etc.).WorkflowDefinitionTriggerConditionJsonholds structured conditions (visit type, payer, diagnosis code). Versioned independently. - WorkflowStep — an ordered step within a definition.
WorkflowStepTypeString50enum: GenerateDocument, CreateTask, SendNotification, CheckCondition, WaitForEvent, HumanGate, ApiCall.WorkflowStepConfigJsonholds type-specific configuration (template ID, task type, condition logic, notification channel).IsRequiredBoolcontrols whether failure blocks downstream steps. - WorkflowInstance — a running workflow. References WorkflowDefinition, Patient, Encounter (optional), Appointment (optional). Status lifecycle: Pending → Running → WaitingOnGate → Completed | Failed | TimedOut | Cancelled. Tracks current step ordinal and trigger context.
- WorkflowStepExecution — execution record for a single step
within a workflow instance. Status: Pending → Running → Completed |
Failed | Skipped | TimedOut.
WorkflowStepExecutionOutputJsoncaptures generated document IDs, task IDs, or notification receipts.
API Surface
Documents map to FHIR R4 DocumentReference resources at the platform's standard FHIR API surface. Workflow trigger events are published to an internal event bus; external integrations subscribe via webhooks with HMAC-SHA256 signing. The template rendering engine accepts Handlebars syntax with a curated set of helpers (date formatting, medication list rendering, diagnosis grouping). AI draft generation uses the platform's ambient-AI pipeline with the same provenance chain as Clinical Documentation — every merge-field value traces to a source fact in the patient record.
Cross-Module Dependencies
- Scheduling — Appointment events trigger onboarding, AWV prep, and post-visit billing workflows.
- Clinical Documentation — Encounter sign-off triggers billing, communication, and referral workflows; encounter data populates AVS, progress notes, and discharge summaries.
- RCM — Claim submission and denial events trigger billing and appeal workflows; superbills and statements reference RCM entities.
- Labs / Imaging — Result events trigger follow-up workflows and populate results letters.
- Referrals — Referral orders trigger the referral workflow chain; referral letters and clinical summaries are generated as documents.
- Task Management — Workflow steps of type CreateTask and HumanGate insert tasks into the unified task queue.
Phase Roadmap
- 10 core document templates (AVS, Referral Letter, Patient Statement, Consent forms, Superbill, Welcome Letter, Recall Reminder, Prior Auth Letter, Good Faith Estimate, Progress Note)
- Manual "Generate Document" action from encounter, patient, or appointment context
- Human sign-off gate with role-based routing
- PDF output with practice logo/header customization
- Portal delivery only (no fax or Direct messaging yet)
- Template editor with merge-field preview
- Event-driven workflow engine with all trigger types
- All 22 document templates with AI draft generation
- 12 pre-built primary care workflow scenarios
- Human gates with timeout escalation
- Multi-channel delivery (portal, fax, Direct, print, email)
- Template versioning with rollback
- Workflow instance tracker with real-time status
- Workflow analytics dashboard
- FHIR DocumentReference export
- AI template optimization: learns from provider edits to reduce manual corrections over time
- Cross-org template marketplace: practices share and import template customizations
- Predictive workflow suggestions: platform recommends workflow definitions based on practice patterns
- Natural language workflow builder: describe a workflow in plain English, platform generates the definition
- Bulk document generation for population health campaigns
Success Metrics
| Metric | Target | Why It Matters |
|---|---|---|
| Document generation time (trigger to draft) | ≤ 30 seconds | Staff should not wait for AI to produce a draft; near-instant keeps workflows moving. |
| Human gate sign-off latency, p95 | ≤ 4 hours | Prevents downstream delays in billing, referrals, and patient communication. |
| Workflow completion rate | ≥ 95% | No dropped chains; every trigger reaches its terminal step or is explicitly cancelled. |
| Template accuracy (no manual edits needed) | ≥ 80% | AI quality measure; high accuracy reduces provider burden and sign-off latency. |
| Document delivery confirmation rate | ≥ 98% | Patients and recipients actually received the document; failed deliveries are caught and retried. |
| Appeal letter generation time | ≤ 3 minutes | Down from 20 minutes manual; denial-code-specific rationale auto-populated from chart. |