000100******************************************************************
000200*   This is the BILL-RECORD that will be passed to and returned  *
000300*   from the ESCALxx program.                                    *
000400* 6-15-17 added B-PAYER-ONLY-VC-Q8 for FY18 and TDAPA            *
000500* 8-24-17 added TDAPA-RETURN for FY18 and TDAPA                  *
000600* 10-03-17 added comment about BUNDLED-TEST-INDIC                *
000700******************************************************************
000800*INPUT to the Calculating subroutine from the Driver subroutine. *
000900******************************************************************
001000
001100 01  BILL-NEW-DATA.
001200     05  BILL-PORTION.
001300         10  B-COND-CODE            PIC X(02).
001400         10  B-REV-CODE.
001500             15  B-REV-CODE3        PIC X(03).
001600             15  FILLER             PIC X(01).
001700         10  B-PATIENT-HGT          PIC 9(07)V9(02).
001800         10  B-PATIENT-HEIGHT  REDEFINES  B-PATIENT-HGT
001900                                    PIC 9(09).
002000         10  B-PATIENT-WGT          PIC 9(07)V9(02).
002100         10  B-PATIENT-WEIGHT  REDEFINES  B-PATIENT-WGT
002200                                    PIC 9(09).
002300         10  B-THRU-DATE.
002400             15  B-THRU-CCYY        PIC 9(04).
002500             15  B-THRU-MM          PIC 9(02).
002600             15  B-THRU-DD          PIC 9(02).
002700         10  B-DOB-DATE.
002800             15  B-DOB-CCYY         PIC 9(04).
002900             15  B-DOB-MM           PIC 9(02).
003000             15  B-DOB-DD           PIC 9(02).
003100         10  FILLER                 PIC X(20).
003200     05  PROVIDER-SPECIFIC-FILE-PORTION.
003300         10  P-NPI                  PIC X(08).
003400         10  P-NPI-FILLER           PIC X(02).
003500         10  P-PROV-OSCAR           PIC X(06).
003600         10  P-GEO-MSA              PIC X(04).
003700         10  P-GEO-CBSA             PIC X(05).
003800         10  P-SPEC-PYMT-IND        PIC X(01).
003900         10  P-PROV-TYPE            PIC X(02).
004000         10  P-SPEC-WAGE-INDX       PIC 9(02)V9(04).
004100         10  P-ESRD-RATE            PIC 9(07)V9(02).
004200         10  P-PROV-WAIVE-BLEND-PAY-INDIC
004300                                    PIC X(01).
004400         10  P-PROV-LOW-VOLUME-INDIC
004500                                    PIC X(01).
004600         10  P-PACIFIC-IS-TRUST-TERR
004700                                    PIC X(01).
004800         10  P-QIP-REDUCTION        PIC X(01).
004900         10  FILLER                 PIC X(15).
005000         10  OLD-TEST-INDICATOR     PIC X(01).
005100             88  OLD-TEST-CASE               VALUE 'T'.
005200         10  FILLER                 PIC X(23).
005300     05  BUNDLED-BILL-PORTION.
005400         10  B-CLAIM-NUM-DIALYSIS-SESSIONS
005500                                    PIC 9(02).
005600         10  B-LINE-ITEM-DATE-SERVICE.
005700             15  B-LINE-ITEM-DT-SVC-CCYY
005800                                    PIC 9(04).
005900             15  B-LINE-ITEM-DT-SVC-MM
006000                                    PIC 9(02).
006100             15  B-LINE-ITEM-DT-SVC-DD
006200                                    PIC 9(02).
006300         10  B-DIALYSIS-START-DATE.
006400             15  B-DIALYSIS-START-DT-CCYY
006500                                    PIC 9(04).
006600             15  B-DIALYSIS-START-DT-MM
006700                                    PIC 9(02).
006800             15  B-DIALYSIS-START-DT-DD
006900                                    PIC 9(02).
007000         10  B-TOT-PRICE-SB-OUTLIER PIC 9(07)V9(02).
007100         10  B-PAYER-ONLY-VC-Q8     PIC 9(07)V9(04).
007200         10  FILLER                 PIC X(29).
007300     05  COMORBIDITIES-PORTION.
007400         10  COMORBID-DATA    OCCURS 6 TIMES
007500                INDEXED BY COMORBID-INDEX
007600                                    PIC X(02).
007700         10  COMORBID-RECURRENCE-COND-CODE
007800                                    PIC X(02).
007900         10  COMORBID-CWF-RETURN-CODE
008000                                    PIC X(02).
008100           88  VALID-COMORBID-CWF-RETURN-CD   VALUE '10',
008200                                                    '20',
008300                                                    '30',
008400                                                    '40',
008500                                                    '50',
008600                                                    '60',
008700                                                    '70'.
008800*  The following variables are from the old pricer and are used fo
008900*testing purposes, displaying within the manager main program what
009000*went on in the calculating subroutine.
009100*Ther were removed from their old location to simplify matters and
009200*are inserted here in the exact same order that they appeared in o
009300*pricers.  The variable names have been kept the same so as to min
009400*recoding when inserting this linkage section into the old pricers
009500*'bring them up to the 2011 record layout standards'.  They origin
009600*were redefining filler items (which they kind of still do, only n
009700*are inserted in the middle of the large filler area at the end of
009800*this record layout).  This filler area will eventually be used in
009900*up coming pricers, perhaps for the 25 ICD-10 procedure codes but
010000*hopefully after this bundled pricer gets settled down.
010100*Their level numbers have changed but nothing else.
010200*FISS does not receive these fields
010300     05  BILL-DATA-TEST.
010400         10  DRUG-ADD-ON-RETURN     PIC 9(01)V9(04).
010500         10  MSA-WAGE-ADJ           PIC 9(04)V9(02).
010600         10  COMP-CBSA-WAGE-ADJ   REDEFINES MSA-WAGE-ADJ
010700                                    PIC 9(04)V9(02).
010800         10  CBSA-WAGE-ADJ          PIC 9(04)V9(02).
010900         10  BUND-CBSA-WAGE-ADJ   REDEFINES CBSA-WAGE-ADJ
011000                                    PIC 9(04)V9(02).
011100         10  CBSA-WAGE-PMT-RATE     PIC 9(04)V9(02).
011200         10  COND-CD-73.
011300             15  FILLER             PIC X(01).
011400             15  AMT-INDIC          PIC X(01).
011500             15  FILLER             PIC X(01).
011600             15  BLOOD-DOLLAR       PIC 9(02).
011700             15  FILLER             PIC X(03).
011800         10  COND-CD-74           REDEFINES  COND-CD-73.
011900             15  HEMO-CCPD-CAPD     PIC 9(02)V9(06).
012000         10  AGE-RETURN             PIC 9(03).
012100         10  MSA-WAGE-AMT           PIC S9(04)V9(02).
012200         10  CBSA-WAGE-INDEX        PIC S9(02)V9(04).
012300         10  LABOR-PCT              PIC 9(01)V9(05).
012400         10  PPS-BMI                PIC 9(03)V9(04).
012500         10  PPS-BSA                PIC 9(03)V9(04).
012600         10  MSA-PCT                PIC 9(01)V9(02).
012700         10  CBSA-PCT               PIC 9(01)V9(02).
012800         10  COM-CBSA-PCT-BLEND     PIC 9(01)V9(02).
012900         10  BUN-CBSA-PCT-BLEND     PIC 9(01)V9(02).
013000         10  CASE-MIX-FCTR-ADJ-RATE PIC 9(07)V9(02).
013100* Bundled data (i.e. new PPS data)
013200         10  BUN-BSA                PIC 9(03)V9(04).
013300         10  BUN-BMI                PIC 9(03)V9(04).
013400         10  BUN-ONSET-FACTOR       PIC 9(01)V9(04).
013500         10  BUN-COMORBID-MULTIPLIER
013600                                    PIC 9(01)V9(03).
013700         10  BUN-WAGE-ADJ-TRAINING-AMT
013800                                    PIC 9(04)V9(04).
013900         10  BUN-LOW-VOL-MULTIPLIER PIC 9(01)V9(03).
014000         10  FILLER                 PIC X(18).
014100* Outlier data
014200         10  OUT-AGE-FACTOR         PIC 9(01)V9(03).
014300         10  OUT-BSA                PIC 9(03)V9(04).
014400         10  OUT-BSA-FACTOR         PIC 9(01)V9(04).
014500         10  OUT-BMI                PIC 9(03)V9(04).
014600         10  OUT-BMI-FACTOR         PIC 9(01)V9(04).
014700         10  OUT-ONSET-FACTOR       PIC 9(01)V9(04).
014800         10  OUT-COMORBID-MULTIPLIER
014900                                    PIC 9(01)V9(03).
015000         10  OUT-LOW-VOL-MULTIPLIER PIC 9(01)V9(03).
015100         10  OUT-ADJ-AVG-MAP-AMT    PIC 9(03)V9(02).
015200         10  OUT-LOSS-SHARING-PCT   PIC 9(01)V9(02).
015300         10  OUT-IMPUTED-MAP        PIC 9(04)V9(04).
015400         10  OUT-FIX-DOLLAR-LOSS    PIC 9(04)V9(02).
015500         10  OUT-PREDICTED-MAP      PIC 9(07)V9(04).
015600         10  OUT-PREDICTED-SERVICES-MAP
015700                                    PIC 9(02)V9(04).
015800
016100*ESRD PC PRICER NEEDS BUNDLED-TEST-INDIC SET TO "T" IN ORDER TO BE ABLE
016200*TO PASS VALUES FOR DISPLAYING DETAILED RESULTS FROM BILL-DATA-TEST.
016300*BUNDLED-TEST-INDIC IS NOT SET TO "T"  IN THE PRODUCTION SYSTEM (FISS).
016400     05  BUNDLED-TEST-INDIC         PIC X(01).
016500       88  BUNDLED-TEST                       VALUE 'T'.
016600
016700******************************************************************
016800*OUTPUT from Calculating subroutine returned the Driver program. *
016900******************************************************************
017000
017100 01  PPS-DATA-ALL.
017200     05  PPS-RTC                    PIC 9(02).
017300     05  PPS-DATA.
017400         10  PPS-MSA                PIC X(04).
017500         10  PPS-CBSA               PIC X(05).
017600         10  PPS-WAGE-ADJ-RATE      PIC 9(04)V9(02).
017700         10  PPS-FINAL-PAY-AMT      PIC 9(07)V9(02).
017800         10  PPS-CALC-VERS-CD       PIC X(05).
017900         10  PPS-COND-CODE          PIC X(02).
018000         10  PPS-REV-CODE           PIC X(04).
018100         10  PPS-2011-WAGE-ADJ-RATE PIC 9(04)V9(02).
018200         10  PPS-2011-NAT-LABOR-PCT PIC 9(01)V9(05).
018300         10  PPS-2011-NAT-NONLABOR-PCT
018400                                    PIC 9(01)V9(05).
018500         10  FILLER                 PIC X(02).
018600     05  PPS-OTHER-DATA.
018700         10  PPS-NAT-LABOR-PCT      PIC 9(01)V9(05).
018800         10  PPS-NAT-NONLABOR-PCT   PIC 9(01)V9(05).
018900         10  PPS-AGE-FACTOR         PIC 9(01)V9(03).
019000         10  PPS-BSA-FACTOR         PIC 9(01)V9(04).
019100         10  PPS-BMI-FACTOR         PIC 9(01)V9(04).
019200         10  PPS-BDGT-NEUT-RATE     PIC 9(01)V9(04).
019300         10  PPS-2011-AGE-FACTOR    PIC 9(01)V9(03).
019400         10  PPS-2011-BSA-FACTOR    PIC 9(01)V9(04).
019500         10  PPS-2011-BMI-FACTOR    PIC 9(01)V9(04).
019600         10  PPS-2011-BDGT-NEUT-RATE
019700                                    PIC 9(01)V9(04).
019800         10  FILLER                 PIC X(01).
019900     05  PPS-BUNDLED-DATA.
020000         10  PPS-2011-COMORBID-DATA.
020100             15  PPS-2011-COMORBID-MA
020200                                    PIC X(02).
020300             15  PPS-2011-COMORBID-MA-CC
020400                                    PIC X(02).
020500             15  PPS-2011-COMORBID-PAY
020600                                    PIC X(02).
020700             15  FILLER             PIC X(24).
020800         10  PPS-2011-FULL-COMP-RATE
020900                                    PIC 9(07)V9(02).
021000         10  PPS-2011-BLEND-COMP-RATE
021100                                    PIC 9(07)V9(02).
021200         10  PPS-2011-FULL-PPS-RATE
021300                                    PIC 9(07)V9(02).
021400         10  PPS-2011-BLEND-PPS-RATE
021500                                    PIC 9(07)V9(02).
021600         10  PPS-2011-FULL-OUTLIER-RATE
021700                                    PIC 9(07)V9(02).
021800         10  PPS-2011-BLEND-OUTLIER-RATE
021900                                    PIC 9(07)V9(02).
022000     05  MSA-ADJ-YEAR-AMT           PIC 9(04)V9(02).
022100     05  PPS-LOW-VOL-AMT         REDEFINES MSA-ADJ-YEAR-AMT
022200                                    PIC 9(04)V9(02).
022300     05  OUT-CASE-MIX-PREDICTED-MAP PIC 9(04)V9(04).
022400     05  OUT-HEMO-EQUIV-DIAL-SESSIONS
022500                                    PIC 9(02)V9(04).
022600     05  OUT-SB-BSA                 PIC 9(01)V9(03).
022700     05  OUT-SB-BMI                 PIC 9(01)V9(03).
022800     05  A-49-CENT-DRUG-ADJ         PIC 9(01)V9(02).
022900     05  PPS-CM-BSA                 PIC 9(01)V9(03).
023000     05  PPS-CM-BMI-LT-18-5         PIC 9(01)V9(03).
023100     05  PPS-BUN-BASE-PMT-RATE      PIC 9(04)V9(02).
023200     05  BUN-ADJUSTED-BASE-WAGE-AMT PIC 9(07)V9(04).
023300     05  CR-BSA-MULTIPLIER          PIC 9(01)V9(03).
023400     05  CR-BMI-MULTIPLIER          PIC 9(01)V9(03).
023500     05  PPS-BUN-CBSA-W-INDEX       PIC 9(02)V9(04).
023600     05  PPS-BUN-WAGE-ADJ-TRAIN-AMT PIC 9(07)V9(04).
023700     05  PPS-TRAINING-ADD-ON-PMT-AMT
023800                                    PIC 9(02)V9(02).
023900     05  OUT-NON-PER-DIEM-PAYMENT   PIC 9(07)V9(04).
024000     05  COM-PAYMENT-RATE           PIC 9(04)V9(02).
024100     05  TDAPA-RETURN               PIC 9(07)V9(04).
024200     05  FILLER                     PIC X(091).
