Patient Chart Group

This effect allows developers to group items in a patient chart section. You can define multiple groups with a name, priority, and the items that belong to each group.

This is supported for the Conditions, Medications, and Detected Issues sections.

Build a PatientChartGroup with the groups to show, then return its apply() from your handler.

Methods #

apply() → Effect #

Groups the section’s items.

  • items is required.

Attributes #

AttributeTypeDescriptionRequired
itemsdict[str, Group]The groups, keyed by group name.Yes

Group #

AttributeTypeDescription
itemslistList of items for each group, for example conditions or medications.
priorityintThe group’s priority within the section.
namestrThe group label.

All three are required.

Example #

from canvas_sdk.effects.patient_chart_group import PatientChartGroup
from canvas_sdk.effects.group import Group

conditions = [{
    "id": 1,
    "codings": {
      "code": "111",
      "system": "ICD-10",
      "display": "Ophiasis",
    }
  }, {
    "id": 2,
    "codings": {
      "code": "112",
      "system": "ICD-10",
      "display": "Acute angle-closure glaucoma",
    }
}]

PatientChartGroup(items={
    "Psychiatry": Group(priority=100, items=conditions, name="Psychiatry"),
    "General": Group(priority=200, items=conditions, name="General"),
}).apply()