BookmarkSubscribeRSS Feed
abqdiane
Obsidian | Level 7

Hi,

Does anyone know how to import an 834 file, the format used by employers to communicate their employees' health insurance data,  into SAS? Below is a screenshot form an example:

INS*Y*18*030*XN*A*E**FT~
REF*OF*152239999~
REF*1L*Blue~
DTP*336*D8*20070101~
NM1*IL*1*BLUTH*LUCILLE****34*152239999~
N3*224 N DES PLAINES*6TH FLOOR~
N4*CHICAGO*IL*60661*USA~
DMG*D8*19720121*F*M~
HD*030**VIS**EMP~
DTP*348*D8*20111016~
INS*N*19*030*XN*A*E***N*N~
REF*OF*152239999~
REF*1L*Blue~
DTP*357*D8*20111015~
NM1*IL*1*BLUTH*BUSTER~
N3*224 N DES PLAINES*6TH FLOOR~
N4*CHICAGO*IL*60661*USA~
DMG*D**19911015*M-HD*030**VIS~
DTP*348*D8*20110101~
DTP*349*D8*20111015~

 

Here is a crosswalk of some of the codes:

INS*YMember Level Detail
REF*OFSubscriber Number
REF*1LGroup Sub-location Division (GSD)
DTP*336Hire date
NMIEmployee Name
N3Employee Street Address
N4Employee City, State, Zip, Country
DMGMember Demographics
HDCoverage Data
DTP*348Coverage Dates
DTP*349Coverage End Date
INS*NDependent

 

Does anyone have any suggestions?

thanks,

Diane

 

 

 

8 REPLIES 8
jimbarbour
Meteorite | Level 14

An 834 transaction is a specialized X12 format for EDI.  Usually, specialized translation software is used.  I'll Google it, but I don't know if SAS offers this type of translation.  

 

Jim

jimbarbour
Meteorite | Level 14

I turned up the below.  I see that he mentions third party software.

jimbarbour_0-1623703433784.png

 

Jim

 

jimbarbour
Meteorite | Level 14

Here's a paper that discusses SAS and the 837 transaction.  Perhaps you could do something similar for the 834, but as I mentioned usually specialized software is employed to do this.

 

https://support.sas.com/resources/papers/proceedings13/300-2013.pdf

 

Google some more, but my quick Googling didn't turn up anything that would indicate that SAS has a package to do this.

 

Jim

abqdiane
Obsidian | Level 7

Thanks for checking.  I was hoping that someone had written code for it. It's worth asking.

I'll take a look at the paper.  

Diane

Reeza
Super User

Very rough idea of how you can get started - my coding for this kind of stuff is getting too rusty.

 

data have;
infile cards DSD dlm="*";
input one $ two$ @@;

if one="INS" and two = "Y" then do;
input @1 var1 $ VAR2 $ VAR3 $ (VAR4-VAR9) ($)
     / (var10-vAR12) ($)  
     / (var13-var15) ($)
     / (var16-vAR19) ($)
    /  (var20-VAR29) ($); 

end;
ELSE IF ONE = "INS" & TWO = "N" THEN DO;
input @1 var1 $ VAR2 $ VAR3 $ (VAR4-VAR10) ($)
     / (var10-vAR12) ($)  
     / (var13-var15) ($)
     / (var16-vAR19) ($)
    /  (var20-VAR25) ($); 
END;
cards;
INS*Y*18*030*XN*A*E**FT~
REF*OF*152239999~
REF*1L*Blue~
DTP*336*D8*20070101~
NM1*IL*1*BLUTH*LUCILLE****34*152239999~
;;;;
run;

proc print data=have;run;
abqdiane
Obsidian | Level 7
Wow - this is great.
thanks,
Diane
Reeza
Super User
Is it coming across as text or XML? As shown it's pretty trivial to parse it using a simple data step but I'm also guessing it gets more complicated, ie mulitple dependents and such. And this is just the registration files or do you also need to deal with claims files?
abqdiane
Obsidian | Level 7

Hi,

Yes, there can be multiple dependents and a spouse or not. Sometimes there's a SSN and sometimes not.

My goal is to compare what is in the weekly 834 and a report from the enrollment system. Sadly, the 834 enrollment file is manually entered so we want to check the data entry.  This is only for the enrollment file.

thanks for responding.

Diane

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1967 views
  • 8 likes
  • 3 in conversation