feat: patient group data model, events, and effects#1544
Open
feat: patient group data model, events, and effects#1544
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1544 +/- ##
==========================================
+ Coverage 93.61% 93.63% +0.01%
==========================================
Files 491 494 +3
Lines 22019 22084 +65
Branches 1020 1020
==========================================
+ Hits 20613 20678 +65
Misses 1253 1253
Partials 153 153
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e18754c to
904f88d
Compare
^ Conflicts: ^ canvas_generated/messages/effects_pb2.py ^ canvas_generated/messages/effects_pb2.pyi ^ plugin_runner/allowed-module-imports.json ^ protobufs/canvas_generated/messages/effects.proto
f6c11a1 to
c85f40b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Internal tracking: KOALA-3047
This pull request introduces support for patient groups and their memberships in the SDK and underlying protocol buffers. The main changes add new effect and event types for managing patient group membership, implement corresponding SDK classes and database models, and update module import permissions for plugins.
Patient Group Effects and Events:
ENSURE_PATIENT_IN_GROUPandENSURE_PATIENT_NOT_IN_GROUPto theEffectTypeenum in both the protocol buffer definitions (effects.proto) and the generated Python stubs (effects_pb2.pyi). These effects allow idempotent management of a patient's membership in a group. [1] [2] [3]PATIENT_GROUP_CREATED,PATIENT_GROUP_UPDATED,PATIENT_GROUP_MEMBERSHIP_CREATED,PATIENT_GROUP_MEMBERSHIP_DELETED) to theEventTypeenum in both the protocol buffer definitions (events.proto) and the generated Python stubs (events_pb2.pyi). [1] [2] [3]SDK Implementation:
EnsurePatientInGroupandEnsurePatientNotInGroupincanvas_sdk/effects/patient_group.pyto provide a Python interface for the new effect types.PatientGroupandPatientGroupMembershipincanvas_sdk/v1/data/patient_group.pyto represent patient groups and their memberships in the database. Updated the SDK data module exports and initialization to include these models. [1] [2] [3]Plugin Module Import Permissions:
plugin_runner/allowed-module-imports.jsonto allow plugins to import the new patient group effect classes and data models. [1] [2] [3]