You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run a claims file that is only outpatient data (all inpatient = FALSE), or an inpatient without a discharge date the script produces this error:
Traceback (most recent call last):
File "run_cv19index.py", line 6, in<module>cv19index.predict.main()
File "c:\Users\chris-pickering\Documents\Projects\cv19index\cv19index\cv19index\predict.py", line 445, in main
do_run_claims(args.demographics_file, args.claims_file, args.output_file, args.model, args.as_of_date, args.feature_file)
File "c:\Users\chris-pickering\Documents\Projects\cv19index\cv19index\cv19index\predict.py", line 416, in do_run_claims
input_df = preprocess_xgboost(claim_df, demo_df, asOfDate)
File "c:\Users\chris-pickering\Documents\Projects\cv19index\cv19index\cv19index\preprocess.py", line 79, in preprocess_xgboost
inpatient_days = pd.Series((inpatient_rows['dischargeDate'].dt.date - inpatient_rows['admitDate'].dt.date).dt.days, index=claim_df['personId']) File "C:\Users\chris-pickering\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\generic.py", line 4372, in __getattr__ return object.__getattribute__(self, name) File "C:\Users\chris-pickering\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\accessor.py", line 133, in __get__ accessor_obj = self._accessor(obj) File "C:\Users\chris-pickering\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\indexes\accessors.py", line 325, in __new__ raise AttributeError("Can only use .dt accessor with datetimelike "AttributeError: Can only use .dt accessor with datetimelike values
To resolve, I changed on claim to be inpatient=TRUE and added a discharge date of today.
Can we update the script for this scenario?
Thanks!
Christopher
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the script!
When I run a claims file that is only outpatient data (all inpatient = FALSE), or an inpatient without a discharge date the script produces this error:
To resolve, I changed on claim to be inpatient=TRUE and added a discharge date of today.
Can we update the script for this scenario?
Thanks!
Christopher
The text was updated successfully, but these errors were encountered: