-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpatient_chart_summary_configuration.py
40 lines (31 loc) · 1.16 KB
/
patient_chart_summary_configuration.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from enum import Enum
from typing import Any
from pydantic import Field
from canvas_sdk.effects.base import EffectType, _BaseEffect
class PatientChartSummaryConfiguration(_BaseEffect):
"""
An Effect that will decide which sections appear on the patient's chart summary in Canvas.
"""
class Meta:
effect_type = EffectType.SHOW_PATIENT_CHART_SUMMARY_SECTIONS
class Section(Enum):
SOCIAL_DETERMINANTS = "social_determinants"
GOALS = "goals"
CONDITIONS = "conditions"
MEDICATIONS = "medications"
ALLERGIES = "allergies"
CARE_TEAMS = "care_teams"
VITALS = "vitals"
IMMUNIZATIONS = "immunizations"
SURGICAL_HISTORY = "surgical_history"
FAMILY_HISTORY = "family_history"
CODING_GAPS = "coding_gaps"
sections: list[Section] = Field(min_length=1)
@property
def values(self) -> dict[str, Any]:
"""The PatientChartSummaryConfiguration's values."""
return {"sections": [s.value for s in self.sections]}
@property
def effect_payload(self) -> dict[str, Any]:
"""The payload of the effect."""
return {"data": self.values}