-
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: added new CreateQuestionnaireResult effect type (#250)
Signed-off-by: Christopher Sande <christopher.sande@canvasmedical.com> Co-authored-by: Reba Magier <reba.magier@canvasmedical.com>
- Loading branch information
Showing
6 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,29 @@ | ||
from typing import Any | ||
|
||
from canvas_sdk.effects.base import EffectType, _BaseEffect | ||
|
||
|
||
class CreateQuestionnaireResult(_BaseEffect): | ||
"""CreateQuestionnaireResult effect.""" | ||
|
||
class Meta: | ||
effect_type = EffectType.CREATE_QUESTIONNAIRE_RESULT | ||
|
||
interview_id: str | None = None | ||
score: float | None = None | ||
abnormal: bool | None = None | ||
narrative: str | None = None | ||
code_system: str | None = None | ||
code: str | None = None | ||
|
||
@property | ||
def values(self) -> dict[str, Any]: | ||
"""Make the payload.""" | ||
return { | ||
"interview_id": self.interview_id, | ||
"score": self.score, | ||
"abnormal": self.abnormal or False, | ||
"narrative": self.narrative or "", | ||
"code_system": self.code_system, | ||
"code": self.code, | ||
} |
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
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