edi-835-parser icon indicating copy to clipboard operation
edi-835-parser copied to clipboard

Assertion Error when Trying to transform to Pandas

Open javigoncompte opened this issue 3 years ago • 4 comments

~/miniconda3/envs/835_parser/lib/python3.9/site-packages/edi_835_parser/transaction_set/transaction_set.py in to_dataframe(self) 45 datum = TransactionSet.serialize_service( 46 self.financial_information, ---> 47 self.payer, 48 claim, 49 service

~/miniconda3/envs/835_parser/lib/python3.9/site-packages/edi_835_parser/transaction_set/transaction_set.py in payer(self) 34 def payer(self) -> OrganizationLoop: 35 payer = [o for o in self.organizations if o.organization.type == 'payer'] ---> 36 assert len(payer) == 1 37 return payer[0] 38

AssertionError:

javigoncompte avatar Jun 18 '21 16:06 javigoncompte

@javigoncompte, thank you for your interest in this library. I should find time to take a look at this issue over the weekend.

keironstoddart avatar Jun 18 '21 16:06 keironstoddart

i think it happens when the 835 has the same payer but multiple payer segments for multiple claims

javigoncompte avatar Jun 18 '21 20:06 javigoncompte

Look into 'joined' 835s.

keironstoddart avatar Sep 01 '21 16:09 keironstoddart

Hello,

I am running to the same issue here. What I noticed is that the 835 files for my clearinghouse comes most of the time with different payer name for each claim. it doesn't mean it is an entire different payer but just a different plan. is it possible to make this loop through payer and as it does for patient name if applicable. Thank you

Abdelzero avatar Nov 13 '22 07:11 Abdelzero