LTHTR-DST / hdruk_avoidable_admissions

HDRUK Data Science Collaboration on Avoidable Admissions in the NHS.
https://lthtr-dst.github.io/hdruk_avoidable_admissions/
MIT License
6 stars 5 forks source link

Suggest change visit_id int64 validation to str for AdmittedCareEpisodeSchema #28

Closed georgm8 closed 1 year ago

georgm8 commented 1 year ago

We are currently hashing our visit_id (as well as patient_id) rendering this into a string and therefore failing the validation check as an integer is expected.

Would it be possible to change the schema accordingly to allow or this column to be hashed?

vvcb commented 1 year ago

Visit_id is a unique row identifier which can be set to the dataframe index (int) and does not need hashing.

visit_id = df.reset_index(drop=True).index

georgm8 commented 1 year ago

Agree this would be ok if the visit_id isn't required to link to any other datasets. Is the visit_id intended to link the Emergency Care to the Admitted Care table?

vvcb commented 1 year ago

That is a good point. But, to my knowledge these have been requested as separate unlinked datasets and the analysis plan does not appear to suggest linked analysis.

Please use the workaround as above for now and I will incorporate this change in the next release.

Will be good to future proof this.