-
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.
Create more commands: Assess, Diagnose, Goal, HPI, MedicationStatement
Create more commands: Assess, Diagnose, Goal, HPI, MedicationStatement and also clean up tests
- Loading branch information
Showing
10 changed files
with
532 additions
and
139 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
from canvas_sdk.commands.plan.plan import PlanCommand | ||
from canvas_sdk.commands.assess import AssessCommand | ||
from canvas_sdk.commands.diagnose import DiagnoseCommand | ||
from canvas_sdk.commands.goal import GoalCommand | ||
from canvas_sdk.commands.history_present_illness import HistoryOfPresentIllnessCommand | ||
from canvas_sdk.commands.medication_statement import MedicationStatementCommand | ||
from canvas_sdk.commands.plan import PlanCommand | ||
|
||
__all__ = ("PlanCommand",) | ||
__all__ = ( | ||
"PlanCommand", | ||
"AssessCommand", | ||
"DiagnoseCommand", | ||
"GoalCommand", | ||
"HistoryOfPresentIllnessCommand", | ||
"MedicationStatementCommand", | ||
) |
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 enum import Enum | ||
|
||
from canvas_sdk.commands.base import _BaseCommand | ||
|
||
|
||
class AssessCommand(_BaseCommand): | ||
"""A class for managing an Assess command within a specific note.""" | ||
|
||
class Status(Enum): | ||
IMPROVED = "improved" | ||
STABLE = "stable" | ||
DETERIORATED = "deteriorated" | ||
|
||
# how do we make sure that condition_id is a valid condition for the patient? | ||
condition_id: int | ||
background: str | None = None | ||
status: Status | None = None | ||
narrative: str | None = None | ||
|
||
@property | ||
def values(self) -> dict: | ||
"""The Assess command's field values.""" | ||
return { | ||
"condition_id": self.condition_id, | ||
"background": self.background, | ||
"status": self.status.value if self.status else None, | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from datetime import datetime | ||
|
||
from canvas_sdk.commands.base import _BaseCommand | ||
|
||
|
||
class DiagnoseCommand(_BaseCommand): | ||
"""A class for managing a Diagnose command within a specific note.""" | ||
|
||
# how do we make sure icd10_code is a valid code? | ||
icd10_code: str | ||
background: str | None = None | ||
approximate_date_of_onset: datetime | None = None | ||
today_assessment: str | None = None | ||
|
||
@property | ||
def values(self) -> dict: | ||
"""The Diagnose command's field values.""" | ||
return { | ||
"icd10_code": self.icd10_code, | ||
"background": self.background, | ||
"approximate_date_of_onset": ( | ||
self.approximate_date_of_onset.isoformat() | ||
if self.approximate_date_of_onset | ||
else None | ||
), | ||
"today_assessment": self.today_assessment, | ||
} |
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,47 @@ | ||
from datetime import datetime | ||
from enum import Enum | ||
|
||
from canvas_sdk.commands.base import _BaseCommand | ||
|
||
|
||
class GoalCommand(_BaseCommand): | ||
"""A class for managing a Goal command within a specific note.""" | ||
|
||
class Priority(Enum): | ||
HIGH = "high-priority" | ||
MEDIUM = "medium-priority" | ||
LOW = "low-priority" | ||
|
||
class AchievementStatus(Enum): | ||
IN_PROGRESS = "in-progress" | ||
IMPROVING = "improving" | ||
WORSENING = "worsening" | ||
NO_CHANGE = "no-change" | ||
ACHIEVED = "achieved" | ||
SUSTAINING = "sustaining" | ||
NOT_ACHIEVED = "not-achieved" | ||
NO_PROGRESS = "no-progress" | ||
NOT_ATTAINABLE = "not-attainable" | ||
|
||
goal_statement: str | ||
start_date: datetime | None = None | ||
due_date: datetime | None = None | ||
today_assessment: str | None = None | ||
achievement_status: AchievementStatus | None = None | ||
priority: Priority | None = None | ||
progress: str | None = None | ||
|
||
@property | ||
def values(self) -> dict: | ||
"""The Goal command's field values.""" | ||
return { | ||
"goal_statement": self.goal_statement, | ||
"start_date": (self.start_date.isoformat() if self.start_date else None), | ||
"due_date": (self.start_date.isoformat() if self.start_date else None), | ||
"today_assessment": self.today_assessment, | ||
"achievement_status": ( | ||
self.achievement_status.value if self.achievement_status else None | ||
), | ||
"priority": (self.priority.value if self.priority else None), | ||
"progress": self.progress, | ||
} |
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,12 @@ | ||
from canvas_sdk.commands.base import _BaseCommand | ||
|
||
|
||
class HistoryOfPresentIllnessCommand(_BaseCommand): | ||
"""A class for managing a HPI command within a specific note.""" | ||
|
||
narrative: str | ||
|
||
@property | ||
def values(self) -> dict: | ||
"""The HPI command's field values.""" | ||
return {"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from canvas_sdk.commands.base import _BaseCommand | ||
|
||
|
||
class MedicationStatementCommand(_BaseCommand): | ||
"""A class for managing a MedicationStatement command within a specific note.""" | ||
|
||
fdb_code: str | ||
sig: str | None = None | ||
|
||
@property | ||
def values(self) -> dict: | ||
"""The MedicationStatement command's field values.""" | ||
return {"fdb_code": self.fdb_code, "sig": self.sig} |
File renamed without changes.
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.