-
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: add PastSurgicalHistory command SDK definition
- Loading branch information
1 parent
40fa8d3
commit 332f898
Showing
5 changed files
with
48 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
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,28 @@ | ||
from datetime import date | ||
|
||
from pydantic import Field | ||
|
||
from canvas_sdk.commands.base import _BaseCommand as BaseCommand | ||
|
||
|
||
class PastSurgicalHistoryCommand(BaseCommand): | ||
"""A class for managing a Past Surgical History command within a specific note.""" | ||
|
||
class Meta: | ||
key = "surgicalHistory" | ||
commit_required_fields = ("past_surgical_history",) | ||
|
||
past_surgical_history: str | None = None | ||
approximate_date: date | None = None | ||
comment: str | None = Field(max_length=1000, default=None) | ||
|
||
@property | ||
def values(self) -> dict: | ||
"""The Past Surgical History command's field values.""" | ||
return { | ||
"past_surgical_history": self.past_surgical_history, | ||
"approximate_date": ( | ||
self.approximate_date.isoformat() if self.approximate_date else None | ||
), | ||
"comment": self.comment, | ||
} |
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