From 52fc7e4b0f713f7979f8aca527ef63dad6d678ae Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Mon, 18 Jan 2021 13:34:39 -0600 Subject: [PATCH] bug fix: procedure code default parsing --- healthcareio/x12/__init__.py | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/healthcareio/x12/__init__.py b/healthcareio/x12/__init__.py index 4009c14..ea32026 100644 --- a/healthcareio/x12/__init__.py +++ b/healthcareio/x12/__init__.py @@ -159,10 +159,12 @@ class Formatters : def procedure(self,value): - for xchar in [':','<'] : + for xchar in [':','<','|'] : if xchar in value and len(value.split(xchar)) > 1 : #_value = {"type":value.split(':')[0].strip(),"code":value.split(':')[1].strip()} _value = {"type":value.split(xchar)[0].strip(),"code":value.split(xchar)[1].strip()} + if value.split(xchar) >= 3 : + _value['modifier'] = value.split(xchar)[2] break else: _value = str(value) diff --git a/setup.py b/setup.py index 292e8d4..8497166 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ import sys def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() args = { - "name":"healthcareio","version":"1.5.1", + "name":"healthcareio","version":"1.5.2", "author":"Vanderbilt University Medical Center", "author_email":"steve.l.nyemba@vumc.org", "include_package_data":True,