Report Templates
A report template is a text file that contains formatting information used by Response Generator to create a custom report.
Templates are made up of sections that contain variables.
- 
                        Sections provide structure for the report by grouping types of information such as provider information, receiver information, and so forth. 
- 
                        Variables provide data by importing specific information into the report. 
As shown here, template sections are preceded with a dot (.) (e.g, .PROVHEADER) and variables are preceded with a % sign (e.g., %ICUsage).
Templates also contain user-specified formatting options (.OPTIONS) and user-specified literal text (e.g., 270 Status Report).
Sample Templates
For sample templates, see the files that start with RGtemplate in Instream’s DemoData directory. They are used by scripts with file names containing textrpt (example: V_RG_837P_4010_textrpt_1).
See the Instream DemoData Directory section of Demo_Index.pdf for a list and description.
Template Sections
General information about template sections:
- 
                        All template sections are optional. 
- 
                        You can use a header without its trailer and vice versa. 
Example: You can have .PROVHEADER without .PROVTRAILER.
- 
                        The template header and trailer lines are not case sensitive. 
- 
                        When a template section is encountered, its variables are cleared and reloaded. 
Example: If you use a .SOURCEHEADER section, values that were set for the first provider are cleared when the second provider is encountered.
- 
                        Values set in a higher section can be used in lower sections, but not vice versa. 
Example: the variable %PayerName% gets set/reset at each 2000A/.SOURCEHEADER section. If you use it at the .HEADER section, it will be blank. You will only get output from %PayerName% at or below the .SOURCEHEADER section.
All Templates
All templates can have these sections:
OPTIONS Section
This section is optional and appears once at the beginning of the output file. It consists of one of these:
| .OPTIONS NoWrap | Truncate information rather than wrap it to a new line. | 
| .OPTIONS RepeatText | Repeats constant information on each error line. | 
| .OPTIONS NoWrap,RepeatText | 
FILEHEADER and FILETRAILER Sections
In the output file, the FILEHEADER section appears once per ISA and begins with a line containing only:
.FILEHEADER 
                
Put information here if you want it to appear once for each file.
The FILETRAILER section appears once per ISA and begins with a line containing only:
. FILETRAILER 
                
Put information here if you want it to appear once for each file, after the file’s information has been processed.
GROUPHEADER and GROUPTRAILER Sections
In the output file, the GROUPHEADER section appears once per GS and begins with a line containing only:
. GROUPHEADER 
                
Put information here if you want it to appear once for each group.
The GROUPTRAILER section appears once per GS and begins with a line containing only:
. GROUPTRAILER 
                
Put information here if you want it to appear once for each group, after the group’s information has been processed.
HEADER and Trailer Sections
The Header appears once for each GS in the input file. If an OPTIONS section is included, the Header section follows it. It begins with a line containing only:
.HEADER
                
Put information here if you want it to appear once for each file. Examples include information from the ISA.
The TRAILER section is optional and appears once at the end of the output file, and begins with a line containing only:
.TRAILER
                
DETAIL Section
In the output file, the DETAIL section appears for each claim and begins with a line containing only:
.DETAIL 
                
Put information here that you want to appear once for each claim. Examples include claim numbers and amounts.
ERRORHEADER and ERRORTRAILER Sections
In the output file, the ERRORHEADER section appears for each DETAIL section and begins with a line containing only:
.ERRORHEADER 
                
The ERRORTRAILER section appears once for each DETAIL section and begins with a line containing only:
.ERRORTRAILER
                
ISATOTALHEADER and ISATOTALTRAILER Sections
In the output file, the ISATOTALHEADER section appears once at the end of the output file, and begins with a line containing only:
. ISATOTALHEADER
                
Put information here to provide ISA summary information for the file. Examples include totals for data such as number of claims and dollar value.
The ISATOTALTRAILER section appears once at the end of the output file, and begins with a line containing only:
. ISATOTALTRAILER
                
Put information here if you want it to appear once to provide an end for ISA summary information for the file.
OVERRIDE Section
The OVERRIDE section is optional and can appear anywhere in the template. It allows you to override the default display information for a particular error (including its number and associated data) with information of your choosing. It consists of a line containing the following:
.OVERRIDE errno|loop|segelmdata|error_ref|error_message|error_data
                
Where:
| errno  | The error number to be overridden. This field must be populated. | 
| | | Separator. This symbol must be used between line values. | 
| loop | Alternate location information to be provided instead of the default (Loop ID). | 
| segelmdata | Alternate segment/element error data to be provided instead of the default. | 
| error_ref | User-defined field intended to provide additional reference information. There is no default text for this field. | 
| error_message | Alternate error message text to be provided instead of the default. | 
| error_data | Alternate error data to be provided instead of the default (%ErrData%). | 
All fields are required, although only errno must be populated. If a value is left empty, the default value is used. (This excludes errno, which can’t be left empty.)
Note that there is a difference between leaving a field empty and entering a blank (or space) in the field. An empty field will display the default system value. A field with a space will display "" (a blank).
You can use a custom report variable in any field except errno. However, if the variable's value is empty, the original value will be replaced with "" (a blank).
Examples:
For error 23456, override the default loop location information that would typically be displayed (such as “2000B”) and show the text “Provider” instead. Allow all other default information for the error to display:
.OVERRIDE 23456|Provider|||||
For error 60001, override the default loop location information and show the text “2010BA” instead. Use the default information for the segment/element error data. Use “NM109” as additional error reference information. Display the default error message text and, finally, display the contents of the variable %SubCustomRecord1% as additional error data:
.OVERRIDE 60001|2010BA||NM109||%SubCustomRecord1%
For error 60002, override the loop location information and show the text “2000B” instead. Display a blank for the segment/element error data. Use “SBR09” as additional error reference information. Display a blank instead of error message text and, finally, display the contents of the variable %SubCustomRecord0% as additional error data:
270, 276, and 277 Templates
270, 276, and 277 templates can have additional sections for source, provider, subscriber, and dependent:
Additionally, 276 and 277 templates can have sections for receiver information:
SOURCEHEADER and SOURCETRAILER Sections
In the output file, the SOURCEHEADER section appears once for each 2000A loop in 270, 276, and 277 transactions. It begins with a line containing only:
.SOURCEHEADER
                
Put information here if you want it to appear once for each information source.
The SOURCETRAILER section appears once for each information source in 270, 276, and 277 transactions. It begins with a line containing only:
.SOURCETRAILER
                
Put information here if you want it to appear once for each information receiver, after the source’s information has been processed.
RECEIVERHEADER and RECEIVERTRAILER Sections
In the output file, the RECEIVERHEADER section appears once for each 2000B loop in 276 and 277 transactions. It begins with a line containing only:
.RECEIVERHEADER
                
The RECEIVERTRAILER section appears once for each receiver in 276 and 277 transactions. It begins with a line containing only:
.RECEIVERTRAILER
                
Put information here if you want it to appear once for each information receiver after the receiver’s information has been processed.
PROVHEADER and PROVTRAILER Sections
In the output file, the PROVHEADER section appears once for each provider in 270, 276, and 277 transactions. It begins with a line containing only:
.PROVHEADER
                
Put information here if you want it to appear once for each provider. Examples include provider and patient information. Note that, for these transactions, “Provider” refers to information in the 2000C.
Put information here if you want it to appear once for each information receiver.
The PROVTRAILER section appears once for each provider in 270, 276, and 277 transactions. It begins with a line containing only:
.PROVTRAILER
                
Put information here if you want it to appear once for each provider, after the provider information has been processed. Examples include claim totals and counts by provider.
SUBSCRIBERHEADER and SUBSCRIBERTRAILER Sections
In the output file, the SUBSCRIBERHEADER section appears once for each subscriber in 270, 276, and 277 transactions. It begins with a line containing only:
.SUBSCRIBERHEADER
                
Put information here if you want it to appear once for each subscriber.
The SUBSCRIBERTRAILER section appears once for each subscriber in 270, 276, and 277 transactions. It begins with a line containing only:
.SUBSCRIBERTRAILER
                
Put information here if you want it to appear once for each subscriber, after the subscriber’s information has been processed.
DEPENDENTHEADER and DEPENDENTTRAILER Sections
In the output file, the DEPENDENTHEADER section appears once for each dependent in 270, 276, and 277 transactions. It begins with a line containing only:
.DEPENDENTHEADER
                
Put information here if you want it to appear once for each dependent.
The DEPENDENTTRAILER section appears once for each dependent in 270, 276, and 277 transactions. It begins with a line containing only:
. DEPENDENTTRAILER
                
Put information here if you want it to appear once for each subscriber after the dependent’s information has been processed.
278 Templates
278 templates can have additional sections for interchange and utilization management organization information:
ISAHEADER and ISATRAILER Sections
In the output file, the ISAHEADER section appears once for each ISA Level loop in 278 transactions. It begins with a line containing only:
.ISAHEADER
                
Put information here if you want it to appear once for each information source.
The ISATRAILER section appears once for each ISA Level loop in 278 transactions. It begins with a line containing only:
.ISATRAILER
                
Put information here if you want it to appear once for each information receiver after the receiver’s information has been processed.
UMOHEADER and UMOTRAILER Sections
In the output file, the UMOHEADER section appears once for each 2000A UMO level loop in 278 transactions. It begins with a line containing only:
.UMOHEADER
                
Put information here if you want it to appear once for each information source.
The UMOTRAILER section appears once for each 2000A UMO level loop in 278 transactions. It begins with a line containing only:
.UMOTRAILER
                
Put information here if you want it to appear once for each information receiver after the receiver’s information has been processed.
820 Templates
820 templates can have additional sections for payers, including information about remittance: 
 
PAYERHEADER and PAYERTRAILER Sections
In the output file, the PAYERHEADER section appears once per transaction set. It begins with a line containing only:
.PAYERHEADER
                
Put information here if you want it to appear once for each transaction set. Examples include provider reference ID, fiscal period date, and adjustment reason codes.
The PAYERTRAIL section appears once per transaction set. It begins with a line containing only:
  . PAYERTRAIL
Put information here if you want it to appear once per transaction set, after the provider level adjustment information has been processed.
ORGREMHEADER and ORGREMTRAILER Sections
In the output file, the ORGREMHEADER section appears once per transaction set, and begins with a line containing only:
. ORGREMHEADER
                
Put information here to provide information about organization remittance.
The ORGREMTRAILER section appears once per transaction set, and begins with a line containing only:
. ORGREMTRAILER
                
Put information here if you want it to appear once per transaction set, after the organization remittance information has been processed.
ORGREMDTLHEADER and ORGREMDTLTRAILER Sections
In the output file, the ORGREMDTLHEADER section appears once per transaction set, and begins with a line containing only:
.ORGREMDTLHEADER
                
Put information here to provide information about organization remittance details.
The ORGREMDTLTRAILER section appears once per transaction set, and begins with a line containing only:
. ORGREMDTLTRAILER
                
Put information here if you want it to appear once per transaction set, after the organization remittance detail information has been processed.
ORGREMDETAIL Section
In the output file, the ORGREMDETAIL section appears once per transaction set, and begins with a line containing only:
. ORGREMDETAIL
                
This section provides the organization remittance detail.
ORGREMADJHEADER and ORGREMADJTRAILER Sections
In the output file, the ORGREMADJHEADER section appears once per transaction set, and begins with a line containing only:
. ORGREMADJHEADER
                
Put information here to provide information about organization remittance adjustments.
The ORGREMADJTRAILER section appears once per transaction set, and begins with a line containing only:
. ORGREMADJTRAILER
                
Put information here if you want it to appear once per transaction set, after the organization's remittance adjustment information has been processed.
INDREMHEADER and INDREMTRAILER Sections
In the output file, the INDREMHEADER section appears once per transaction set, and begins with a line containing only:
. INDREMHEADER
                
Put information here to provide information about individual remittance.
The INDREMTRAILER section appears once per transaction set, and begins with a line containing only:
. INDREMTRAILER
                
Put information here if you want it to appear once per transaction set, after the individual remittance information has been processed.
INDREM Section
In the output file, the INDREM section appears once per transaction set, and begins with a line containing only:
. INDREM
                
Put information here to provide information individual remittance.
INDREMDTLHEADER and INDREMDTLTRAILER Sections
In the output file, the INDREMDTLHEADER section appears once per transaction set, and begins with a line containing only:
. INDREMDTLHEADER
                
Put information here to provide information about individual remittance details.
The INDREMDTLTRAILER section appears once per transaction set, and begins with a line containing only:
. INDREMDTLTRAILER
                
Put information here if you want it to appear once per transaction set, after the individual remittance detail information has been processed.
INDREMDETAIL Section
In the output file, the INDREMDETAIL section appears once per transaction set, and begins with a line containing only:
. INDREMDETAIL
                
Put information here to provide information about individual remittance detail.
INDREMADJHEADER and INDREMADJTRAILER Section
In the output file, the INDREMADJHEADER section appears once per transaction set, and begins with a line containing only:
. INDREMADJHEADER
                
Put information here if you want it to appear once per transaction set, to provide information about individual remittance adjustments.
The INDREMADJTRAILER section appears once per transaction set, and begins with a line containing only:
. INDREMADJTRAILER
                
Put information here if you want it to appear once per transaction set, after the individual remittance adjustment information has been processed.
835 Templates
835 templates can have additional sections about provider level adjustments and errors affecting them.
                     
                    
                
PLBHEADER and PLBTRAILER Sections
In the output file, the PLBHEADER section appears once per transaction set. It begins with a line containing only:
. PLBHEADER
                
Put information here if you want it to appear once for each transaction set to provide information about provider level adjustments.
The PLBTRAILER section appears once per transaction set. It begins with a line containing only:
. PLBTRAILER
                
Put information here if you want it to appear once per transaction set, after the provider level adjustment information has been processed.
PLBERRORHEADER and PLBERRORTRAILER Sections
In the output file, the PLBERRORHEADER section appears once per transaction set, and begins with a line containing only:
. PLBERRORHEADER
                
Put information here to provide information about all errors at the ST level and above affecting provider level adjustments.
The PLBERRORTRAILER section appears once per transaction set, and begins with a line containing only:
. PLBERRORTRAILER
                
Put information here if you want it to appear once per transaction set, after the provider level adjustment error information has been processed.
837 Templates
837 templates can have additional sections for provider and interchange total information.
PROVHEADER and PROVTRAILER Sections
In the output file, the PROVHEADER section appears once for each provider in 837 transactions. It begins with a line containing only:
.PROVHEADER
                
Put information here if you want it to appear once for each provider. Examples include provider and patient information. Note that, for this transaction, “Provider” refers to information in the 2000A and above.
The PROVTRAILER section appears once for each provider in 837 transactions. It begins with a line containing only:
.PROVTRAILER
                
Put information here if you want it to appear once for each provider, after the provider information has been processed. Examples include claim totals and counts by provider.
Literals and Variables
The template has both literal text and variables. In the example above, everything not surrounded by % is a literal. Everything surrounded by % is a variable that will be replaced when the custom report is generated. For example:
ClaimNumber: %CLAIMID%
TotalAmt: %CLAIMAMT%
In the report, these lines might generate something like this for each claim:
ClaimNumber: 10
TotalAmt: $1000.00
If you have tables in your HTML template, put entire <TR>...</TR> onto one line of the template file. Add the statement '.OPTIONS RepeatText' at the beginning of the template file, as shown in the template file RGtemplate837I_h.txt in Instream’s DemoData directory.
Variables are pre-defined by Response Generator (see page Template Variables) and are not case sensitive: CLAIMAMT is the same as ClaimAmt.
In the template, variables may be accompanied by column width and justification information - especially important when producing a column report.
| Format | Result in Report | Example | 
|---|---|---|
| %varname% | varname is the name of the variable to be output (see page Template Variables). The report displays the value, taking up as many spaces as needed. | % PatName% displays the patient last, first, and middle names. | 
| (note colon) | w is the field width. | %PatName:25% displays the patient last, first, and middle names in a column that is 25 characters wide.. If the name has less than 25 characters, blanks are added. If the name has more than 25 characters, it wraps. Note the colon that separates the variable name from the width. | 
| %varname:jw% | j is an optional field justification of either L or R. You must use a width if you use justification. | %PatName:R25% right-justifies up to 25 characters of the patient last, first, and middle names. For numeric fields, you can right-justify and fill with leading zeros. To do this, put a 0 right after the R. Example: R010 defines a right-justified field of 10 characters, with leading zeros. If the value is 23, then this field will show 0000000023 in the custom report. Default is left justification. The justification can come before or after the width: R25 and 25R have the same result. | 
Template Variables
Template variables are not case-sensitive.
General Template Variables
These variables can be used in any template.
| ClaimCnt_byGS | Number of claims encountered so far in this functional group set. Resets at the beginning of each functional group set. | 
| ClaimCntGood_byGS | Number of good claims encountered so far in this functional group set. Resets at the beginning of each functional group set. | 
| ClaimCntBad_byGS | Number of bad claims encountered so far in this functional group set. Resets at the beginning of each functional group set. | 
| ClaimCustomRecord [0-9] | Claim Custom Record as determined by the corresponding ZREC at the specified level. This variable can be used multiple times using 0-9 (for example, ClaimCustomRecord0, ClaimCustomRecord1). This variable corresponds to ZZCRx, where x is also 0-9 and is a 1:1 match. See TIB_fsp-instream_<n.n>_usersguide.pdf, the section “Z Custom Data Record”. Example: ZZCR2 at the 2300 loop level corresponds to %ClaimCustomRecord2%. | 
| ClaimPercentGood_byGS | Percent of claims that are good in this functional group set; includes one decimal place. Example: 60.0. | 
| ClaimPercentBad_byGS | Percent of claims that are bad in this functional group set; includes one decimal place. Example: 40.0. | 
| ContactPhone | Contact phone number as passed through a ZZWPC custom record. | 
| Date | Current date in format MM/DD/YYYY. | 
| Date_YYMMDD | Current date in format YYMMDD. | 
| Date_MMDDYYYY | Current date in format MM-DD-YYYY. | 
| DATE_YYYY_MM_DD | Current date in format YYYY-MM-DD. | 
| DepCustomRecord[0-9] | Dependent Custom Record as determined by the corresponding ZREC at the specified level. This variable can be used multiple times using 0-9 (for example, DepCustomRecord0, DepCustomRecord1). This variable corresponds to ZZCRx, where x is also 0-9 where x is also 0-9 and is a 1:1 match. See TIB_fsp-instream_<n.n.n >_UsersGuide.pdf the section "Z Custom Data Record". Example: ZZCR2 at the 2300 loop level corresponds to %DepCustomRecord2%. | 
| EdiFileName | Name of the EDI file. STRT record must be in the results file. Example output: 837P_098Dep_11.txt | 
| EdiFilePath | Path to the EDI file. STRT record must be in the results file. Example output: C:\Systest\Data\ | 
| EDILine | Line number in EDI file. | 
| Filler:n | Insert n spaces. Example: Filler:5 | 
| LineCount | Number of lines so far in the report. | 
| MostFrequentError[0-10] | For the top ten errors, displays the most to least frequently occurring error. Examples: MostFrequentError1displays the most frequent error. MostFrequentError3 displays the third most frequent error. | 
| MostFrequentErrorCount[0-10] | Count for the [first through tenth] most frequent error. Examples: MostFrequentErrorCount1is the percentage of the most frequent error. MostFrequentErrorCount3 is the percentage of the third most frequent error. | 
| MostFrequentErrorPercent[0-10] | Percentage of the [first through tenth] most frequently occurring error. Examples: MostFrequentErrorPercent1is the percentage of the most frequent error. MostFrequentErrorPercent3 is the percentage of the third most frequent error. | 
| NEWLINE | Line break. | 
| OriginalFname | Original Filename as passed through a ZZWRO custom record. | 
| PayerCustomRecord[0-9] | Payer Custom Record as determined by the corresponding ZREC at the specified level. This variable can be used multiple times using 0-9 (for example, PayerCustomRecord0, PayerCustomRecord1). This variable corresponds to ZZCRx, where x is also 0-9 where x is also 0-9 and is a 1:1 match. See TIB_fsp-instream_<n.n.n >_UsersGuide.pdf the section “Z Custom Data Record”. Example: ZZCR2 at the 2300 loop level corresponds to %PayerCustomRecord2%. | 
| PayerLineCount | Placed in one of the types of trailer records, this shows the number of lines displayed for the current payer up to this point. | 
| ProvCustomRecord[0-9] | Provider Custom Record as determined by the corresponding ZREC at the specified level. This variable can be used multiple times using 0-9 (for example, ProvCustomRecord0, ProvCustomRecord1). This variable corresponds to ZZCRx, where x is also 0-9 where x is also 0-9 and is a 1:1 match. See TIB_fsp-instream_<n.n.n >_UsersGuide.pdf, the section “Z Custom Data Record”. Example: ZZCR2 at the 2300 loop level corresponds to %ProvCustomRecord2%. | 
| SubCustomRecord[0-9] | Submitter Custom Record as determined by the corresponding ZREC at the specified level. This variable can be used multiple times using 0-9 (for example, SubCustomRecord0, SubCustomRecord1). This variable corresponds to ZZCRx, where x is also 0-9 where x is also 0-9 and is a 1:1 match. See TIB_fsp-instream_<n.n.n >_UsersGuide.pdf, the section “Z Custom Data Record”. Example: ZZCR2 at the 2300 loop level corresponds to %SubCustomRecord2%. | 
| Time | Current Time in 24hr format HH:MM. | 
| TPCustomRecord[0-9] | Trading Partner Custom Record as determined by the corresponding ZREC at the specified level. This variable can be used multiple times using 0-9 (for example, TPCustomRecord0, TPCustomRecord1). This variable corresponds to ZZCRx, where x is also 0-9 where x is also 0-9 and is a 1:1 match. See TIB_fsp-instream_<n.n.n >_UsersGuide.pdf, the section “Z Custom Data Record”. Example: ZZCR2 at the 2300 loop level corresponds to %TPCustomRecord2%. | 
| UserGSControlNum | User-specified GS Control Number, as set via the -dcg command. | 
| WrappedText | Display the text that was truncated from the end of a variable that was specified with a fixed width. For example, using %WrappedText% after the variable %ErrMsg:128% results in the display of all text from positions 129 on. | 
Error/Message Template Variables
Error variables really represent lists of values, since a claim may have more than one. If so, subsequent occurrences appear on another line.
These variables can be used in any template.
| ErrData | Data causing error. | 
| ErrElmPos | Position of the erroneous element with the segment. | 
| ErrID | Error number. | 
| ErrLoop | ID of the loop with the error. | 
| ErrMsg | Error text – TIBCO Foresight flavor. | 
| ErrMsg_ADA | Error text – ADA flavor. | 
| ErrMsg_COBA | Error text – COBA flavor. For errors not defined in ErrMsgTrans.txt, the report will have an error number of 009999. This will generally happen with your custom error messages that you set up with your own business rules. | 
| ErrMsg_Foresight | Error text – TIBCO Foresight flavor. | 
| ErrMsg_HCFA | Error text – HCFA flavor. | 
| ErrMsg_NonTech | Error text – Non-technical flavor if an ELOC record is associated with the DTL record for an error in the 10000-29999 range. For a demo, see V_RG_837P_4010_textrpt_ELOC in Instream’s Scripts directory. | 
| ErrMsg_NSF | Error text – NSF flavor. | 
| ErrMsg_UB92 | Error text – UB92 flavor. | 
| ErrRefDes | ErrSegData+ErrElemPos+ErrSubElmPos. | 
| ErrSeg | ID of the segment with the error. | 
| ErrSegData | Entire segment causing or containing the error (if present in data). | 
| ErrSev | Error severity number. | 
| ErrSubElmPos | Position of the subelement within the composite. | 
| ErrType | Error type number. | 
Envelope Template Variables
These variables can be used in any template.
Interchange
| ICSendID | Sender ID (ISA-06). | 
| ICSendIDQual | Sender ID qualifier (ISA-05). | 
| ICRecID | Receiver ID (ISA-08). | 
| ICRecIDQual | Received ID qualifier (ISA-07). | 
| ICCtlNoStart | Control number passed with the Response Generator command line parameter -dic. | 
| ICDate | Date (ISA-09) in format MM/DD/YYYY. | 
| ICDate_MMDDYYYY | Date (ISA09) in format MM-DD-YYYY. | 
| ICDate_YYMMDD | Date (ISA-09) in format YYMMDD. | 
| ICDATE_YYYY_MM_DD | Date (ISA-09) in format YYYY-MM-DD. | 
| ICTime | Time (ISA-10) in format HH:MM. | 
| ICCtlNo | Interchange control number (ISA-13). | 
| ICDate_YYYYMMDD | ISA date in YYYYMMDD format. | 
| ICUsage | Usage (ISA-15) | 
Functional Group
| FGSendID | Sender ID (GS-02). | 
| FGRecID | Receiver ID (GS-03). | 
| FGDate | Date (GS-04) in format MM/DD/YYYY. | 
| FGDate_YYMMDD | Date (GS-04) in format YYMMDD. | 
| FGDate_MMDDYYYY | Date (GS-04) in format in MM-DD-YYYY. | 
| FGTime | Time (GS-05) in format HH:MM. | 
| FGCtlNo | Control number (GS-06). | 
| FGVerRel | Version/Release/Industry Identifier Code (GS-08). | 
| FGType | HIPAA type of the source document (Example: 837 D 5010). | 
| COBA_837Type | Returns “Part A” or “Part B”. | 
Transaction Set
| SetCtlNo | Set control number (ST-02). | 
ISATOTAL Summary Variables
These variables can be used in any template except 277, 820, and 834.
| FileClaimCntTotals | Total number of claims in that ISA. | 
| FileClaimCntGoodTotals | Total number of good claims in that ISA. | 
| FileClaimCntBadTotals | Total number of good claims in that ISA. | 
| FileClaimAmtTotals | Total dollar value of claims in that ISA. | 
| FileClaimAmtGoodTotals | Total dollar value of good claims in that ISA. | 
| FileClaimAmtBadTotals | Total dollar value of bad claims in that ISA. | 
| FileClaimTotalIndex | The claim being reported on. | 
270-Specific Report Variables
These variables can be used only for a 270 custom report template.
| Detail Section | |
| TSRefID | Transaction set reference ID (BHT03). | 
| TSTypeCpde | Transaction type code (BHT06). | 
| 2000C | |
| SubTraceTypeCode | Type of transaction being referenced (TRN01). | 
| SubTraceID | Transaction trace number (TRN02). | 
| SubOrigTraceID | Originating company identifier (TRN03). | 
| SubOrigTraceSuppID | Originating company supplemental identifier (TRN04). | 
| 2110C | |
| SubServiceTypeCode | Service type classification code (EQ01). | 
| SubServiceIDQual | Service Id qualifier (EQ0201). | 
| SubServiceID | Service Id (EQ0202). | 
| SubProcedureMod1 | Service/procedure modifier code #1 (EQ0203). | 
| SubProcedureMod1 | Service/procedure modifier code #2 (EQ0204). | 
| SubProcedureMod1 | Service/procedure modifier code #3 (EQ0205). | 
| SubProcedureMod1 | Service/procedure modifier code #4 (EQ0206). | 
| SubCoverageLevelCode | Coverage level provided (EQ03). | 
| 2000D | |
| DepTraceTypeCode | Type of transaction being referenced (TRN01). | 
| DepTraceID | Transaction trace number (TRN02). | 
| DepOrigTraceID | Originating company identifier (TRN03). | 
| DepOrigTraceSuppID | Originating company supplemental identifier (TRN04). | 
| 2110D | |
| DepServiceTypeCode | Service type classification code (EQ01). | 
| DepServiceIDQual | Service Id qualifier (EQ0201). | 
| DepServiceID | Service Id (EQ0202). | 
| DepProcedureMod1 | Service/procedure modifier code #1 (EQ0203). | 
| DepProcedureMod1 | Service/procedure modifier code #2 (EQ0204). | 
| DepProcedureMod1 | Service/procedure modifier code #3 (EQ0205). | 
| DepProcedureMod1 | Service/procedure modifier code #4 (EQ0206). | 
| DepCoverageLevelCode | Coverage level provided (2110 EQ03). | 
276-Specific Report Variables
These variables can be used only for a 276 custom report template
Detail Section
| 2200D | |
| SubPayerClaimControlNumber | Payer Claim Control Number (REF*1K). | 
| SubSVCDate | Service date (DTP03). | 
| 2200E | |
| DepPayerClaimControlNumber | Payer Claim Control Number (REF*1K). | 
| DepSVCDate | Service date (DTP03). | 
| 2210D/E | |
| SVCMonAmt | SVC monetary amount (SVC02). | 
| SVCNUBCID | SVC NUBC Id (SVC04). | 
277CA, 277U, and 277X228-Specific Report Variables
These variables can be used only for a 277CA, 277U, or 277X228 custom report template
| HEADER Section | |
| ProcessAllFor277 | If the input file contained multiple errors or service lines per claim, only the last error or service line information appears in the custom report. ProcessAllFor277 causes all errors and service line information to appear: | 
| SOURCEHEADER Section | |
| 2100A | |
| PayerName | Payer last name (NM103). | 
| PayerIDQual | Payer ID qualifier (NM108). | 
| PayerID | Payer ID (NM109). | 
| RECEIVERHEADER Section | |
| 2100B | |
| ReceiverLName | Information receiver last name (NM103). | 
| ReceiverFName | Information receiver first name (NM104). | 
| ReceiverMName | Information receiver middle name (NM105). | 
| ReceiverName | Information receiver full name (NM103, NM104, NM105). | 
| ReceiverIDQual | Information receiver ID qualifier (NM108). | 
| ReceiverID | Information receiver ID (NM109). | 
| PROVHEADER Section | |
| 2100C | |
| ProvIDCode | Provider entity code (NM101). | 
| ProvLName | Provider last name (NM103). | 
| ProvFName | Provider first name (NM104). | 
| ProvMName | Provider middle name (NM105). | 
| ProvName | Provider full name (NM103, NM104, NM105). | 
| ProvIDQual | Provider ID qualifier (NM108). | 
| ProvID | Provider entity code (NM109). | 
| SUBSCRIBERHEADER Section | |
| 2000D | |
| SubBirthDate | Subscriber birth date (DMG02). | 
| SubGender | Subscriber gender (DMG03). | 
| 2100D | |
| PatLName | Patient last name (NM103 (NM101=QC)). | 
| PatFName | Patient first name (NM104 (NM101=QC)). | 
| PatMName | Patient middle name (NM105 (NM101=QC)). | 
| PatName | (NM103, NM104, NM105 (NM101=QC)). | 
| PatIDQual | Patient ID code qualifier (NM108 (NM101=QC)). | 
| PatID | Patient ID (NM109 (NM101=QC)). | 
| SubIDCode | Subscriber qualifier (NM101 (NM101=IL)). | 
| SubLName | Subscriber last name (NM103 (NM101=IL)). | 
| SubFName | Subscriber first name (NM104 (NM101=IL)). | 
| SubMName | Subscriber middle name (NM105 (NM101=IL)). | 
| SubName | Subscriber full name (NM103, NM104, NM105 (NM101=IL)). | 
| SubIDQual | Subscriber ID code qualifier (NM108 (NM101=IL)). | 
| SubID | Subscriber ID (NM109 (NM101=IL)). | 
| DEPENDENTHEADER Section | |
| 2000E | |
| PatBirthDate | Patient birth date (DMG02). | 
| PatGender | Patient gender (DMG03). | 
| 2100E | |
| PatLName | Patient last name (NM103). | 
| PatFName | Patient first name (NM104). | 
| PatMName | Patient middle name (NM105). | 
| PatName | Patient full name (NM103, NM104, NM105). | 
| PatIDQual | Patient ID code qualifier (NM108). | 
| PatID | Patient ID (NM109). | 
| DETAIL Section | |
| 2200D | |
| BillTypeQual | Bill type qualifier (REF01 (REF01=BLT)). | 
| BillTypeID | Bill type ID (REF02 (REF01=BLT)). | 
| ClaimID | Claim submitter trace number (TRN02). | 
| DateOfService | Claim service period (DTP03). | 
| PayerClaimQual | Payer claim ID qualifier (REF01 (REF01=1K)). | 
| PayerClaimID | Payer claim control number (REF02 (REF01=1K)). | 
| ClaimCategoryCode | Claim level status category code (STC01.01). | 
| ClaimStatusCode | Claim level status code (STC01.02). | 
| PlaceOfService | Place of service code (STC01.03). | 
| PmtAmt | Original submitted charges (STC04). | 
| PmtMethod | Claim payment method code (STC07). | 
| PmtDate | Payment issue date (STC08). | 
| CheckNum | Check number (STC09). | 
| 2220D | |
| SvcIDQual | Medical procedure ID qualifier (SVC01.01). | 
| SvcID | Medical procedure ID (SVC01.02). | 
| SvcMod1 | Medical procedure modifier code (SVC01.03). | 
| SvcMod2 | Medical procedure modifier code (SVC01.04). | 
| SvcMod3 | Medical procedure modifier code (SVC01.05). | 
| SvcMod4 | Medical procedure modifier code (SVC01.06). | 
| SvcChgAmt | Submitted service charge (SVC02). | 
| SvcQty | Original submitted units of service (SVC07). | 
| 2200E | |
| BillTypeQual | Bill type ID qualifier (REF01 (REF01=BLT)). | 
| BillTypeID | Bill type ID (REF02 (REF01=BLT)). | 
| DateOfService | Claim service date (DTP03). | 
| PayerClaimID | Payer claim ID qualifier (REF01 (REF01=1K)). | 
| PayerClaimQual | Payer claim control number (REF02 (REF01=1K)). | 
| ClaimID | Claim submitter trace number (TRN02). | 
| ClaimCategoryCode | Claim industry category (STC01.01). | 
| ClaimStatusCode | Claim status code (STC01.02). | 
| PlaceOfService | Service entity (STC01.03). | 
| PmtAmt | Amount of originally submitted charges (STC04). | 
| PmtMethod | Payment method (STC07). | 
| PmtDate | Check issue date (STC08). | 
| CheckNum | Check identification number (STC09). | 
| 2220E | |
| SvcIDQual | Procedure code qualifier (SVC01.01). | 
| SvcID | Procedure code (SVC01.02). | 
| SvcMod1 | Procedure modifier (SVC01.03). | 
| SvcMod2 | Procedure modifier (SVC01.04). | 
| SvcMod3 | Procedure modifier (SVC01.05). | 
| SvcMod4 | Procedure modifier (SVC01.06). | 
| SvcChgAmt | Submitter service charge (SVC02). | 
| SvcQty | Original submitted units of service (SVC07). | 
278-Specific Report Variables
(Including 278x215 and 278x216 transactions)
These variables can be used only for a 278 custom report template. This includes
2000A
| PayerName | Last name or organization name (NM103). | 
| PayerIDQual | Identification code qualifier (NM108). | 
| PayerID | Identification code (NM109). | 
2000B
| ReceiverNameL | Last name or organization name (NM103). | 
| ReceiverNameF | First name (NM104). | 
| ReceiverNameF | Middle name (NM105). | 
| ReceiverName | Combined first name, last name, and middle initial. | 
2000C
| SubNameL | Last name or organization name (NM103). | 
| SubNameF | First name (NM104). | 
| SubNameF | Middle name (NM105). | 
| SubName | Combined first name, last name, and middle initial. | 
| SubTraceTypeCode | Trace number type (TRN01). | 
| SubTrace | Trace number (TRN02). | 
2000D
| DepNameL | Last name or organization name (NM103). | 
| DepNameF | First name (NM104). | 
| DepNameF | Middle name (NM105). | 
| DepName | Combined first name, last name, and middle initial | 
| DepTraceTypeCode | Trace number type (TRN01). | 
| DepTrace | Trace number (TRN02). | 
2000E
| PatientName | Last name (If 2000D exists, 2000D NM103 is used, otherwise 2000C NM103 is used.) | 
| PatientTraceTypeCode | Trace number type (If 2100D exists, 2100D NM108 is used, otherwise 2100C NM108 is used.) | 
| PatientTrace | Trace number (If 2100D exists, 2100D NM109 is used, otherwise 2100C NM109 is used.) | 
| EventTraceTypeCode | Trace number type (TRN01). | 
| EventTrace | Trace number (TRN02). | 
| EventDate | 2000E Event Date - DTP*AAH DTP03 (YYYYMMDD). | 
820x218-Specific Report Variables
These variables can be used only for an 820 custom report template.
HEADER Section
| TransCode | Transaction Handling Code (BPR01) | 
| MonetaryAmt | Monetary Amount (BPR02) | 
| PayMethod | Payment Method Code (BPR04) | 
| PaymentDate | Date (BPR16) | 
| ReassociationKey | Reassociation Key (TRN02) | 
1000A
| ReceiverName | Premium Receiver Name (1000A, N102) | 
| ReceiverID | Premium Receiver ID (1000A, N104) | 
1000B
| PayersName | Premium Payer’s Name (1000B, N102) | 
| PayersID | Premium Payer’s ID (1000B, N104) | 
2000B
| OrgAssignedNumber | Organization Summary Remittance (2000A, ENT01) | 
| OrganizationID | Organization ID (2000A, ENT04) | 
2300A
| OrgRMRID | RMR Organization Reference ID (2300A, RMR02) | 
| OrgRMRAmt | RMR Organization Monetary Amount (2300A, RMR04) | 
2320A
| OrgADXAmt | Organization Monetary Amount (2320A, ADX01) | 
| OrgADXAdjCode | Organization Adjustment Reason Code (2320A, ADX02) | 
2000B
| IndAssignedNumber | Individual Summary Remittance (2000B, ENT01) | 
| IndividualID | Individual ID (2000B, ENT04) | 
2100B
| IndName | Individual Name (2100B, NM103) | 
| IndID | Individual ID (2100B, NM109) | 
2300B       
| IndRMRID | RMR Individual Reference ID (2300B, RMR02) | 
| IndRMRAmt | RMR Individual Monetary Amount (2300B, RMR04) | 
2320B
                    
                
| IndADXAmt | Individual Monetary Amount (2320B, ADX01) | 
| IndADXAdjCode | Individual Adjustment Reason Code (2320B, ADX02) | 
820x306-Specific Report Variables
These variables can be used only for an 820 custom report template.
HEADER Section
| TransCode | Transaction Handling Code (BPR01) | 
| MonetaryAmt | Monetary Amount (BPR02) | 
| PayMethod | Payment Method Code (BPR04) | 
| PaymentDate | Date (BPR16) | 
| ReassociationKey | Reassociation Key (TRN02) | 
1000A
| PayeeName | Payee Name (1000A, N102) | 
| PayeeID | Payee ID (1000A, N104) | 
1000B
| PayersName | Premium Payer’s Name (1000B, N102) | 
| PayersID | Premium Payer’s ID (1000B, N104) | 
2000
| RemittanceInfo | Remittance Information (2000, ENT01) | 
2100
| IndName | Individual Name (2100, NM103) | 
| IndID | Individual ID (2100, NM109) | 
2300
| IndRMRID | RMR Reference ID (2300, RMR02) | 
| IndRMRAmt | RMR Monetary Amount (2300, RMR04) | 
834-Specific Variables
These variables can be used only for an 834 custom report template
HEADER Section
| TSPurposeCode | Transaction set purpose code (BGN-01). | 
| ReferenceID | ReferenceID (BGN-02). | 
| CreationDate | Transaction set creation date (BGN-03). | 
| ActionCode | Action code (BGN-08). | 
1000A
| SponsorName | Plan sponsor name (N1-02). | 
| SponsorIDQual | Sponsor identification code qualifier (N1-03). | 
| SponsorID | Sponsor identifier (N1-04). | 
1000B
| PayerName | Payer (insurer) name (N1-02). | 
| PayerIDQual | Payer (insurer) identification code qualifier (N1-03). | 
| PayerID | Payer (insurer) identification code (N1-04). | 
1000C
| TPAName | TPA or broker name (N1-02). | 
| TPAQual | TPA or broker identification code qualifier (N1-03). | 
| TPAID | TPA or broker identification code (N1-04). | 
SUBSCRIBERHEADER Section
2000
| SubDepIndicator | Subscriber or insured indicator (INS-01). | 
| MbrRelCode | Individual relationship code (INS-02). | 
| MbrMaintTypeCode | Maintenance type code (INS-03). | 
| MbrMaintTypeCodeText | Description of the 834 Member MTC (Example: "Change" - Code 001). | 
| MbrBenefitStatus | Benefit status code (INS-05). | 
| SubID | Subscriber identifier (where REF-01 = OF/REF-02). | 
| MbrPolicyNum | Insured group or policy number (where REF01 = 1L/REF-02). | 
| MbrLevelQual | Applicable dates qualifier (DTP-01). | 
| MbrLevelDate | Status information effective date (DTP-03). | 
2100A
| MbrIDCode | Entity identifier code (NM1-01). | 
| MbrLName | Subscriber last name (NM1-03). | 
| MbrFName | Subscriber first name (NM1-04). | 
| MbrMName | Subscriber middle name (NM1-05). | 
| MbrName (Last, First Middle) | MbrLName, MbrFName MbrMName (Example: JOHNSON, BARBARA T). | 
| MbrIDQual | Identification code qualifier (NM1-08). | 
| MbrID | Subscriber identifier (NM1-09). | 
| MbrBirthDate | Member birth date (DMG-02). | 
| MbrGenderCode | Gender code (DMG-03). | 
DETAIL Section
2300
| CvrgMaintCode | Maintenance type code (HD-01). | 
| CvrgInsurCode | Insurance line code (HD-03). | 
| CvrgLevelQual | Maintenance date/time qualifier (DTP-01). | 
| CvrgLevelDate | Coverage period (DTP-03). | 
| CvrgPolicyNumQual | Coverage policy reference identification qualifier (REF-01). | 
| CvrgPolicyNum | Insured group or policy number (REF-02). | 
2310
| ProvIDCode | Provider entity identifier code (NM1-01). | 
| ProvLName | Provider last name or organization name (NM1-03). | 
| ProvFName | Provider (individual) first name (NM1-04). | 
| ProvMName | Provider (individual) middle name or initial (NM1-05). | 
| ProvName | (Last, First Middle) ProvLName, ProvFName ProvMName (Example: JOHNSON, BARBARA T). | 
| ProvIDQual | Provider identification code qualifier (NM1-08). | 
| ProvID | Provider identifier (NM1-09). | 
2320
| COBResponsibility | Payer responsibility sequence number code (COB-01). | 
| COBPolicyNum | Insured group or policy number (COB-02). | 
| COBBenefitCode | Coordination of benefits code (COB-03). | 
| COBName | Insurer name (N1-02). | 
| COBID | Provider organizational ID (N1-04). | 
| COBLevelQual | Coordination of benefits date/time qualifier (DTP-01). | 
| COBPolicyDate | Coordination of benefits date (DTP-03). | 
835-Specific Report Variables
These variables can be used only for an 835 custom report template.
HEADER Section
| TransHandleCode | Transaction Handling Code (BPR-01). | 
| TotalPmtAmt | Total Payment Amount (BPR-02). | 
| CreditDebitFlag | Credit/Debit Flag Code (BPR-03). | 
| PmtMethod | Payment Method Code (BPR-04). | 
| PmtFormat | Payment Format Code (BPR-05). | 
| OrigDFIQual | Originating DFI Qualifier (BPR-06). | 
| OrigDFIID | Originating DFI ID Number (BPR-07). | 
| OrigAcctQual | Originating Acct Qualifier (BPR-08). | 
| OrigAcctID | Originating Acct Number (BPR-09). | 
| OrigCoID | Originating Company ID (BPR-10). | 
| OrigCoSupplID | Originating Company Suppl Code (BPR-11). | 
| RecvDFIQual | Receiving DFI Qualifier (BPR-12). | 
| RecvDFIID | Receiving DFI ID Number (BPR-13). | 
| RecvAcctQual | Receiving Acct Qualifier (BPR-14). | 
| RecvAcctID | Receiving Acct Number (BPR-15). | 
| PmtDate | Payment Date (BPR-16). | 
| TraceType | Trace Type Code (TRN-01). | 
| TraceID | Ref ID (TRN-02). | 
| OrigCoIDTrn | Originating Company ID (TRN-03). | 
| OrigCoSupplIDTrn | Originating Company Suppl Code (TRN-04). | 
| RecvRefQual | Receiver Reference ID Qual (REF-01). | 
| RecvRefID | Receiver Reference ID (REF-02). | 
1000A
| PayerName | Payer Name (N1-02). | 
| PayerID | Payer ID (N1-04). | 
1000B
| PayeeName | Payee Name (N1-02). | 
| PayeeID | Payee ID (N1-04). | 
| PayeeAddlRefQual | Payee Additional Ref ID Qual (REF-01). | 
| PayeeAddlRefID | Payee Additional Ref ID (REF-02). | 
1000B (Receiver Name)
| ReceiverName | Receiver Name (1000B/NM103) | 
| ReceiverID | Receiver ID (1000B/NM109) | 
| ReceiverIDQual | Receiver ID Qualifier (1000B/NM108) | 
2000
| PmtProvID | Provider ID (TS3-01). | 
| FacType | Facility Type Code (TS3-02). | 
| FiscalEndDate | Fiscal Period End Date (TS3-03). | 
| TotalDRGAmt | Total Diagnosis Related Group (DRG) Amount (TS2-01). | 
| TotalFedAmt | Total Federal Specific Amount (TS2-02). | 
| TotalHospAmt | Total Hospital-specific Amount (TS2-03). | 
| TotalDispAmt | Total Disproportionate Amount (TS2-04). | 
| TotalCapAmt | Total Capital Amount (TS2-05). | 
| TotalEduAmt | Total Indirect Medical Education Amount (TS2-06). | 
| TotalOutlAmt | Total Day Outlier Amount (TS2-08). | 
| TotalDayCount | Total Cost Report Day Count (TS2-12). | 
| TotalMSPPassAmt | Total MSP Pass Through Amount (TS2-15). | 
| TotalPPSFedDRGAmt | Total PPS Capital, Federal-specific portion DRG Amount (TS2-17). | 
| TotalPPSHospDRGAmt | Total PPS Capital, Hospital-specific portion DRG Amount (TS2-18). | 
| TotalPPSDispHospDRGAmt | Total PPS Disproportionate Share, Hospital DRG Amount (TS2-19). | 
2010BB (Payer Name)
| PayerName2010BB | Payer Name (2010BB/NM103) | 
| PayerNameID | PayerNameID (2010BB/NM109) | 
| PayerNameSecondaryIDQual | Payer Name Secondary ID Qualifier (2010BB/REF02, where REF01=2U, EI, FY, or NF) | 
2100
| PatientControlID | Patient Control Number (CLP-01). | 
| ClaimStatusCode | Claim Status Code (CLP-02). | 
| ClaimChgAmt | Total Claim Charge Amount (CLP-03). | 
| ClaimPmtAmt | Claim Payment Amount (CLP-04). | 
| ClaimPatRespAmt | Patient Responsibility Amount (CLP-05). | 
| ClaimFilingCode | Claim Filing Indicator Code (CLP-06). | 
| ClaimControlID | Payer Claim Control Number (CLP-07). | 
| ClaimFacType | Facility Type Code (CLP-08). | 
| ClaimFreq | Claim Frequency Code (CLP-09). | 
| ClaimDRGCode | Diagnosis Related Group (DRG) Code (CLP-11). | 
| ClaimDRGWt | Diagnosis Related Group (DRG) Weight (CLP-12). | 
| ClaimDischFrac | Discharge Fraction (CLP-13). | 
2100 CAS
| ClaimAdjTotalAmt | Sum of Adjustment Amounts (CAS-03+CAS-06+CAS-09+CAS-12+CAS-15+CAS-18). | 
| ClaimLifeResDays | Lifetime Reserve Days (MIA-02). | 
| ClaimDRGAmt | Diagnosis Related Group (DRG) Amount (MIA-04). | 
| ClaimDispAmt | Disproportionate Share Amount (MIA-06). | 
| ClaimMSPPassAmt | Medicare Secondary Payer (MSP) Pass-through Amount (MIA-07). | 
| ClaimPPSCapAmt | Total Prospective Payment System (PPS) Capital Amount (MIA-08). | 
| ClaimPPSFedDRGAmt | Prospective Payment System (PPS) Federal DRG Amount (MIA-09). | 
| ClaimPPSHospDRGAmt | Prospective Payment System (PPS) Hospital DRG Amount (MIA-10). | 
| ClaimPPSDispHospDRGAmt | Prospective Payment System (PPS) Hospital Disproportionate Share DRG Amount (MIA-11). | 
| ClaimDayCount | Cost Report Days (MIA-15). | 
| ClaimFedDRGAmt | Federal DRG Amount (MIA-16). | 
| ClaimIndTeachAmt | Indirect Teaching Amount (MIA-18). | 
2110
| SvcProcCode | Procedure Code (SVC-0102). | 
| SvcChgAmt | Line Item Charge Amount (SVC-02). | 
| SvcPmtAmt | Line Item Paid Amount (SVC-03). | 
2110 CAS
| SvcAdjTotalAmt | Sum of Adjustment Amounts (CAS-03, 06, 09, 12, 15, 18). | 
PLB
| TotalNonClaimAdj | Non-Claim Adjustment Total (Sum PLB-04, 06, 08, 10, 12, 14). | 
| PLBReferenceID | Provider reference ID. | 
| PLBDate | Fiscal period date, in CCYYMMDD. | 
| PLBAdjustmentCode1 | Adjustment reason code 1. | 
| PLBAdjustmentRefID1 | Adjustment reference ID 1. | 
| PLBMonetaryAmount1 | Amount of adjustment 1. | 
| PLBAdjustmentCode2 | Adjustment reason code 2. | 
| PLBAdjustmentRefID2 | Adjustment reference ID 2. | 
| PLBMonetaryAmount2 | Amount of adjustment 2. | 
| PLBAdjustmentCode3 | Adjustment reason code 3. | 
| PLBAdjustmentRefID3 | Adjustment reference ID 3. | 
| PLBMonetaryAmount3 | Amount of adjustment 3. | 
| PLBAdjustmentCode4 | Adjustment reason code 4. | 
| PLBAdjustmentRefID4 | Adjustment reference ID 4. | 
| PLBMonetaryAmount4 | Amount of adjustment 4. | 
| PLBAdjustmentCode5 | Adjustment reason code 5. | 
| PLBAdjustmentRefID5 | Adjustment reference ID 5. | 
| PLBMonetaryAmount5 | Amount of adjustment 5. | 
| PLBAdjustmentCode6 | Adjustment reason code 6. | 
| PLBAdjustmentRefID6 | Adjustment reference ID 6. | 
| PLBMonetaryAmount6 | Amount of adjustment 6. | 
837-Specific Report Variables
These variables can be used only for an 837 custom report template
HEADER Section
| TransTypeIDQ | Transmission type ID qualifier (REF-01 in Table 1, position 015). | 
| TransTypeID | Transmission type ID (REF-02 in Table 1, position 015). | 
| BusAppId | Contents of the BHT-03. | 
| BusAppDate | Contents of the BHT-04 in MM-DD-YYYY format. | 
| BusAppTime | Contents of the BHT-05 in HH:MM format. | 
DETAIL or TRAILER Section
| BCBSClaimID | BCBS Claim ID (REF02 when REF01 = "D9"). | 
| ClaimCnt_byTS | Number of claims encountered so far in this transaction set. Resets at the beginning of each transaction set. | 
| ClaimCntGood_byTS | Number of good claims encountered so far in this transaction set. Resets at the beginning of each transaction set. | 
| ClaimCntBad_byTS | Number of bad claims encountered so far in this transaction set. Resets at the beginning of each transaction set. | 
| ClaimAmt_byTS | Total claim amount (CLM-02) in dollars and cents so far in this transaction set. Resets at the beginning of each transaction set. | 
| ClaimAmtGood_byTS | Total good claim amount (CLM-02) in dollars and cents so far in this transaction set. Resets at the beginning of each transaction set. | 
| ClaimAmtBad_byTS | Total bad claim amount (CLM-02) in dollars and cents so far in this transaction set. Resets at the beginning of each transaction set. | 
| ClaimPercentGood_byTS | Percent of claims that are good in this transaction set; includes one decimal place. Example: 60.0. | 
| ClaimPercentBad_byTS | Percent of claims that are bad in this transaction set; includes one decimal place. Example: 40.0. | 
| ClaimBillType | Concatenated CLM0501 and CLM0503. This is a customized bill type code. | 
| BCBSClaimID | BCBS Claim ID (REF02 when REF01 = "D9"). | 
| NonBCBSClaimID | Non-BCBS Claim ID (REF03 when REF01 = "D9"). | 
1000B (Payer)
| PayerName | Name (1000B/NM1-03). | 
| PayerID | ID (1000B/NM1-09). | 
| PayerIDQual | ID qualifier (1000B/NM1-08). | 
1000B (Receiver Name)
| ReceiverName | Receiver Name (1000B/NM103) | 
| ReceiverID | Receiver ID (1000B/NM109) | 
| ReceiverIDQual | Receiver ID Qualifier (1000B/NM108) | 
Secondary Payer
| SecPayerName | Secondary Payer name. | 
| SecPayerID | Secondary Payer ID. | 
| SecPayerIDQual | Secondary Payer ID Qualifier. | 
2010BB (Payer Name)
| PayerName2010BB | Payer Name (2010BB/NM103) | 
| PayerNameID | PayerNameID (2010BB/NM109) | 
| PayerNameSecondaryIDQual | Payer Name Secondary ID Qualifier (2010BB/REF02, where REF01=2U, EI, FY, or NF) | 
Secondary Payer
| SecPayerID | Secondary Payer ID (2010BB/REF01) | 
| SecPayerIDQual | Secondary Payer ID Qualifier (2010BB/NM108) | 
Payer Routing Indicator
| PayerRI | Payer Routing Indicator. | 
1000A (Trading Partner)
| TPName | Name (1000A/NM1-03). | 
| TPID | ID (1000A/NM1-09). | 
| TPIDQual | ID qualifier (1000A/NM1-08). | 
2000A (Provider)
Provider identification information (variables starting with PROV) comes from the Pay-to Provider loop (2010AB) if the 2010AB NM109 contains an ID. Otherwise, it comes from the 2010AA loop.
| ProvLName | Last name (2010AB or 2010AA/NM1-03). | 
| ProvFName | First name (2010AB or 2010AA/NM1-04). | 
| ProvMName | Middle name (2010AB or 2010AA/NM1-05). | 
| ProvName | Provider name in ‘Last, First Middle’ format. | 
| ProvID | ID (2010AB or 2010AA/NM1-09). | 
| ProvIDQual | ID qualifier (2010AB or 2010AA/NM1-08). | 
| ProvSecID | Secondary ID (2010AB or 2010AA/REF-02). | 
| ProvSecIDQual | Secondary ID qualifier (2010AB or 2010AA/ REF-01). | 
| ClaimAmt_byProv | Total in CLM-02 for all claims in this 2000A loop. Put this in the PROVTRAILER section, before the TRAILER section. | 
| ClaimAmtBad_byProv | Total in CLM-02 for bad claims in this 2000A loop. Put this before the PROVTRAILER section. | 
| ClaimAmtGood_byProv | Total in CLM-02 for good claims in this 2000A loop. Put this before the PROVTRAILER section. | 
| ClaimCnt_byProv | Number of claims in this 2000A loop. Put this in the PROVTRAILER section. | 
| ClaimCntGood_byProv | Number of good claims in this 2000A loop. Put this in the PROVTRAILER section. | 
| ClaimCntBad_byProv | Number of bad claims in this 2000A loop. Put this in the PROVTRAILER section. | 
| ClaimPercentGood_byProv | Percent of claims that are good in this 2000A loop. Put this in the PROVTRAILER section. | 
| ClaimPercentBad_byProv | Percent of claims that are bad in this 2000A loop. Put this in the PROVTRAILER section. | 
2010AA (Billing Provider)
| BillProvLName | Last name (2010AA/NM1-03). | 
| BillProvFName | First name (2010AA/NM1-04). | 
| BillProvMName | Middle name (2010AA/NM1-05). | 
| BillProvName | Billing Provider name in ‘Last, First Middle’ format. | 
| BillProvID | ID (2010AA/NM1-09). | 
| BillProvIDQual | ID qualifier (2010AA/NM1-08). | 
| BillProvSecID | Secondary ID (2010AA/REF-02). | 
| BillProvSecIDQual | Secondary ID qualifier (2010AA/REF-01). | 
2010AB (Pay-To Provider)
| PayProvLName | Last name (2010AB/NM1-03). | 
| PayProvFName | First name (2010AB/NM1-04). | 
| PayProvMName | Middle name (2010AB/NM1-05). | 
| PayProvName | Pay-To Provider name in ‘Last, First Middle’ format. | 
| PayProvID | ID (2010AB/NM1-09). | 
| PayProvIDQual | ID qualifier (2010AB/NM1-08). | 
| PayProvSecID | Secondary ID (2010AB/REF-02). | 
| PayProvSecIDQual | Secondary ID qualifier (2010AB/REF-01). | 
2010BA (Subscriber)
| SubLName | Last name (2010BA/NM1-03). | 
| SubFName | First name (2010BA/NM1-04). | 
| SubMName | Middle name (2010BA/NM1-05). | 
| SubName | Subscriber name in ‘Last, First Middle’ format. | 
| SubID | ID (2010BA/NM1-09). | 
| SubIDQual | ID qualifier (2010BA/NM1-08). | 
| SubPropProvID | Proprietary Provider ID (2010BB REF for Billing Provider Secondary Identification) | 
2010CA (Dependent)
| DepLName | Last name (2010CA/NM1-03). | 
| DepFName | First name (2010CA/NM1-04). | 
| DepMName | Middle name (2010CA/NM1-05). | 
| DepName | Dependent name in ‘Last, First Middle’ format. | 
| DepID | ID (2010CA/NM1-09). | 
| DepIDQual | ID qualifier (2010CA/NM1-08). | 
Patient
The patient is the subscriber or the dependent, depending on where the claim occurred
| PatLName | Last name (2010xA/NM1-03). | 
| PatFName | First name (2010xA/NM1-04). | 
| PatMName | Middle name (2010xA/NM1-05). | 
| PatName | Patient name in ‘Last, First Middle’ format. | 
| PatID | ID (2010xA/NM1-09). | 
| PatIDQual | ID qualifier (2010xA/NM1-08). | 
| PatBday | Patient Birth Day (2010xA/DMG-02). | 
| PatGender | Patient Gender (2010xA/DMG-03). | 
| PatRelship | Patient Relationship (SBR-02). | 
2300
| ClaimID | Claim number (CLM-01). | 
| ClaimAmt | Total Amount (CLM-02). | 
| ClaimFacCode | Facility Code Value (CLM5-01). | 
| ClaimCHID | Claim Identification Number for Clearing Houses and Other Transmission Intermediaries (REF-02 when REF-01=D9). | 
| ClaimICDN | ICDN (REF-02 when REF-01 = F8). | 
| ClaimMRN | Medical Record number (REF-02 when REF-01 = EA). | 
| ClaimDate | Claim date. | 
| ClaimStatus | Claim contains one of these: Good     no errors or warnings See on page for definitions of errors and warnings. | 
2310A (For 837P and 837D, this is Referring Provider. For 837I, this is Attending Physician. The following variables work for all three types of 837)
| ReferProvName | Referring/attending name in ‘Last, First Middle’ format. | 
| ReferProvLName | Last name (2310A/NM1-03). | 
| ReferProvFName | First name (2310A/NM1-04). | 
| ReferProvMName | Middle name (2310A/NM1-05). | 
| ReferProvID | ID (2310A/NM1-09). | 
| ReferProvIDQual | ID qualifier (2310A/NM1-08). | 
| ReferProvSecID | Secondary ID qualifier (2310A/REF-01). | 
| ReferProvSecIDQual | Secondary ID (2310A/REF-02). | 
2330A
| ClaimOtherNameID | NM1-09 in loop 2330A Other Subscriber Name. | 
| OtherSubNameID | Other Subscriber Name ID (2330A/NM109). | 
2330B
| ClaimOtherPayerSecId | REF-02 in loop 2330B Other Payer Name. See also CobaClaimOtherPayerSecId. | 
| CobaClaimOtherPayerSecId | REF-02 in loop 2330B Other Payer Secondary Identifier- only if REF-01=F8. | 
| OtherPayerControlNumber | Other Payer Control Number (2330B/REF02, where REF01=F8) | 
| OtherPayerNameSecID | Other Payer Name (2330B/REF02, where REF01= 2U, EI, FY or NF) OtherPayerControlNumber (2330B/REF02, where REF01=F8) | 
2400
| SVCDiagPointer1 | Primary diagnosis code (SV107-01) | 
| SVCDiagPointer2 | Second diagnosis code (SV107-02) | 
| SVCDiagPointer3 | Third diagnosis code (SV107-03) | 
| SVCDiagPointer4 | Fourth diagnosis code (SV107-04) | 
Service
Service variables really represent lists of values, since a claim may have more than one. If so, subsequent occurrences appear on another line.
| SvcID | Service ID (2400/SV1-01.02 (P), 2400/SV2-01 (I), 2400/SV3-01.02 (D)). | 
| SvcIDQual | ID qualifier. | 
| SvcLine | Service Line number. | 
| SvcChgAmt | Line Charge Amount. | 
| SvcQty | Quantity. | 
| SvcMod1 | Modifier 1. | 
| SvcMod2 | Modifier 2. | 
| SvcMod3 | Modifier 3. | 
| SvcMod4 | Modifier 4. | 
| SvcDateQual | Service date qualifier. | 
| SvcDate | Service date. | 
| ClaimFirstSrvDate | The earliest data in a service line for this claim (2400/DTP-03). | 
| ClaimLastSrvDate | The latest data in a service line for this claim (2400/DTP-03). | 
ISATRAILER Section
These values can be used in the .ISATRAILER section. Values may be uninitialized if used in other report sections. Multiple values are presented in table format.
| ClaimAmt_ByISARI | Total amount for all claims, per unique Routing ID. | 
| ClaimAmtBad_ByISARI | Claim amount totals for all bad claims, collated by unique Routing ID. | 
| ClaimAmtGood_ByISARI | Claim amount totals for all good claims, collated by unique Routing ID. | 
| ClaimCnt_ByISARI | Total count of all claims, per unique Routing ID. | 
| ClaimCntBad_ByISARI | Number of bad claims per unique Routing ID. | 
| ClaimCntGood_ByISARI | Number of good claims per unique Routing ID. | 
| ClaimPctBad_ByISARI | Percent of bad claims vs. total claims, per unique Routing ID. | 
| ClaimPctGood_ByISARI | Percent of good claims vs. total claims, per unique Routing ID. | 
| ISARI | List of all Routing ID seen within the ISA. | 
GROUPTRAILER section
Group values
These group values can be used in the 837 .GROUPTRAILER section. Values may be uninitialized if used in other report sections. Multiple values are presented in table format.
ClaimAmt_ByGroupRI Total amount for all claims, per unique Routing ID.
ClaimAmtBad_ByGroupRI    
Claim amount totals for all bad claims, collated by unique Routing ID.
ClaimAmtGood_ByGroupRI
Claim amount totals for all good claims, collated by unique Routing ID.
ClaimCnt_ByGroupRI Total count of all claims, per unique Routing ID.
ClaimCntBad_ByGroupRI    
Number of bad claims per unique Routing ID.
ClaimCntGood_ByGroupRI    
Number of good claims per unique Routing ID.
ClaimPctGood_ByGroupRI    
Percent of good claims vs. total claims, per unique Routing ID.
ClaimPctBad_ByGroupRI    
Percent of bad claims vs. total claims, per unique Routing ID.
GroupRI List of all Routing Indicators seen within the ISA.
TRAILER section
Transaction Set values
These Transaction Set values can be used in the 837 .TRAILER section. Values may be uninitialized if used in other report sections. Multiple values are presented in table format.
| BCBSClaimID | BCBS Claim ID (REF02 when REF01 = "D9"). | 
| ClaimAmt_BySetRI | Total amount for all claims, per unique Routing ID. | 
| ClaimAmtBad_BySetRI | Claim amount totals for all bad claims, collated by unique Routing ID. | 
| ClaimAmtGood_BySetRI | Claim amount totals for all good claims, collated by unique Routing ID. | 
| ClaimCnt_BySetRI | Total count of all claims, per unique Routing ID. | 
| ClaimCntBad_BySetRI | Number of bad claims per unique Routing ID. | 
| ClaimCntGood_BySetRI | Number of good claims per unique Routing ID. | 
| ClaimPctBad_BySetRI | Percent of bad claims vs. total claims, per unique Routing ID. | 
| ClaimPctGood_BySetRI | Percent of good claims vs. total claims, per unique Routing ID. | 
| NonBCBSClaimID | Non-BCBS Claim ID (REF03 when REF01 = "D9"). | 
| SetRI | List of all Routing ID’s seen within the ISA. | 
Troubleshooting Custom Reports
The most common causes for custom report failures:
| Symptom: | No custom report is generated | 
|---|---|
| Probable cause: | The guideline used for validation was not a GuidelinePlus and did not create the necessary SVALU records. See ForesightHIPAAguidelinelist.pdf. | 
| Symptom: | No data for a variable | 
| Probable cause: | The template variable was used before it was encountered. Move the affected variables down into the proper section. For details, refer Template Variables | 







