How to surface a visible High-Risk Medication indicator on the Patient Chart (Medications) via Canvas plugins
Context and Goal
I am trying to implement a clear, visible indicator for high-risk medications directly on the patient chart, ideally in or adjacent to the Medications section. The primary goal is to make high-risk medications immediately obvious to clinicians at the point of care.
At this stage, I am not attempting anything complex. I am deliberately starting with a minimal “proof-of-life” approach to confirm that Canvas supports rendering something visible that is driven by medication data.
My first priority is simply:
- When medications are present on a chart, surface some visible signal if one or more are considered high-risk.
Acceptable initial outcomes would include:
- A protocol card that reliably appears when medications are viewed (most ideal)
- A banner, warning, or indicator near the Medications section
- Any supported Canvas UI surface that renders in response to medication data
I am not yet concerned with persistence, scoring, clinical logic depth, or UX polish.
What I Have Done So Far
- Clean rebuild of the plugin from scratch
To eliminate any packaging or path issues, I completely deleted the plugin and rebuilt it from a clean directory.
Current structure:
C:\canvas_plugins\wovenly_high_risk_meds
CANVAS_MANIFEST.json
wovenly_high_risk_meds
init.py
protocols
init.py
high_risk_meds.py
All init.py files are present.
- Minimal, schema-valid CANVAS_MANIFEST.json
The manifest validates successfully once required fields (notably tags) are included.
{ "sdk_version": "0.7.0", "plugin_version": "0.1.0", "name": "wovenly_high_risk_meds", "description": "Wovenly high risk medication grouping and protocol surfacing.", "license": "Proprietary", "readme": false, "tags": { "patient_sourcing_and_intake": [], "interaction_modes_and_utilization": [], "diagnostic_range_and_inputs": [], "pricing_and_payments": [], "care_team_composition": [], "interventions_and_safety": [], "content": [] }, "components": { "protocols": [ { "class": "wovenly_high_risk_meds.protocols.high_risk_meds:Protocol", "description": "Proof of life on PATIENT_CHART__MEDICATIONS.", "data_access": { "event": "PATIENT_CHART__MEDICATIONS", "read": [], "write": [] } } ] } }
- Minimal protocol implementation (proof-of-life only)
The protocol is intentionally minimal. Its sole purpose is to confirm:
- The module imports correctly
- The protocol loads
- The protocol’s compute() method runs when expected
from future import annotations
import logging from typing import List
from canvas_sdk.effects.base import Effect from canvas_sdk.protocols.protocol import Protocol as BaseProtocol
logger = logging.getLogger(name)
class Protocol(BaseProtocol): def compute(self) -> List[Effect]: logger.info( "wovenly_high_risk_meds Protocol.compute ran for PATIENT_CHART__MEDICATIONS" ) return []
No UI effects are returned yet. I am only trying to confirm execution.
- Installation and enablement
I install and enable the plugin using:
canvas.exe install --host wovenly-dev C:\canvas_plugins\wovenly_high_risk_meds canvas.exe enable --host wovenly-dev wovenly_high_risk_meds
The plugin enables successfully.
Observed Behavior What works
- The plugin installs once the manifest schema issues are resolved
- The plugin enables successfully
- The plugin runner continues to operate normally
- Other existing plugins load and run without issue
What does not work
I repeatedly see module import errors in the plugin runner logs:
ModuleNotFoundError: Could not load module "wovenly_high_risk_meds.protocols.high_risk_meds"
When this occurs, the protocol never loads and compute() never runs
Even when install and enable succeed, I do not see log output from this protocol
Logs only show activity from unrelated protocols, for example:
lob_dates_metadata Protocol.compute() completed wovenly_partner_profile_field Protocol.compute() completed Responded to Event PATIENT_METADATA__GET_ADDITIONAL_FIELDS
I do not see any protocol card or UI element appear in the chart
I do not see evidence that PATIENT_CHART__MEDICATIONS is triggering my protocol
Current Bottlenecks
- Protocol module import reliability
Despite:
- Correct folder structure
- Correct manifest class path
- Clean rebuilds
The plugin runner intermittently fails to import the protocol module.
I am looking for clarification on:
- Whether protocol modules must follow a specific path pattern beyond what is documented
- Whether import paths are rewritten during packaging
- Whether Windows path behavior introduces known issues
- Event triggering expectations
I am unclear on how reliably PATIENT_CHART__MEDICATIONS fires.
Questions:
- Does this event fire on chart open, or only on create/update?
- Is there a more reliable event for surfacing medication-adjacent UI?
- Are there recommended alternatives for medication-driven rendering?
- Correct UI surface for medication indicators
This is the most important question.
I want to confirm:
- Whether Canvas supports visually annotating medications directly
- Whether protocol cards are the intended surface for this use case
- Whether a View or Application is more appropriate
- Whether there are examples of medication-based indicators implemented today
I am currently using protocols as the starting point, but I am not confident that this is the correct abstraction.
What I Am Asking For
- Confirmation of the recommended architecture for surfacing high-risk medication indicators
- Clarification on supported UI surfaces tied to medications
- Guidance on reliable event triggers for medication-driven UI
- Any example plugins or references that demonstrate this pattern
- Insight into common pitfalls around protocol imports and packaging
If there is a canonical approach that does not involve protocols, I would prefer to pivot now rather than continue building on the wrong abstraction.
Any guidance or examples would be greatly appreciated.