Skip to content

Commit

Permalink
Change visit_id dtype to str - fixes #28
Browse files Browse the repository at this point in the history
  • Loading branch information
vvcb committed Feb 9, 2023
1 parent 6d52046 commit fa62ffe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avoidable_admissions/data/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AdmittedCareEpisodeSchema(pa.SchemaModel):
# visit_id is not part of the data spec but is used here as a unique row identifier
# Use `df["visit_id"] = df.reset_index(drop=True).index`

visit_id: Series[np.int64] = pa.Field(nullable=False, unique=True)
visit_id: Series[str] = pa.Field(nullable=False, unique=True, coerce=True)

# Ensure this has been pseudonymised appropriately.
patient_id: Series[str] = pa.Field(nullable=False)
Expand Down Expand Up @@ -219,7 +219,7 @@ class Config:

class EmergencyCareEpisodeSchema(pa.SchemaModel):

visit_id: Series[np.int64] = pa.Field(nullable=False, unique=True)
visit_id: Series[str] = pa.Field(nullable=False, unique=True, coerce=True)

patient_id: Series[str] = pa.Field(nullable=False)

Expand Down

0 comments on commit fa62ffe

Please sign in to comment.