-
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: feat: add RemoveAllergy command SDK definition
- Loading branch information
1 parent
87f05cf
commit 40fa8d3
Showing
5 changed files
with
46 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,26 @@ | ||
from pydantic import Field | ||
|
||
from canvas_sdk.commands.base import _BaseCommand as BaseCommand | ||
|
||
|
||
class RemoveAllergyCommand(BaseCommand): | ||
"""A class for managing a Remove Allergy command within a specific note.""" | ||
|
||
class Meta: | ||
key = "removeAllergy" | ||
commit_required_fields = ("allergy_id",) | ||
|
||
allergy_id: str | None = Field( | ||
description="The external ID of the allergy to remove.", | ||
default=None, | ||
json_schema_extra={"commands_api_name": "allergy"}, | ||
) | ||
narrative: str | None = None | ||
|
||
@property | ||
def values(self) -> dict: | ||
"""The Remove Allergy command's field values.""" | ||
return { | ||
"allergy_id": self.allergy_id, | ||
"narrative": self.narrative, | ||
} |
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