Skip to content

Add medication-followup-protocol plugin - #441

Open
milosdjakovic-vicert wants to merge 2 commits into
Medical-Software-Foundation:mainfrom
vicert-healthcare:vicert/medication-followup-protocol
Open

Add medication-followup-protocol plugin#441
milosdjakovic-vicert wants to merge 2 commits into
Medical-Software-Foundation:mainfrom
vicert-healthcare:vicert/medication-followup-protocol

Conversation

@milosdjakovic-vicert

Copy link
Copy Markdown
Contributor

A practice defines a medication class as a list of timed steps. A provider enrols a patient onto one from the note, and a daily scheduled walk runs whatever is due.

What it adds

  • A configuration page in the left sidebar, where a practice builds its medication classes and the steps inside them.
  • A control in the note header that enrols a patient onto a class in one action, shown only when a committed prescription on that note matches a configured class.
  • An all programs control on the patient chart opening a read only pane, one section per enrolment, showing every step, its due date and its status.
  • A questionnaire offered in the patient portal when a questionnaire step is live.
  • A text only chart banner while an enrolment is running.

Coverage

Coverage is a classification path from the FDB catalogue rather than a product identifier. Picking a medication group stores the whole path, so one entry covers every strength and form of a drug without anybody picking them one at a time.

Steps

A step is a day offset, one of three kinds, its content, and optionally a condition. The kinds are a message to the patient, a questionnaire in the portal, and a task for a team or a named person. The one condition is whether the recheck appointment is still unbooked, and it is evaluated on the morning the step is due rather than remembered from when the programme started.

Tests

269 tests pass. Every one carries, verbatim, the acceptance criterion identifier or the scenario title it covers, so one grep over tests/ produces the whole mapping between the behaviour contract and the code.

Custom data namespace is vicert__medication_followup_protocol, matching the convention already used by salesforce-to-canvas-integration.

@milosdjakovic-vicert
milosdjakovic-vicert force-pushed the vicert/medication-followup-protocol branch from 88e8f1e to 6772ac9 Compare August 31, 2026 08:31
A practice defines a medication class as a list of timed steps. A provider enrols a
patient onto one from the note, and a daily scheduled walk runs whatever is due.

Coverage is a classification path from the FDB catalogue rather than a product
identifier, so one entry covers every strength and form of a drug without anybody
picking them one at a time. The enrolment control appears in the note header only
when a committed prescription on that note matches a configured class, so it is
absent on the notes it has nothing to offer.

A step is a day offset, one of three kinds, its content, and optionally a condition.
The kinds are a message to the patient, a questionnaire in the portal, and a task for
a team or a named person. The one condition is whether the recheck appointment is
still unbooked, evaluated on the morning the step is due rather than remembered from
when the programme started.

MIT, matching the rest of the repository, declared in the manifest and in pyproject
rather than only in the LICENSE file. Vicert is named as the developer, since Canvas
Medical holds the copyright and is the party releasing it.

269 tests, each naming the acceptance criterion or scenario it covers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146jL4PrwZ8ZVfUFBp1wi7Q
@milosdjakovic-vicert
milosdjakovic-vicert force-pushed the vicert/medication-followup-protocol branch from 6772ac9 to 9eb4ced Compare August 31, 2026 14:48
One follow ups pane for both scopes, the chart control and the note control
open the same page, the chart one grouping program cards under each note with
a link that scrolls the chart to it, the note one filtering to that note. The
program dropdown is gone, every matched program is its own card with status
badges, and starting a program late opens a catch up dialog with checkboxes
for the steps already due. Programs are created deactivated and cannot be
activated until they carry at least one step, enforced on the server and
reflected by the Activate and Deactivate controls. Starting or stopping a
program refreshes the chart controls live. The coverage search now matches
group names as well as drug names, so typing statins finds the Statins group
the way typing atorvastatin always did, with the classification path shown as
context on a row found by name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant