-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: events and effects for patient portal intake forms (#277)
- Loading branch information
Showing
8 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from typing import Any | ||
|
||
from pydantic import Field | ||
|
||
from canvas_sdk.effects.base import EffectType, _BaseEffect | ||
|
||
|
||
class IntakeFormResults(_BaseEffect): | ||
"""An Effect that will decide which intake forms (questionnaires) appear on the patient portal.""" | ||
|
||
class Meta: | ||
effect_type = EffectType.PATIENT_PORTAL__INTAKE_FORM_RESULTS | ||
|
||
questionnaire_ids: list = Field(min_length=0) | ||
|
||
@property | ||
def values(self) -> dict[str, Any]: | ||
"""The IntakeFormResults's values.""" | ||
return {"questionnaire_ids": [str(q) for q in self.questionnaire_ids]} | ||
|
||
@property | ||
def effect_payload(self) -> dict[str, Any]: | ||
"""The payload of the effect.""" | ||
return {"data": self.values} |
This file contains 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
This file contains 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