Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Update regex for opertn and opdate
Browse files Browse the repository at this point in the history
Add `$` to `opertn_NN` and `opdate_NN` regex to avoid conflicts with any future derived columns based on these that may have similar names.
  • Loading branch information
vvcb authored Feb 27, 2023
1 parent 1ca7ea9 commit d1642a7
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 @@ -126,12 +126,12 @@ class Config:
# Modified from https://medium.com/@manabu.torii/regex-pattern-for-icd-10-cm-codes-5763bd66e26d and includes string match for 'nan'
checks=pa.Check.str_matches(r'^(?i:[A-Z][0-9][0-9AB](?:[0-9A-KXZ](?:[0-9A-EXYZ](?:[0-9A-HX][0-59A-HJKMNP-S]?)?)?)?|^\bnan\b$)$')
),
"opertn_[0-9]{2}": pa.Column(
"opertn_[0-9]{2}$": pa.Column(
str,
nullable=True,
regex=True,
),
"opdate_[0-9]{2}": pa.Column(
"opdate_[0-9]{2}$": pa.Column(
datetime,
nullable=True,
regex=True,
Expand Down

0 comments on commit d1642a7

Please sign in to comment.