Month: March 2018

Convert HIPAA 835 Electronic Remittance Advice to PDF

This blog post describes the mapping specifications and the conversion between a HIPAA 835 electronic remittance advice and a report form in PDF format.

This conversion is different from HIPAA 837 conversions because there is no corresponding standard form, such as CMS 1500 or UB04 that can be used in the mapping process. Instead, we followed the instructions from Medicare National Standard Intermediary Remittance Advice and developed a generic report form for remittance advice in PDF format, as shown below. This mapping is not meant to be final since users may want to customize the layout of the form. Regardless, this mapping specification can be served as a template for future customization. You can test the map by going to Redix HIPAA Compliance and Conversion Demo.

 

Mapping Specification

Below is a table to describe the mapping between HIPAA 835 and the above report file.

HIPAA 835 Electronic Remittance AdviceCMS Report
FPE2000 TS303, converted
PAIDBPR16, converted
CLM#calc: physical count of claims per ST (not reset outside of ST)
TOB2100 CLP08 + 09
Patient2100 NM103-05 (NM101="QC")
HIC2100 NM109
PAT STAT"01"
CLAIM STAT"1"
SVC FROM2100 DTP03 (DTP01="232"), converted
SVC THRU2100 DTP03 (DTP01="233"), converted
PCN2100 CLP01
MRNNot Mapped
ICN2100 CLP07
CHARGESNot Mapped
REPORTED2100 CLP03
NCVD/DENIED"0.00"
CLAIM ADS"0.00"
COVERED2100 AMT02 (AMT01="AU")
DAYS/VISITSNot Mapped
COST REPT"0"
COVD/UTIL"0"
NON-COVERED"0"
COVD VISITS"0"
NCOVVISITS"0"
PAYMENT DATANot Mapped
DRG AMOUNT"0.00"
DRG/OPER/CAP"0.00"
LINE ADJ AMT"0.00"
OUTLIER"0.00"
CAP OUTLIER"0.00"
CASH DEDUCTCAS03 (CAS01="PR", CAS02="1")
BLOOD DEDUCTCAS03 (CAS01="PR", CAS02="66")
COINSURANCECAS03 (CAS01="PR", CAS02="2")
PAT REFUND"0.00"
MSP LIAB MET"0.00"
REIM RATE2100 MOA01
MSP PRIM PAYER"0.00"
PROF COMPONENT"0.00"
ESRD AMOUNTCAS03 (CAS01="CO", CAS02="118")
PROC CD AMOUNT2100 MOA02
ALLOWED/REIM2100 CLP04
G/R AMOUNTCAS03 (CAS01="CO", CAS02="43")
INTERST2100 AMT02 (AMT01="I")
CONTRACTCAS03 (CAS01="CO", CAS02="A2")
PER DIM AMT2100 MOA01
NET REIM AMT2100 CLP04
REV2110 SVC04
DATE
HCPCS2110 SVC01:02
APC/HIPPS
MODS2110 SVC01:03
QTY2110 SVC05
CHARGES2110 SVC02
ALLOW/REIM2110 SVC03
GC2110 CAS01
RSN2110 CAS02
AMOUNT2110 CAS03
REMARK CODES2110 LQ02 (LQ01="HE"), Last occurrence
NOTES"REMARK CODES" code value is obtained from database "835Data"
REASON CODES2110 CAS01 (unique only)
DESCRIPTION"REMARK CODES" code value is obtained from the database "835Data"

Some of the notes about this conversion:

  • Only if the input file 835 is validated successfully, the file will be converted.
  • Each remittance advice will be generated in a separate PDF file.

Example

Below is an 835 example:

ISA*00*          *00*          *ZZ*123456789012345*ZZ*123456789012345*030101*1253*^*00501*987654321*1*T*:
GS*HP*123456789012345*123456789012345*19991231*0802*123456789*X*005010X221A1
ST*835*1234
BPR*C*150000*C*ACH*CTX*01*999999992*DA*123456*1512345678*123121234*01*999988880*DA*98765*20020913
TRN*1*12345*1512345678
DTM*405*20020916
N1*PR*INSURANCE COMPANY OF TIMBUCKTU
N3*1 MAIN STREET
N4*TIMBUCKTU*AK*89111
REF*2U*999
PER*BL*JOHN WAYNE*TE*8005551212*EX*123
N1*PE*REGIONAL HOPE HOSPITAL*XX*6543210903
N4*SEGMENT MISSING FROM IG*AK*89111
LX*110212
TS3*6543210903*11*20021231*1*211366.97********138018.4**73348.57
TS2*2178.45*1919.71**56.82*197.69*4.23
CLP*666123*1*211366.97*138018.4**MA*1999999444444*11*1
CAS*CO*45*73348.57
NM1*QC*1*JONES*SAM*O***HN*666666666A
MIA*0***138018.4
DTM*232*20020816
DTM*233*20020824
QTY*CA*8
LX*130212
TS3*6543210909*13*19961231*1*15000********11980.33**3019.67
CLP*777777*1*15000*11980.33**MB*1999999444445*13*1
CAS*CO*45*3019.67
NM1*QC*1*BORDER*LIZ*E***HN*996669999B
MOA***MA02
DTM*232*20020512
PLB*6543210903*20021231*CV:CP*-1.27
SE*30*1234
GE*1*123456789
IEA*1*987654321

About Us

Redix International, Inc. is an enterprise software company. Redix develops software and provides services to help organizations convert their proprietary or organization-specific data to standardized data. Among the standardized formats supported are X12, EDIFACT, XML, NSF, UB92, HIPAA, HL7, CDA, Blue-Ribbon, FHIR, NCPDP, and PDF.


Posted by admin in HIPAA

Convert HIPAA 837 Professional to CMS 1500 Form

This blog post describes the mapping specifications and the conversion between HIPAA 837 professional and CMS 1500 in PDF format.

This was another one of the 300+ pre-defined HIPAA maps that we have developed in the past. The user can integrate this map into their system with no further work. You can test the map by going to Redix HIPAA Compliance and Conversion Demo.

A blank CMS 1500 form looks like the following. 

Mapping Specification

The CMS 1500 form is using the box id to identify the meaning of each field. For example, a patient name is in box 2 and the patient address is in 5. The patient name in a HIPAA 837 professional is defined in 2010BA. Below is a table to describe the box id in the CMS 1500 form and its corresponding element in HIPAA 837 professional.

CMS 1500 Form Box IDHIPAA 837 Professional Corresponding Field(s)
1Checkbox Xwalked from 2000B SBR09
1a2010BA NM109
22010BA NM103-05 overwritten by 2010CA NM103-5 if exists
32010BA DMG02, 03 overwritten by 2010CA DMG02, 03 if exists
42010BA NM103-05
52010BA N3xx, N4xx overwritten by 2010CA N3xx, N4xx if exists
6Checkbox Xwalked from 2000B SBR02 | 2000C PAT01
72010BA N3xx, N4xx
8(Internally Used)
923230A NM103-05
9a2320 SBR03
9b(Internally Used)
9c(Internally Used)
9d2320 SBR04
10aCheckbox Xwalked from 2300 CLM11:01 | :02 | :03="EM"
10bCheckbox Xwalked from 2300 CLM11:01 | :02 | :03="AA"
10cCheckbox Xwalked from 2300 CLM11:01 | :02 | :03="OA"
10 (state)if 2300 CLM11:01 | :02 | :03="AA" then CLM11:04
112000B SBR03
11a2010BA DMG02, 03
11b2000x REF02 (REF01="Y4")
11c2000B SBR04
11dCheckbox Xwalked from 2310 Existence
12Signature Field (Not Mapped)
13Signature Field (Not Mapped)
142300 DTP01, 03 (DTP01="431" | "438")
152300 DTP01, 03 (DTP01="454" |"304" | "453" | "439" | "455" | "471" | "090" | "091" | "444")
162300 DTP03 (DTP01="360" & "361") concatenated
172310A, D NM101, 03-05
17a2310A REF01-02
17b2310A, D NM109
182300 DTP03 (DTP01="435" & "096") concatenated
19(reserved for proprietary usage)
202300 AMT02 (AMT01="NE"), Checkbox Xwalked from existence of 2310C
21"9" if HI01:01("BK") exists, else "0"
21A2300 HI01:02 (HI01:01="BK" | = "ABK")
21B2300 HI02:02 (HI01:02="BK" | = "ABK")
21C2300 HI03:02 (HI01:03="BK" | = "ABK")
21D2300 HI04:02 (HI01:04="BK" | = "ABK")
21E2300 HI05:02 (HI01:05="BK" | = "ABK")
21F2300 HI06:02 (HI01:06="BK" | = "ABK")
21G2300 HI07:02 (HI01:07="BK" | = "ABK")
21H2300 HI08:02 (HI01:08="BK" | = "ABK")
21I2300 HI09:02 (HI01:09="BK" | = "ABK")
21K2300 HI10:02 (HI01:10="BK" | = "ABK")
21L2300 HI11:02 (HI01:11="BK" | = "ABK")
222300 CLM05:03 when is "7" | "8", REF02 (REF01="F8")
232300 REF02 (REF01="G1")
24A2400 DTP03 (DTP01="472")
24B2400 SV105 | 2300 CLM05:01
24C2300 CLM05:03
24D2400 SV101:02-:06 concatenated
24E2400 SV107:01-:04 concatenated
24F2400 SV102
24G2400 SV104
24H"Y" if 2400 SV111 | SV112 are present
24I(Not mapped, currently assuming NPI is used in 'J')
24JNM109 (NM108="XX") (2010A is used, overwritten by 2310B if present, ultimately overwritten by 2420A if exists)
252010AA REF02 (REF01="EI" | "24") | NM109 (NM108<>"XX") | 2010AB NM109 (NM108<>"XX")
262300 CLM01
27Checkbox Xwalked from CLM07
282300 CLM02
29DNE
30(Internally Used)
31Signature Field (Not Mapped)
322310C NM103, N3xx, N4xx (If 2310 DNE then same contents from Box 33 are used)
32a2310C NM109 (If 2310 DNE then same contents from Box 33a are used)
32b(Not mapped, currently assuming NPI is used in 'A')
332010AA NM103, N3xx, N4xx, PER04,06,08 (qual = "TE")
33a2010AA NM109 (NM108="XX")
32b(Not mapped, currently assuming NPI is used in 'A')

Some of the notes about this conversion:

  • Validates the input file. Only the file 837 is validated, the file will be converted.
  • Generates PDF file for each claim.

Example

Below is an 837 professional example:

ISA*00*          *00*          *ZZ*123456789012345*ZZ*123456789012345*030101*1253*^*00501*987654321*1*T*:
GS*HC*123456789012345*123456789012345*19991231*0802*123456789*X*005010X222A1
ST*837*2021*005010X222A1
BHT*0019*00*0123*20051015*1023*CH
NM1*41*2*PREMIER BILLING SERVICE*****46*TGJ23
PER*IC*JERRY*TE*3055552222
NM1*40*2*XYZ REPRICER*****46*66783JJT
HL*1**20*1
NM1*85*1*KILDARE*BEN****XX*1234567893
N3*1234 SEAWAY ST
N4*MIAMI*FL*33111
REF*EI*123456789
PER*IC*CONNIE*TE*3055551234
NM1*87*2
N3*2345 OCEAN BLVD
N4*MIAMI*FL*33111
HL*2*1*22*1
SBR*P********CI
NM1*IL*1*SMITH*JANE****MI*111223333
DMG*D8*19430501*F
NM1*PR*2*KEY INSURANCE COMPANY*****PI*999996666
N3*3333OCEAN ST
N4*SOUTH MIAMI*FL*33000
REF*G2*PBS3334
HL*3*2*23*0
PAT*19
NM1*QC*1*SMITH*TED
N3*236 N MAIN ST
N4*MIAMI*FL*33413
DMG*D8*19730501*M
CLM*26407789*79.04***11:B:1*Y*A*Y*I*P
HI*BK:4779*BF:2724*BF:2780*BF:53081
NM1*82*1*KILDARE*BEN****XX*1234567893
PRV*PE*PXC*204C00000X
REF*G2*KA6663
NM1*77*2*KILDARE ASSOCIATES*****XX*1234567893
N3*2345 OCEAN BLVD
N4*MIAMI*FL*33111
SBR*S*01*******CI
OI***Y*P**Y
NM1*IL*1*SMITH*JACK****MI*T55TY666
N3*236 N MAIN ST
N4*MIAMI*FL*33111
NM1*PR*2*KEY INSURANCE COMPANY*****PI*999996666
LX*1
SV1*HC:99213*43*UN*1***1:2:3:4
DTP*472*D8*20051003
LX*2
SV1*HC:90782*15*UN*1***1:2
DTP*472*D8*20051003
LX*3
SV1*HC:J3301*21.04*UN*1***1:2
DTP*472*D8*20051003
SE*52*2021
GE*1*123456789
IEA*1*987654321

The generated PDF file is as follows.

About Us

Redix International, Inc. is an enterprise software company. Redix develops software and provides services to help organizations convert their proprietary or organization-specific data to standardized data. Among the standardized formats supported are X12, EDIFACT, XML, NSF, UB92, HIPAA, HL7, CDA, Blue-Ribbon, FHIR, NCPDP, and PDF.

Posted by admin in HIPAA

Convert HIPAA 837 Institutional to CMS 1450/UB04 Form

This blog post describes the mapping specifications and the conversion between HIPAA 837 institutional and CMS 1450 (also known as UB04) in PDF format.

We have been in the HIPAA compliance and conversion business for the past 18 years. Through the years, we have developed more than 300 pre-defined HIPAA maps that allow users to plug and play the maps into the users’ system with no further work. One of the pre-defined maps that we have done a while ago is the HIPAA 837 Institutional (5010_A2) to CMS 1450 form in PDF format.

You can test the map by going to Redix HIPAA Compliance and Conversion Demo.

A blank CMS 1450 or UB04 form looks like the following. 

Mapping Specification

The CMS 1450 form is using the box id to identify the meaning of each field. For example, a patient name is in box 8a and the patient address is in 9a. The patient name in a HIPAA 837 institutional is defined in 2010BA. Below is a table to describe the box id in the CMS 1450 form and its corresponding element in HIPAA 837 Institutional.

CMS 1450 Form Box IDHIPAA 837 Institutional Corresponding Field(s)
12010AA NM103, N3xx, N4xx, PER04,06,08 (when qualifier is "TE")
2NM103, N3xx, N4xx, NM108, NM109 from 2010AA. Overwritten by 2010AB when exists.
3a2300 CLM01 (not always PCN)
3b2300 REF02 (REF01="EA")
42300 CLM05:01 + :03
52010AA NM109 (NM108="24") | REF01 (REF02="EI")
62300 DTP03 (DTP01="434"), converted
7(Internally Used)
8a2010BA | overwritten by 2010CA NM109 | REF01-02
8b2010BA | overwritten by 2010CA NM103-05
9a2010BA | overwritten by 2010CA N3xx
9b2010BA | overwritten by 2010CA N401
9c2010BA | overwritten by 2010CA N402
9d2010BA | overwritten by 2010CA N403
9e2010BA | overwritten by 2010CA N404
102010BA | overwritten by 2010CA DMG02, converted
112010BA | overwritten by 2010CA DMG03
122300 DTP03 (DTP01="435"), split, converted
132300 DTP03 (DTP01="435"), split, converted
142300 CL101
152300 CL102
162300 DTP03 (DTP01="096"), converted
172300 CL103
182300 HI01:02 (HI01:01="BG")
192300 HI02:02 (HI01:01="BG")
202300 HI03:02 (HI01:01="BG")
212300 HI04:02 (HI01:01="BG")
222300 HI05:02 (HI01:01="BG")
232300 HI06:02 (HI01:01="BG")
242300 HI07:02 (HI01:01="BG")
252300 HI08:02 (HI01:01="BG")
262300 HI09:02 (HI01:01="BG")
272300 HI10:02 (HI01:01="BG")
282300 HI11:02 (HI01:01="BG")
292300 CLM11:04
30(Internally Used)
312300 HI01:02, :04, converted (HI01:01="BH")
322300 HI02:02, :04, converted (HI01:01="BH")
332300 HI03:02, :04, converted (HI01:01="BH")
342300 HI04:02, :04, converted (HI01:01="BH")
352300 HI02:02, :04, converted (HI01:01="BI")
362300 HI02:02, :04, converted (HI01:01="BI")
37(Internally Used)
382010BA NM103, NM104, N3xx, N4xx
39a2300 HI01:02, :05 (HI01:01="BE")
39b2300 HI04:02, :05 (HI01:01="BE")
39c2300 HI07:02, :05 (HI01:01="BE")
39d2300 HI10:02, :05 (HI01:01="BE")
40a2300 HI02:02, :05 (HI01:01="BE")
40b2300 HI05:02, :05 (HI01:01="BE")
40c2300 HI08:02, :05 (HI01:01="BE")
40d2300 HI11:02, :05 (HI01:01="BE")
41a2300 HI03:02, :05 (HI01:01="BE")
41b2300 HI06:02, :05 (HI01:01="BE")
41c2300 HI09:02, :05 (HI01:01="BE")
41d2300 HI12:02, :05 (HI01:01="BE")
42 (1-22)2400 SV201
43 (1-22)2400 SV202:02, xwalked from codef database
44 (1-22)2400 SV202:02,:03,:04,:05,:06 all concatenated
45 (1-22)2400 DTP03, converted (DTP01="R72")
46 (1-22)2400 SV205
47 (1-22)2400 SV203
48 (1-22)2400 SV207
49 (1-22)(internally used)
50aAll boxes 50-65 placed using qualifier SBR01
2010BB | 2330B NM103 (Payor roll is primary)
50b2010BB | 2330B NM103 (Payor roll is secondary)
50c2010BB | 2330B NM103 (Payor roll is tertiary)
51a2010BB | 2330B NM109 (Payor roll is primary)
51b2010BB | 2330B NM109 (Payor roll is secondary)
51c2010BB | 2330B NM109 (Payor roll is tertiary)
52a2300 CLM09 | 2330 OI06 (Payor roll is primary)
52b2300 CLM09 | 2330 OI06 (Payor roll is secondary)
52c2300 CLM09 | 2330 OI06 (Payor roll is tertiary)
53a2300 CLM08 | 2330 OI03 (Payor roll is primary)
53b2300 CLM08 | 2330 OI03 (Payor roll is secondary)
53c2300 CLM08 | 2330 OI03 (Payor roll is tertiary)
54a2300 AMT02 (AMT01="F5") | 2330 AMT02 (AMT01="D") (Payor roll is primary)
54b2300 AMT02 (AMT01="F5") | 2330 AMT02 (AMT01="D") (Payor roll is secondary)
54c2300 AMT02 (AMT01="F5") | 2330 AMT02 (AMT01="D") (Payor roll is tertiary)
55aDNE
55bDNE
55cDNE
562010BA | 2330A NM109 (NM109="XX")
57a2010BA | 2330A REF02 contatenating all (Payor roll is primary)
57b2010BA | 2330A REF02 contatenating all (Payor roll is secondary)
57b2010BA | 2330A REF02 contatenating all (Payor roll is tertiary)
58a2010BA | 2330A NM103-05 (Payor roll is primary)
58b2010BA | 2330A NM103-05 (Payor roll is secondary)
58c2010BA | 2330A NM103-05 (Payor roll is tertiary)
59a2000B | 2320 SBR02 (crosswalked) (Payor roll is primary)
59b2000B | 2320 SBR02 (crosswalked) (Payor roll is secondary)
59c2000B | 2320 SBR02 (crosswalked) (Payor roll is tertiary)
60a2010BA | 2330A NM109 (Payor roll is primary)
60b2010BA | 2330A NM109 (Payor roll is secondary)
60c2010BA | 2330A NM109 (Payor roll is teritary)
61a2000B | 2320 SBR04 (Payor roll is primary)
61b2000B | 2320 SBR04 (Payor roll is secondary)
61c2000B | 2320 SBR04 (Payor roll is tertiary)
62a2000B | 2320 SBR03 (Payor roll is primary)
62b2000B | 2320 SBR03 (Payor roll is secondary)
62c2000B | 2320 SBR03 (Payor roll is tertiary)
63a2300 | 2330B REF02 (REF01="G1") (Payor roll is primary)
63b2300 | 2330B REF02 (REF01="G1") (Payor roll is secondary)
63c2300 | 2330B REF02 (REF01="G1") (Payor roll is tertiary)
64a2300 | 2330B REF02 (REF01="F8") (Payor roll is primary)
64b2300 | 2330B REF02 (REF01="F8") (Payor roll is secondary)
64c2300 | 2330B REF02 (REF01="F8") (Payor roll is tertiary)
65aEmployer DNE in 837
65bEmployer DNE in 837
65cEmployer DNE in 837
66"9" or "0" based on ICD qualifier
672300 HI01:02 (HI01:01="BK" | "ABK")
67a2300 HI01:02 (HI01:01="BF" | "ABF")
67b2300 HI02:02 (HI02:01="BF" | "ABF")
67c2300 HI03:02 (HI03:01="BF" | "ABF")
67d2300 HI04:02 (HI04:01="BF" | "ABF")
67e2300 HI05:02 (HI05:01="BF" | "ABF")
67f2300 HI06:02 (HI06:01="BF" | "ABF")
67g2300 HI07:02 (HI07:01="BF" | "ABF")
67h2300 HI08:02 (HI08:01="BF" | "ABF")
67i2300 HI09:02 (HI09:01="BF" | "ABF")
67j2300 HI10:02 (HI10:01="BF" | "ABF")
67k2300 HI11:02 (HI11:01="BF" | "ABF")
67l2300 HI12:02 (HI12:01="BF" | "ABF")
67m2300 HI01:02 (second HI) (HI01:01="BF" | "ABF")
67n2300 HI02:02 (second HI) (HI02:01="BF" | "ABF")
67o2300 HI03:02 (second HI) (HI03:01="BF" | "ABF")
67p2300 HI04:02 (second HI) (HI04:01="BF" | "ABF")
67q2300 HI05:02 (second HI) (HI05:01="BF" | "ABF")
68(internally used)
692300 HI02:02 (HI02:01="BJ" | "ABJ")
70a2300 HI01:01 (HI01:01="PR" | "APR")
70b2300 HI02:01 (HI02:01="PR" | "APR")
70c2300 HI03:01 (HI03:01="PR" | "APR")
71DNE
72a2300 HI01:02 (HI01:01="BK" | "ABK")
73(internally used)
742300 HI01:02,:04, converted (HI01:01="BP"| "BR"| "ABR")
74a2300 HI01:02,:04, converted (HI qual="BO" | "BQ" | "BBQ")
74b2300 HI02:02,:04, converted (HI qual="BO" | "BQ" | "BBQ")
74c2300 HI03:02,:04, converted (HI qual="BO" | "BQ" | "BBQ")
74d2300 HI04:02,:04, converted (HI qual="BO" | "BQ" | "BBQ")
74e2300 HI05:02,:04, converted (HI qual="BO" | "BQ" | "BBQ")
75(internally used)
762310A NM109,08,03,04
772310B NM109,08,03,04
782310C NM109,08,03,04
79DNE
802300 NTE02
81(reserved for proprietary usage)
Other Locations on Form
Creation DateSystem Date
PageTotal Service Lines / 22, rounded up
Of (page)Current LX count mod 22 calculation
Total Covered ChargesSUM 2400 SV203
Total Non-Covered ChargesSUM 2400 SV207
Other Notes
"Payor Roll"A notion (via variable in the OFD) that defined if entity is in reference to Primary, Secondary or Tertiary payment roll. Used to determine if block of data is in reference to "submitting" insurance, or "other insurance".
End of Crosswalk

Notes

We have developed a conversion tool that will take an 837 institutional file and convert it to the UB04 form in PDF format. Some of the notes about this conversion:

  • The input file will be validated first. Only the file 837 is validated successfully; the 837 file will be converted.
  • Each claim will result in a separate CMS 1450 PDF file.

Example

Below is an 837 Institutional example:

ISA*00*          *01*SECRET    *ZZ*SUBMITTERS ID  *ZZ*RECEIVERS ID   *030101*1253*^*00501*000000905*1*T*:
GS*HC*SENDER CODE*RECEIVER CODE*19991231*0802*1*X*005010X223A2
ST*837*1024*005010X223A2
BHT*0019*00*1024*20050711*1335*CH
NM1*41*2*REGIONAL PPO NETWORK*****46*123456789
PER*IC*SUBMITTER CONTACT INFO*TE*8001231234
NM1*40*2*CONSERVATIVE INSURANCE*****46*000110002
HL*1**20*1
NM1*85*2*LOCAL HOSPITAL*****XX*1122334455
N3*3423 SMALL STREET
N4*COLUMBUS*OH*432150000
REF*EI*111002222
HL*2*1*22*0
SBR*P*18*34561W******CI
NM1*IL*1*SMITH*JAMES*A***MI*34902390F
N3*934 NORTH STREET
N4*COLUMBUS*OH*432150000
DMG*D8*19621015*M
NM1*PR*2*CONSERVATIVE INSURANCE*****PI*00123
CLM*W392-49141*14.84***13:A:1**A*Y*Y
DTP*434*RD8*20050617-20050617
DTP*435*DT*200506170800
CL1*1*1*01
AMT*F3*14.84
REF*9A*459804390823
REF*D9*32423466233
HI*BK:53081 
HCP*00*0**333001234*********T1
NM1*71*1*RIVERS*DAWN****XX*1234567893
REF*1G*A12345
LX*1
SV2*0301*HC:A9999*14.84*UN*1
DTP*472*D8*20050617
SE*32*1024
GE*1*1
IEA*1*000000905

The generated PDF file is as follows.

About Us

Redix International, Inc. is an enterprise software company. Redix develops software and provides services to help organizations convert their proprietary or organization-specific data to standardized data. Among the standardized formats supported are X12, EDIFACT, XML, NSF, UB92, HIPAA, HL7, CDA, Blue-Ribbon, FHIR, NCPDP, and PDF.

Posted by admin in HIPAA

HL7 C-CDA to FHIR STU3 Conversion

This blog post describes the mapping specifications and conversion from HL7 C-CDA to FHIR STU3.

The HL7 organization released version 2 decades ago. This version 2.x is still being updated and improved and is implemented worldwide. HL7 Version 3 messaging has also been implemented internationally, but not in the U.S. CDA (Clinical Document Architecture) and Consolidated-Clinical Document Architecture (C-CDA), both XML-based, are widely adopted in the U.S. and are considered the most successful HL7 version 3 standard. FHIR specification is a next-generation standards framework, which combines the best features of all previous HL7’s releases, including v2, v3, and CDA product lines, to facilitate interoperation between various healthcare systems.

The C-CDA contains a library of CDA templates and prescribes their use for a set of specific document types. The templates are defined in three levels: document, section, and entry.

  • Document: The document level templates define the type of CDA document, such as CCD (Continuity of Care Document).
  • Section: The section level templates define how data within specific sections will be structured, such as vital signs.
  • Entry: Entry-level templates define how specific observations, procedures, etc., will be structured, making entries appear the same regardless what document or section they are a part of.

A C-CDA message starts with a “ClinicalDocument” node. Inside the node, it has series of elements, such as realmCode, title, effectiveDate, recordTarget, participant, component, etc. The “component” node carries most of the information that will be mapped to FHIR. A “component” node typically contains a “section” node. A “section” node consists of one or many “entry” nodes. An “entry” node may have an act, substanceAdministration” or a resource node, such as “encounter”. Below is a typical example of the “component” structure in C-CDA.

Template identifier (templateId) is used in each node to assert conformance to a collection of business rules which provide various levels of interoperability.

C-CDA/FHIR STU3 Mapping

Our web-based tool is developed based on two specifications.

  • Below is a table that shows the mapping between C-CDA and FHIR STU3. Another good reference for mapping specification can be found here.
    Top Level *Title2nd Level **3rd Level ***FHIR
    templateId = 2.16.840.1.113883 .10.20.22.2.6.1Allergies, Adverse, Reactions & AlertsAllergyIntolerance
    templateId = 2.16.840.1.113883 .10.20.22.4.30AllergyIntolerance. clinicalStatus
    templateId = 2.16.840.1.113883 .10.20.22.4.7AllergyIntolerance. reaction AllergyIntolerance. substance AllergyIntolerance. type = ‘Allergy’ AllergyIntolerance. category
    templateId = 2.16.840.1.113883 .10.20.22.4.8AllergyIntolerance. criticality
    templateId = 2.16.840.1.113883 .10.20.22.2.22EncountersEncounter
    templateId = 2.16.840.1.113883 .10.20.22.4.49Encounter.type Encounter.period
    templateId = 2.16.840.1.113883 .10.20.22.4.19Encounter.code Encounter.period
    templateId = 2.16.840.1.113883 .10.20.22.2.2ImmunizationsImmunization
    templateId = 2.16.840.1.113883 .10.20.22.4.52Immunization.status Immunization.date Immunization.route Immunization. vaccineCode Immunization. performer
    Practitioner Practitioner.address Practitioner.telecom Practitioner.name Practitioner. practitionerRole
    templateId = 2.16.840.1.113883 .10.20.22.1.1MedicationsMedication
    templateId = 2.16.840.1.113883 .10.20.22.4.16Medication.code
    templateId = 2.16.840.1.113883 .10.20.22.2.5.1ProblemsCondition
    templateId = 2.16.840.1.113883 .10.20.22.4.3Condition.code Condition. clinicalStatus Condition. onsetPeriod Condition.category
    templateId = 2.16.840.1.113883 .10.20.22.2.7ProceduresProcedure
    templateId = 2.16.840.1.113883 .10.20.22.4.13Procedure.code Procedure.status Procedure. performedDateTime
    templateId = 2.16.840.1.113883 .10.20.22.2.3ResultsObservation
    templateId = 2.16.840.1.113883 .10.20.22.4.2Observation.code Observation.status Observation. effectiveDateTime Observation. valueQuantity Observation. interpretation Observation. referenceRange
    templateId = 2.16.840.1.113883 .10.20.22.2.17Social HistoryObservation
    templateId = 2.16.840.1.113883 .10.20.22.4.78Observation. valueCodeableConcept
    templateId = 2.16.840.1.113883 .10.20.22.2.4Vital Signs
    templateId = 2.16.840.1.113883 .10.20.22.4.26
    templateId = 2.16.840.1.113883 .10.20.22.4.27Observation.code Observation.status Observation. effectiveDateTime Observation. valueQuantity
    templateId = 2.16.840.1.113883 .19.5.99999.2Provider OrganizationOrganization Organization.name Organization.telecom Organization.address

    Patient
    Patient.name
    Patient.address
    Patient.telecom
    Patient.gender
    Patient.birthDate
    Patient.maritalStatus
    Patient.contact
    Patient.communication

    Top Level *: ClinicalDocument.component.strurceBody.component.section or ClinicalDocument.recordTarget.patientRole
    2nd Level **:  Section.entry.act or Section.entry or Section.entry.substanceAdministration
    3rd Level ***: Act.entryRelationship or Entry.substanceAdministration
  • The following is the mapping specifications between a CDA (R2) message and the Patient resource using STU3. Note that the section number can be changed in a different release.
    FHIR Resource Mapping Specification Section in the URL
    Patient http://hl7.org/fhir/stu3/patient-mappings.html. 8.1.14.3

    Typically, when converting a C-CDA message to FHIR, the following FHIR resources may be generated:

    • Patient,
    • Observation
    • Practitioner
    • Organization
    • Condition
    • Medication
    • Procedure
    • MedicationRequest
    • MedicationAdministration
    • Encounter
    • AllergyIntolerance

Notes about the Conversion

1.     Use Composition to bundle resources

Once a CDA file is validated and converted successfully, the output JSON file is using the “Composition” to “bundle” various resources. In this example, Organization and AllergyIntolerance are bundled in the reference tag.

"resource": {
  "resourceType": "Composition",
  "id": "Composition/0",
  "section": [
    {
      "entry": [
        {
          "reference": "Organization/1"
        }
      ]
    },
    {
      "entry": [
        {
          "reference": "AllergyIntolerance/2"
        }
      ]
    },
    …

The reference tag, as shown in the above, contains a resource name and a sequence number, so that the reference will be unique. The “Organization/1” can then be found in the same JSON file, as follows:

 {
  "resource": {
    "resourceType": "Organization",
    "id": "Organization/1",
    "name": "Community Health and Hospitals",
    "telecom": [
      {
        "use": "work",
        "system": "phone",
        "value": " 555-555-5000"
      }
    ],
    "address": [
      {
        "line": [
          "1001 Village Avenue"
        ],
        "city": "Portland",
        "state": "OR",
        "postalCode": "99123",
        "country": "US"
      }
    ]
  },
  "request": {
    "method": "POST",
    "url": "Organization"
  }
}

2.     Use uuid for the patient id

The patient id is uniquely assigned using uuid. Following is an example of the Patient.id, highlighted in red color.

"resource": {
    "resourceType": "Patient",
    "id": "Patient/898688b8-014b-466a-9962-e1da96c1161d",
    "identifier": [
     {
        "system": "urn:oid:2.16.840.1.113883.3.6309.11",
        "value": "72929"
      }
     ],

For resources that refer to the Patient resource, it has the syntax like “Patient/uuid”. The following is an example of MedicationRequest that refers to the same patient, highlighted in red color.

"resource": {
    "resourceType": "MedicationRequest",
    "id": "MedicationRequest/4",
    
    "patient": {
      "reference": "Patient/898688b8-014b-466a-9962-e1da96c1161d"
     },

3.     Use the root id for the identifier value

The identifier in FHIR is mapped using the “root” attribute defined in the “id” tag in the CDA. In the following example, the templateId “2.16.840.1.113883.10.20.22.4.49” (encounter) has the following information:

<encounter classCode="ENC" moodCode="EVN">
   <templateId root="2.16.840.1.113883.10.20.22.4.49"/>
   <!-- Encounter activity template -->
   <id root="2a620155-9d11-439e-92b3-5d9815ff4de8"/>

The root value is mapped to the “identifier.value” in the Encounter resource:

"resource": {
    "resourceType": "Encounter",
    "id": "Encounter/5",
    "patient": {
      "reference": "Patient/8ee6b5c6-e280-4805-9869-b8d8fa7902eb"
    },
    "identifier": [
      {
        "value": "2a620155-9d11-439e-92b3-5d9815ff4de8"
      }
    ],

Web-based Tool

You can test the conversion tool online by going to Redix HIPAA Compliance and Conversions, and then enter your C-CDA file by pressing the “Select File” button.

After a file is selected, your file will be automatically converted to an FHIR message, providing the file is a valid HL7 C-CDA file. Once the file is converted, you will see two outputs:

  1. XSL View: This view is generated by using the cda.xsl (https://github.com/chb/sample_ccdas/blob/master/CDA.xsl).

  1. FHIR Output:

The output JSON file can be viewed in a tree:

 

After the conversion, you might want to upload the FHIR JSON message to your FHIR data server. The default FHIR data server is HAPI, http://fhirtest.uhn.ca/. You can press the button “Upload to FHIR Data Server” to upload your FHIR resources to the FHIR data server.

You can, of course, use your own FHIR data server. To do so, you will need to first signup and then define your data server as a default FHIR data server.

References

There are several good resources that you may be interested in this topic.

 

Posted by admin in FHIR