Skip to content

Commit

Permalink
feat: add UpdateDiagnosis command SDK definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jamagalhaes committed Sep 27, 2024
1 parent ad56f11 commit f751d07
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
4 changes: 2 additions & 2 deletions canvas_generated/messages/effects_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions canvas_generated/messages/effects_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ class EffectType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
DELETE_VITALS_COMMAND: _ClassVar[EffectType]
COMMIT_VITALS_COMMAND: _ClassVar[EffectType]
ENTER_IN_ERROR_VITALS_COMMAND: _ClassVar[EffectType]
ORIGINATE_UPDATE_DIAGNOSIS_COMMAND: _ClassVar[EffectType]
EDIT_UPDATE_DIAGNOSIS_COMMAND: _ClassVar[EffectType]
DELETE_UPDATE_DIAGNOSIS_COMMAND: _ClassVar[EffectType]
COMMIT_UPDATE_DIAGNOSIS_COMMAND: _ClassVar[EffectType]
ENTER_IN_ERROR_UPDATE_DIAGNOSIS_COMMAND: _ClassVar[EffectType]
ANNOTATE_PATIENT_CHART_CONDITION_RESULTS: _ClassVar[EffectType]
ANNOTATE_CLAIM_CONDITION_RESULTS: _ClassVar[EffectType]
UNKNOWN_EFFECT: EffectType
Expand Down Expand Up @@ -247,6 +252,11 @@ EDIT_VITALS_COMMAND: EffectType
DELETE_VITALS_COMMAND: EffectType
COMMIT_VITALS_COMMAND: EffectType
ENTER_IN_ERROR_VITALS_COMMAND: EffectType
ORIGINATE_UPDATE_DIAGNOSIS_COMMAND: EffectType
EDIT_UPDATE_DIAGNOSIS_COMMAND: EffectType
DELETE_UPDATE_DIAGNOSIS_COMMAND: EffectType
COMMIT_UPDATE_DIAGNOSIS_COMMAND: EffectType
ENTER_IN_ERROR_UPDATE_DIAGNOSIS_COMMAND: EffectType
ANNOTATE_PATIENT_CHART_CONDITION_RESULTS: EffectType
ANNOTATE_CLAIM_CONDITION_RESULTS: EffectType

Expand Down
2 changes: 2 additions & 0 deletions canvas_sdk/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from canvas_sdk.commands.commands.remove_allergy import RemoveAllergyCommand
from canvas_sdk.commands.commands.stop_medication import StopMedicationCommand
from canvas_sdk.commands.commands.task import TaskCommand
from canvas_sdk.commands.commands.update_diagnosis import UpdateDiagnosisCommand
from canvas_sdk.commands.commands.update_goal import UpdateGoalCommand
from canvas_sdk.commands.commands.vitals import VitalsCommand

Expand All @@ -42,6 +43,7 @@
"RemoveAllergyCommand",
"StopMedicationCommand",
"TaskCommand",
"UpdateDiagnosisCommand",
"UpdateGoalCommand",
"VitalsCommand",
)
27 changes: 27 additions & 0 deletions canvas_sdk/commands/commands/update_diagnosis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from canvas_sdk.commands.base import _BaseCommand as BaseCommand


class UpdateDiagnosisCommand(BaseCommand):
"""A class for managing an Update Diagnosis command within a specific note."""

class Meta:
key = "updateDiagnosis"
commit_required_fields = (
"condition_code",
"new_condition_code",
)

condition_code: str | None = None
new_condition_code: str | None = None
background: str | None = None
narrative: str | None = None

@property
def values(self) -> dict:
"""The Update Diagnosis command's field values."""
return {
"condition_code": self.condition_code,
"new_condition_code": self.new_condition_code,
"background": self.background,
"narrative": self.narrative,
}
6 changes: 6 additions & 0 deletions protobufs/canvas_generated/messages/effects.proto
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ enum EffectType {
COMMIT_VITALS_COMMAND = 121;
ENTER_IN_ERROR_VITALS_COMMAND = 122;

ORIGINATE_UPDATE_DIAGNOSIS_COMMAND = 123;
EDIT_UPDATE_DIAGNOSIS_COMMAND = 124;
DELETE_UPDATE_DIAGNOSIS_COMMAND = 125;
COMMIT_UPDATE_DIAGNOSIS_COMMAND = 126;
ENTER_IN_ERROR_UPDATE_DIAGNOSIS_COMMAND = 127;

ANNOTATE_PATIENT_CHART_CONDITION_RESULTS = 200;

ANNOTATE_CLAIM_CONDITION_RESULTS = 300;
Expand Down

0 comments on commit f751d07

Please sign in to comment.