Skip to content

Commit

Permalink
change datetime import to be compatible with other imports (#925)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Paseltiner <[email protected]>
  • Loading branch information
m-goggins and DanPaseltiner authored Nov 13, 2023
1 parent b75c258 commit 57ad212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phdi/linkage/seed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This script converts patient data from parquet to patient FHIR resources.
from typing import Dict, Tuple
import uuid
import datetime
from datetime import datetime


def extract_given_name(data: Dict):
Expand All @@ -27,7 +27,7 @@ def adjust_birthdate(data: Dict):
format = "%d%b%Y:00:00:00.000"
dob = data.get("birthdate", None)
if dob is not None and ":" in dob:
datetime_str = datetime.datetime.strptime(dob, format)
datetime_str = datetime.strptime(dob, format)
dob = datetime_str.strftime("%Y-%m-%d")
return dob

Expand Down

0 comments on commit 57ad212

Please sign in to comment.