Skip to content

Commit

Permalink
Adds now property to __init__ method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwils committed Nov 19, 2024
1 parent db2c249 commit 73cdf00
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions canvas_sdk/protocols/clinical_quality_measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Meta:

def __init__(self, *args: Any, **kwargs: Any):
self._patient_id: str | None = None
self.now = arrow.utcnow()
super().__init__(*args, **kwargs)

@classmethod
Expand Down Expand Up @@ -62,11 +63,6 @@ def timeframe(self) -> Timeframe:
end = self.now
return Timeframe(start=end.shift(years=-1), end=end)

@property
def now(self) -> arrow.Arrow:
"""A convenience method for returning the current datetime."""
return arrow.utcnow()

# TODO: This approach should be considered against the alternative of just including the patient
# ID in the event context, given that so many events will be patient-centric.
def patient_id_from_target(self) -> str:
Expand Down

0 comments on commit 73cdf00

Please sign in to comment.