From 0bf38ccd33c1bfdad6918cafb79bf3bb55ac99d7 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Mon, 3 May 2021 14:39:14 -0500 Subject: [PATCH] bugfix: date pasing --- healthcareio/x12/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/healthcareio/x12/__init__.py b/healthcareio/x12/__init__.py index ae57724..e64a3f7 100644 --- a/healthcareio/x12/__init__.py +++ b/healthcareio/x12/__init__.py @@ -286,7 +286,7 @@ class Parser (Process): value = row[index] if 'cast' in config and key in config['cast'] and value.strip() != '' : - if config['cast'][key] in ['float','int'] : + if config['cast'][key] in ['float','int'] and (value.replace.isnumeric() or (len(value.split('.')) == 1) and value.replace('.','').isnumeric() ): value = eval(config['cast'][key])(value) elif hasattr(handler,config['cast'][key]):