Skip to content

Commit

Permalink
Merge 8885793 into 4cdae4b
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Dec 21, 2022
2 parents 4cdae4b + 8885793 commit b941431
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/dischargesummary/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ def load_dischargesummaries(patient):
v = timezone.make_aware(v)
except AttributeError:
# Only some of the "DateTime" fields are typed as such
v = datetime.datetime.strptime(v, '%d/%m/%Y %H:%M:%S')
try:
v = datetime.datetime.strptime(v, '%d/%m/%Y %H:%M:%S')
except ValueError:
# LAST_UPDATED is sometimes stored in a different format
# e.g. Sep 20 2021 12:55PM
v = datetime.datetime.strptime(v, '%b %d %Y %I:%M%p')
v = timezone.make_aware(v)

parsed[DischargeSummary.UPSTREAM_FIELDS_TO_MODEL_FIELDS[k]] = v
Expand Down

0 comments on commit b941431

Please sign in to comment.