IBCEMSR3  ;BI/ALB - non-MRA PRODUCTIVITY REPORT ;02/14/11
 ;;2.0;INTEGRATED BILLING;**447**;21-MAR-94;Build 80
 ;;Per VHA Directive 2004-038, this routine should not be modified.
 ;
 Q
 ;
COLLECT2  ; Accumulate information for the Detailed Report
 Q:$D(^TMP($J,"IBCEMSR2","FFORM",IBIFN))                ; Count each CLAIM/BILL only once
 S ^TMP($J,"IBCEMSR2","FFORM",IBIFN)=""                 ; Record CLAIM/BILL use
 I IBOB(.21)="P" D                                      ; Primary
 . I $$PROCSSED^IBCEMSR5(IBIFN) D                       ;   Processed 
 .. D FFORM("FPA",1)                                    ;     Total Number of Processes Requests
 .. I ((IBOB(35)=2)!(IBOB(35)=3)) D                     ;       Auto-processed to secondary
 ... D FFORM("FPAA",1)                                  ;         Total Number auto-processed to secondary
 ... I IBOB(35)=2 D                                     ;           Printed Locally
 .... D FFORM("FPAAA",1)                                ;             Number Printed Locally
 .... D FFORM("FPAAA1",$G(IBOBS(201))-$G(IBOBS(218)))   ;               Total Secondary Charges
 ... I IBOB(35)=3 D                                     ;           Transmitted
 .... D FFORM("FPAAB",1)                                ;             Number Transmitted
 .... D FFORM("FPAAB1",$G(IBOBS(201))-$G(IBOBS(218)))   ;               Total Secondary Charges
 .. I ((IBOB(35)=1)!(IBOB(35)=4)) D                     ;       Sent to Worklist
 ... D FFORM("FPAB",1)                                  ;         Total Number Sent to Worklist
 ... I IBOB(38)="PC" D                                  ;           Processed from worklist
 .... D FFORM("FPABA",1)                                ;             Number processed from worklist
 .... D FFORM("FPABA1",$G(IBOBS(201))-$G(IBOBS(218)))   ;               Total secondary charges
 ... I IBOB(38)="RM" D                                  ;           Removed from worklist
 .... D FFORM("FPABB",1)                                ;             Number removed from worklist
 .... D FFORM("FPABB1",$$TOT^IBCECOB2(IBIFN,1))         ;               Total secondary charges
 ... I IBOB(38)="CA" D                                  ;           Cancelled from worklist
 .... D FFORM("FPABC",1)                                ;             Number cancelled from worklist
 .... D FFORM("FPABC1",$$TOT^IBCECOB2(IBIFN,1))         ;               Total secondary charges
 ... I IBOB(35)=1 D                                     ;           Still on worklist
 .... D FFORM("FPABD",1)                                ;             Number still on worklist
 .... D FFORM("FPABD1",$$TOT^IBCECOB2(IBIFN,1))         ;               Total secondary charges
 .. I $$NOSUB^IBCEMSR5(IBIFN),$P($$BILL^RCJIBFN2(IBIFN),U,2)=22 D  ;  Number without secondary
 ... D FFORM("FPWOS",1)                                 ;         Total number w/out secondary
 .. ;DBIA 1452  ;  Number of EEOBs not collected/closed
 .. I '((IBOB(35)=1)!(IBOB(35)=4)),$$NOSUB^IBCEMSR5(IBIFN),$P($$BILL^RCJIBFN2(IBIFN),U,2)'=22 D
 ... D FFORM("FPNCC",1)                                 ;         Total Number of EEOBs not collected/closed
 . I $$DENIED^IBCEMSR5(IBIFN) D                         ;   Denied
 .. D FFORM("FPB",1)                                    ;     Total Number of Denied Requests
 .. I IBOB(35)=1 D                                      ;           Still on worklist
 ... D SFORM("FPSOW",1)                                 ;             Number still on worklist
 .. I IBOB(38)="PC" D                                   ;           Processed from worklist
 ... D FFORM("FPBXD",1)                                 ;             Number processed from worklist
 .. I IBOB(38)="RM" D                                   ;           Removed from worklist
 ... D FFORM("FPBXA",1)                                 ;             Number removed from worklist
 .. I IBOB(38)="CA" D                                   ;           Cancelled from worklist
 ... D FFORM("FPBXE",1)                                 ;             Number cancelled from worklist
 .. I IBOB(38)="CR" D                                   ;           Corrected from worklist
 ... D FFORM("FPBXB",1)                                 ;             Number corrected from worklist
 ... D FFORM("FPBXB1",IBOB(201))                        ;               Total primary charges
 .. I IBOB(38)="CL" D                                   ;           Cloned from worklist
 ... D FFORM("FPBXC",1)                                 ;             Number cloned from worklist
 ... D FFORM("FPBXC1",IBOB(201))                        ;               Total primary charges
 ;                                                      ;
 I IBOB(.21)="S" D                                      ; Secondary
 . I $$PROCSSED^IBCEMSR5(IBIFN) D                       ;   Processed 
 .. D FFORM("FSA",1)                                    ;     Total Number of Processes Requests
 .. I ((IBOB(35)=2)!(IBOB(35)=3)) D                     ;       Auto-processed to tertiary
 ... D FFORM("FSAA",1)                                  ;         Total Number auto-processed to tertiary
 ... I IBOB(35)=2 D                                     ;           Printed Locally
 .... D FFORM("FSAAA",1)                                ;             Number Printed Locally
 .... D FFORM("FSAAA1",$G(IBOBT(201))-$G(IBOBT(218))-$G(IBOBT(219))) ;  Total tertiary Charges
 ... I IBOB(35)=3 D                                     ;           Transmitted
 .... D FFORM("FSAAB",1)                                ;             Number Transmitted
 .... D FFORM("FSAAB1",$G(IBOBT(201))-$G(IBOBT(218))-$G(IBOBT(219))) ;  Total tertiary Charges
 .. I ((IBOB(35)=1)!(IBOB(35)=4)) D                     ;       Sent to Worklist
 ... D FFORM("FSAB",1)                                  ;         Total Number Sent to Worklist
 ... I IBOB(38)="PC" D                                  ;           Processed from worklist
 .... D FFORM("FSABA",1)                                ;             Number processed from worklist
 .... D FFORM("FSABA1",$G(IBOBT(201))-$G(IBOBT(218))-$G(IBOBT(219)))   ;  Total secondary charges
 ... I IBOB(38)="RM" D                                  ;           Removed from worklist
 .... D FFORM("FSABB",1)                                ;             Number removed from worklist
 .... D FFORM("FSABB1",$$TOT^IBCECOB2(IBIFN,1))         ;               Total tertiary charges
 ... I IBOB(38)="CA" D                                  ;           Cancelled from worklist
 .... D FFORM("FSABC",1)                                ;             Number cancelled from worklist
 .... D FFORM("FSABC1",$$TOT^IBCECOB2(IBIFN,1))         ;               Total tertiary charges
 ... I IBOB(35)=1 D                                     ;           Still on worklist
 .... D FFORM("FSABD",1)                                ;             Number still on worklist
 .... D FFORM("FSABD1",$$TOT^IBCECOB2(IBIFN,1))         ;               Total tertiary charges
 .. I $$NOSUB^IBCEMSR5(IBIFN),$P($$BILL^RCJIBFN2(IBIFN),U,2)=22 D  ;  Number without tertiary
 ... D FFORM("FSWOT",1)                                 ;         Total number w/out tertiary
 .. ;DBIA 1452  ;  Number of EEOBs not collected/closed
 .. I '((IBOB(35)=1)!(IBOB(35)=4)),$$NOSUB^IBCEMSR5(IBIFN),$P($$BILL^RCJIBFN2(IBIFN),U,2)'=22 D
 ... D FFORM("FSNCC",1)                                 ;         Total Number of EEOBs not collected/closed
 . I $$DENIED^IBCEMSR5(IBIFN) D                         ;   Denied
 .. D FFORM("FSB",1)                                    ;     Total Number of Denied Requests
 .. I IBOB(35)=1 D                                      ;           Still on worklist
 ... D SFORM("FSSOW",1)                                 ;             Number still on worklist
 .. I IBOB(38)="PC" D                                   ;           Processed from worklist
 ... D FFORM("FSBXD",1)                                 ;             Number processed from worklist
 .. I IBOB(38)="RM" D                                   ;           Removed from worklist
 ... D FFORM("FSBXA",1)                                 ;             Number removed from worklist
 .. I IBOB(38)="CA" D                                   ;           Cancelled from worklist
 ... D FFORM("FSBXE",1)                                 ;             Number cancelled from worklist
 .. I IBOB(38)="CR" D                                   ;           Corrected from worklist
 ... D FFORM("FSBXB",1)                                 ;             Number corrected from worklist
 ... D FFORM("FSBXB1",$G(IBOBS(201))-$G(IBOBS(218)))    ;               Total tertiary charges
 .. I IBOB(38)="CL" D                                   ;           Cloned from worklist
 ... D FFORM("FSBXC",1)                                 ;             Number cloned from worklist
 ... D FFORM("FSBXC1",$G(IBOBS(201))-$G(IBOBS(218)))    ;               Total tertiary charges
 ;
 Q
 ;
FFORM(IBACCUM,IBCNTCST)  ; Detail Form Collectors
 ; IBLFTMP(IBDIV2,IBACCUM,IBFT)
 ;         |      |       |
 ;         |      |        - BILL/CLAIM FORM TYPE 2-CMS1500, 3-UB4
 ;         |       --------- ACCUMULATOR FOR COUNTS AND CHARGES
 ;          ---------------- BILL/CLAIM DEFAULT DIVISION, DICT #40.8, ^DG(40.8,)
 S IBLTMP(IBOB(.22),IBACCUM,IBOB(.19))=$G(IBLTMP(IBOB(.22),IBACCUM,IBOB(.19)))+IBCNTCST
 S IBLTMP("DIVISION",IBACCUM,IBOB(.19))=$G(IBLTMP("DIVISION",IBACCUM,IBOB(.19)))+IBCNTCST
 Q
 ;
COLLECT3  ; Accumulate information for the Summary Report
 I IBOB(.21)="P" D                                      ; Primary
 . D SFORM("SPA",1)                                     ; Total number of EEOBs received
 . Q:$D(^TMP($J,"IBCEMSR2","SFORM",IBIFN))              ; Count each CLAIM/BILL only once
 . S ^TMP($J,"IBCEMSR2","SFORM",IBIFN)=""               ; Record CLAIM/BILL use
 . D SFORM("SPACL",1)                                   ; Total number of associated CLAIM/BILLS
 . ; SPAA Calculated Later                              ;   % Processed
 . ; SPAB Calculated Later                              ;   % of Processed auto-processed to secondary
 . I $$PROCSSED^IBCEMSR5(IBIFN) D                       ;   Processed
 .. D SFORM("SPAC",1)                                   ;     Total Number of Processes Requests
 .. I ((IBOB(35)=2)!(IBOB(35)=3)) D                     ;       Auto-processed to secondary
 ... D SFORM("SPACA",1)                                 ;         Total Number auto-processed to secondary
 ... I IBOB(35)=2 D                                     ;           Printed Locally
 .... D SFORM("SPACAA",1)                               ;             Number Printed Locally
 .... D SFORM("SPACAA1",$G(IBOBS(201))-$G(IBOBS(218)))  ;               Total Secondary Charges
 ... I IBOB(35)=3 D                                     ;           Transmitted
 .... D SFORM("SPACAB",1)                               ;             Number Transmitted
 .... D SFORM("SPACAB1",$G(IBOBS(201))-$G(IBOBS(218)))  ;               Total Secondary Charges
 .. I '((IBOB(35)=2)!(IBOB(35)=3)),IBOB(38)="PC" D      ;       Manually processed to secondary
 ... D SFORM("SPACB",1)                                 ;         Number manually processed to secondary
 ... I $G(IBOBS(27))'="",$G(IBOBS(21))="" D             ;           Printed Locally
 .... D SFORM("SPACBA",1)                               ;             Number Printed Locally
 .... D SFORM("SPACBA1",$G(IBOBS(201))-$G(IBOBS(218)))  ;               Total secondary charges
 ... I $G(IBOBS(21))'="",$G(IBOBS(27))="" D             ;           Transmitted
 .... D SFORM("SPACBB",1)                               ;             Number Transmitted
 .... D SFORM("SPACBB1",$G(IBOBS(201))-$G(IBOBS(218)))  ;               Total secondary charges
 .. I $$NOSUB^IBCEMSR5(IBIFN),$P($$BILL^RCJIBFN2(IBIFN),U,2)=22 D  ;       Number without secondary
 ... D SFORM("SPWOS",1)                                 ;         Total number w/out secondary
 .. ;DBIA 1452 ; Number of EEOBs not collected/closed
 .. I '((IBOB(35)=1)!(IBOB(35)=4)),$$NOSUB^IBCEMSR5(IBIFN),$P($$BILL^RCJIBFN2(IBIFN),U,2)'=22 D
 ... D SFORM("SPNCC",1)                                 ;         Total Number of EEOBs not collected/closed
 .. I IBOB(35)=1 D                                      ;           Still on worklist
 ... D SFORM("SPABD",1)                                 ;             Number still on worklist
 . I $$DENIED^IBCEMSR5(IBIFN) D                         ;  Denied
 .. D SFORM("SPAD",1)                                   ;    Number of Denied EEOBs
 ;
 I IBOB(.21)="S" D                                      ; Secondary
 . D SFORM("SSA",1)                                     ; Total number of EEOBs received
 . Q:$D(^TMP($J,"IBCEMSR2","SFORM",IBIFN))              ; Count each CLAIM/BILL only once
 . S ^TMP($J,"IBCEMSR2","SFORM",IBIFN)=""               ; Record CLAIM/BILL use
 . D SFORM("SSACL",1)                                   ; Total number of associated CLAIM/BILLS
 . ; SSAA Calculated Later                              ;   % Processed
 . ; SSAB Calculated Later                              ;   % of Processed auto-processed to tertiary
 . I $$PROCSSED^IBCEMSR5(IBIFN) D                       ;   Processed
 .. D SFORM("SSAC",1)                                   ;     Total Number of Processes Requests
 .. I ((IBOB(35)=2)!(IBOB(35)=3)) D                     ;       Auto-processed to tertiary
 ... D SFORM("SSACA",1)                                 ;         Total Number auto-processed to tertiary
 ... I IBOB(35)=2 D                                     ;           Printed Locally
 .... D SFORM("SSACAA",1)                               ;             Number Printed Locally
 .... D SFORM("SSACAA1",$G(IBOBT(201))-$G(IBOBT(218))-$G(IBOBT(219))) ;    Total tertiary Charges
 ... I IBOB(35)=3 D                                     ;           Transmitted
 .... D SFORM("SSACAB",1)                               ;             Number Transmitted
 .... D SFORM("SSACAB1",$G(IBOBT(201))-$G(IBOBT(218))-$G(IBOBT(219))) ;    Total tertiary Charges
 .. I '((IBOB(35)=2)!(IBOB(35)=3)),IBOB(38)="PC" D      ;       Manually processed to tertiary
 ... D SFORM("SSADB",1)                                 ;         Number manually processed to tertiary
 ... I $G(IBOBT(27))'="",$G(IBOBT(21))="" D             ;           Printed Locally
 .... D SFORM("SSADBA",1)                               ;             Number Printed Locally
 .... D SFORM("SSADBA1",$G(IBOBT(201))-$G(IBOBT(218))-$G(IBOBT(219))) ;    Total tertiary charges
 ... I $G(IBOBT(21))'="",$G(IBOBT(27))="" D             ;           Transmitted
 .... D SFORM("SSPDABB",1)                              ;             Number Transmitted
 .... D SFORM("SSADBB1",$G(IBOBT(201))-$G(IBOBT(218))-$G(IBOBT(219))) ;    Total tertiary charges
 .. I $$NOSUB^IBCEMSR5(IBIFN),$P($$BILL^RCJIBFN2(IBIFN),U,2)=22 D  ;       Number without tertiary
 ... D SFORM("SSWOT",1)                                 ;         Total number w/out tertiary
 .. ;DBIA 1452 ; Number of EEOBs not collected/closed
 .. I '((IBOB(35)=1)!(IBOB(35)=4)),$$NOSUB^IBCEMSR5(IBIFN),$P($$BILL^RCJIBFN2(IBIFN),U,2)'=22 D  ;DBIA 1452 ; Number of EEOBs not collected/closed
 ... D SFORM("SSNCC",1)                                 ;         Total Number of EEOBs not collected/closed
 .. I IBOB(35)=1 D                                      ;           Still on worklist
 ... D SFORM("SSABD",1)                                 ;             Number still on worklist
 . I $$DENIED^IBCEMSR5(IBIFN) D                         ;  Denied
 .. D SFORM("SSAD",1)                                   ;    Number of Denied EEOBs
 ;
 Q
 ;
SFORM(IBACCUM,IBCNTCST)  ; Summary Form Collectors
 ; IBLSTMP(IBDIV2,IBACCUM,IBFT)
 ;         |      |       |
 ;         |      |        - BILL/CLAIM FORM TYPE 2-CMS1500, 3-UB4
 ;         |       --------- ACCUMULATOR IDENTIFIER FOR COUNTS AND CHARGES
 ;          -------------------------- BILL/CLAIM DEFAULT IBDIV2, DICT #40.8, ^DG(40.8,)
 S IBLTMP(IBOB(.22),IBACCUM,IBOB(.19))=$G(IBLTMP(IBOB(.22),IBACCUM,IBOB(.19)))+IBCNTCST
 S IBLTMP("DIVISION",IBACCUM,IBOB(.19))=$G(IBLTMP("DIVISION",IBACCUM,IBOB(.19)))+IBCNTCST
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCEMSR3   16329     printed  Sep 23, 2025@19:47:20                                                                                                                                                                                                   Page 2
IBCEMSR3  ;BI/ALB - non-MRA PRODUCTIVITY REPORT ;02/14/11
 +1       ;;2.0;INTEGRATED BILLING;**447**;21-MAR-94;Build 80
 +2       ;;Per VHA Directive 2004-038, this routine should not be modified.
 +3       ;
 +4        QUIT 
 +5       ;
COLLECT2  ; Accumulate information for the Detailed Report
 +1       ; Count each CLAIM/BILL only once
           if $DATA(^TMP($JOB,"IBCEMSR2","FFORM",IBIFN))
               QUIT 
 +2       ; Record CLAIM/BILL use
           SET ^TMP($JOB,"IBCEMSR2","FFORM",IBIFN)=""
 +3       ; Primary
           IF IBOB(.21)="P"
               Begin DoDot:1
 +4       ;   Processed 
                   IF $$PROCSSED^IBCEMSR5(IBIFN)
                       Begin DoDot:2
 +5       ;     Total Number of Processes Requests
                           DO FFORM("FPA",1)
 +6       ;       Auto-processed to secondary
                           IF ((IBOB(35)=2)!(IBOB(35)=3))
                               Begin DoDot:3
 +7       ;         Total Number auto-processed to secondary
                                   DO FFORM("FPAA",1)
 +8       ;           Printed Locally
                                   IF IBOB(35)=2
                                       Begin DoDot:4
 +9       ;             Number Printed Locally
                                           DO FFORM("FPAAA",1)
 +10      ;               Total Secondary Charges
                                           DO FFORM("FPAAA1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                                       End DoDot:4
 +11      ;           Transmitted
                                   IF IBOB(35)=3
                                       Begin DoDot:4
 +12      ;             Number Transmitted
                                           DO FFORM("FPAAB",1)
 +13      ;               Total Secondary Charges
                                           DO FFORM("FPAAB1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                                       End DoDot:4
                               End DoDot:3
 +14      ;       Sent to Worklist
                           IF ((IBOB(35)=1)!(IBOB(35)=4))
                               Begin DoDot:3
 +15      ;         Total Number Sent to Worklist
                                   DO FFORM("FPAB",1)
 +16      ;           Processed from worklist
                                   IF IBOB(38)="PC"
                                       Begin DoDot:4
 +17      ;             Number processed from worklist
                                           DO FFORM("FPABA",1)
 +18      ;               Total secondary charges
                                           DO FFORM("FPABA1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                                       End DoDot:4
 +19      ;           Removed from worklist
                                   IF IBOB(38)="RM"
                                       Begin DoDot:4
 +20      ;             Number removed from worklist
                                           DO FFORM("FPABB",1)
 +21      ;               Total secondary charges
                                           DO FFORM("FPABB1",$$TOT^IBCECOB2(IBIFN,1))
                                       End DoDot:4
 +22      ;           Cancelled from worklist
                                   IF IBOB(38)="CA"
                                       Begin DoDot:4
 +23      ;             Number cancelled from worklist
                                           DO FFORM("FPABC",1)
 +24      ;               Total secondary charges
                                           DO FFORM("FPABC1",$$TOT^IBCECOB2(IBIFN,1))
                                       End DoDot:4
 +25      ;           Still on worklist
                                   IF IBOB(35)=1
                                       Begin DoDot:4
 +26      ;             Number still on worklist
                                           DO FFORM("FPABD",1)
 +27      ;               Total secondary charges
                                           DO FFORM("FPABD1",$$TOT^IBCECOB2(IBIFN,1))
                                       End DoDot:4
                               End DoDot:3
 +28      ;  Number without secondary
                           IF $$NOSUB^IBCEMSR5(IBIFN)
                               IF $PIECE($$BILL^RCJIBFN2(IBIFN),U,2)=22
                                   Begin DoDot:3
 +29      ;         Total number w/out secondary
                                       DO FFORM("FPWOS",1)
                                   End DoDot:3
 +30      ;DBIA 1452  ;  Number of EEOBs not collected/closed
 +31                       IF '((IBOB(35)=1)!(IBOB(35)=4))
                               IF $$NOSUB^IBCEMSR5(IBIFN)
                                   IF $PIECE($$BILL^RCJIBFN2(IBIFN),U,2)'=22
                                       Begin DoDot:3
 +32      ;         Total Number of EEOBs not collected/closed
                                           DO FFORM("FPNCC",1)
                                       End DoDot:3
                       End DoDot:2
 +33      ;   Denied
                   IF $$DENIED^IBCEMSR5(IBIFN)
                       Begin DoDot:2
 +34      ;     Total Number of Denied Requests
                           DO FFORM("FPB",1)
 +35      ;           Still on worklist
                           IF IBOB(35)=1
                               Begin DoDot:3
 +36      ;             Number still on worklist
                                   DO SFORM("FPSOW",1)
                               End DoDot:3
 +37      ;           Processed from worklist
                           IF IBOB(38)="PC"
                               Begin DoDot:3
 +38      ;             Number processed from worklist
                                   DO FFORM("FPBXD",1)
                               End DoDot:3
 +39      ;           Removed from worklist
                           IF IBOB(38)="RM"
                               Begin DoDot:3
 +40      ;             Number removed from worklist
                                   DO FFORM("FPBXA",1)
                               End DoDot:3
 +41      ;           Cancelled from worklist
                           IF IBOB(38)="CA"
                               Begin DoDot:3
 +42      ;             Number cancelled from worklist
                                   DO FFORM("FPBXE",1)
                               End DoDot:3
 +43      ;           Corrected from worklist
                           IF IBOB(38)="CR"
                               Begin DoDot:3
 +44      ;             Number corrected from worklist
                                   DO FFORM("FPBXB",1)
 +45      ;               Total primary charges
                                   DO FFORM("FPBXB1",IBOB(201))
                               End DoDot:3
 +46      ;           Cloned from worklist
                           IF IBOB(38)="CL"
                               Begin DoDot:3
 +47      ;             Number cloned from worklist
                                   DO FFORM("FPBXC",1)
 +48      ;               Total primary charges
                                   DO FFORM("FPBXC1",IBOB(201))
                               End DoDot:3
                       End DoDot:2
               End DoDot:1
 +49      ;                                                      ;
 +50      ; Secondary
           IF IBOB(.21)="S"
               Begin DoDot:1
 +51      ;   Processed 
                   IF $$PROCSSED^IBCEMSR5(IBIFN)
                       Begin DoDot:2
 +52      ;     Total Number of Processes Requests
                           DO FFORM("FSA",1)
 +53      ;       Auto-processed to tertiary
                           IF ((IBOB(35)=2)!(IBOB(35)=3))
                               Begin DoDot:3
 +54      ;         Total Number auto-processed to tertiary
                                   DO FFORM("FSAA",1)
 +55      ;           Printed Locally
                                   IF IBOB(35)=2
                                       Begin DoDot:4
 +56      ;             Number Printed Locally
                                           DO FFORM("FSAAA",1)
 +57      ;  Total tertiary Charges
                                           DO FFORM("FSAAA1",$GET(IBOBT(201))-$GET(IBOBT(218))-$GET(IBOBT(219)))
                                       End DoDot:4
 +58      ;           Transmitted
                                   IF IBOB(35)=3
                                       Begin DoDot:4
 +59      ;             Number Transmitted
                                           DO FFORM("FSAAB",1)
 +60      ;  Total tertiary Charges
                                           DO FFORM("FSAAB1",$GET(IBOBT(201))-$GET(IBOBT(218))-$GET(IBOBT(219)))
                                       End DoDot:4
                               End DoDot:3
 +61      ;       Sent to Worklist
                           IF ((IBOB(35)=1)!(IBOB(35)=4))
                               Begin DoDot:3
 +62      ;         Total Number Sent to Worklist
                                   DO FFORM("FSAB",1)
 +63      ;           Processed from worklist
                                   IF IBOB(38)="PC"
                                       Begin DoDot:4
 +64      ;             Number processed from worklist
                                           DO FFORM("FSABA",1)
 +65      ;  Total secondary charges
                                           DO FFORM("FSABA1",$GET(IBOBT(201))-$GET(IBOBT(218))-$GET(IBOBT(219)))
                                       End DoDot:4
 +66      ;           Removed from worklist
                                   IF IBOB(38)="RM"
                                       Begin DoDot:4
 +67      ;             Number removed from worklist
                                           DO FFORM("FSABB",1)
 +68      ;               Total tertiary charges
                                           DO FFORM("FSABB1",$$TOT^IBCECOB2(IBIFN,1))
                                       End DoDot:4
 +69      ;           Cancelled from worklist
                                   IF IBOB(38)="CA"
                                       Begin DoDot:4
 +70      ;             Number cancelled from worklist
                                           DO FFORM("FSABC",1)
 +71      ;               Total tertiary charges
                                           DO FFORM("FSABC1",$$TOT^IBCECOB2(IBIFN,1))
                                       End DoDot:4
 +72      ;           Still on worklist
                                   IF IBOB(35)=1
                                       Begin DoDot:4
 +73      ;             Number still on worklist
                                           DO FFORM("FSABD",1)
 +74      ;               Total tertiary charges
                                           DO FFORM("FSABD1",$$TOT^IBCECOB2(IBIFN,1))
                                       End DoDot:4
                               End DoDot:3
 +75      ;  Number without tertiary
                           IF $$NOSUB^IBCEMSR5(IBIFN)
                               IF $PIECE($$BILL^RCJIBFN2(IBIFN),U,2)=22
                                   Begin DoDot:3
 +76      ;         Total number w/out tertiary
                                       DO FFORM("FSWOT",1)
                                   End DoDot:3
 +77      ;DBIA 1452  ;  Number of EEOBs not collected/closed
 +78                       IF '((IBOB(35)=1)!(IBOB(35)=4))
                               IF $$NOSUB^IBCEMSR5(IBIFN)
                                   IF $PIECE($$BILL^RCJIBFN2(IBIFN),U,2)'=22
                                       Begin DoDot:3
 +79      ;         Total Number of EEOBs not collected/closed
                                           DO FFORM("FSNCC",1)
                                       End DoDot:3
                       End DoDot:2
 +80      ;   Denied
                   IF $$DENIED^IBCEMSR5(IBIFN)
                       Begin DoDot:2
 +81      ;     Total Number of Denied Requests
                           DO FFORM("FSB",1)
 +82      ;           Still on worklist
                           IF IBOB(35)=1
                               Begin DoDot:3
 +83      ;             Number still on worklist
                                   DO SFORM("FSSOW",1)
                               End DoDot:3
 +84      ;           Processed from worklist
                           IF IBOB(38)="PC"
                               Begin DoDot:3
 +85      ;             Number processed from worklist
                                   DO FFORM("FSBXD",1)
                               End DoDot:3
 +86      ;           Removed from worklist
                           IF IBOB(38)="RM"
                               Begin DoDot:3
 +87      ;             Number removed from worklist
                                   DO FFORM("FSBXA",1)
                               End DoDot:3
 +88      ;           Cancelled from worklist
                           IF IBOB(38)="CA"
                               Begin DoDot:3
 +89      ;             Number cancelled from worklist
                                   DO FFORM("FSBXE",1)
                               End DoDot:3
 +90      ;           Corrected from worklist
                           IF IBOB(38)="CR"
                               Begin DoDot:3
 +91      ;             Number corrected from worklist
                                   DO FFORM("FSBXB",1)
 +92      ;               Total tertiary charges
                                   DO FFORM("FSBXB1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                               End DoDot:3
 +93      ;           Cloned from worklist
                           IF IBOB(38)="CL"
                               Begin DoDot:3
 +94      ;             Number cloned from worklist
                                   DO FFORM("FSBXC",1)
 +95      ;               Total tertiary charges
                                   DO FFORM("FSBXC1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                               End DoDot:3
                       End DoDot:2
               End DoDot:1
 +96      ;
 +97       QUIT 
 +98      ;
FFORM(IBACCUM,IBCNTCST) ; Detail Form Collectors
 +1       ; IBLFTMP(IBDIV2,IBACCUM,IBFT)
 +2       ;         |      |       |
 +3       ;         |      |        - BILL/CLAIM FORM TYPE 2-CMS1500, 3-UB4
 +4       ;         |       --------- ACCUMULATOR FOR COUNTS AND CHARGES
 +5       ;          ---------------- BILL/CLAIM DEFAULT DIVISION, DICT #40.8, ^DG(40.8,)
 +6        SET IBLTMP(IBOB(.22),IBACCUM,IBOB(.19))=$GET(IBLTMP(IBOB(.22),IBACCUM,IBOB(.19)))+IBCNTCST
 +7        SET IBLTMP("DIVISION",IBACCUM,IBOB(.19))=$GET(IBLTMP("DIVISION",IBACCUM,IBOB(.19)))+IBCNTCST
 +8        QUIT 
 +9       ;
COLLECT3  ; Accumulate information for the Summary Report
 +1       ; Primary
           IF IBOB(.21)="P"
               Begin DoDot:1
 +2       ; Total number of EEOBs received
                   DO SFORM("SPA",1)
 +3       ; Count each CLAIM/BILL only once
                   if $DATA(^TMP($JOB,"IBCEMSR2","SFORM",IBIFN))
                       QUIT 
 +4       ; Record CLAIM/BILL use
                   SET ^TMP($JOB,"IBCEMSR2","SFORM",IBIFN)=""
 +5       ; Total number of associated CLAIM/BILLS
                   DO SFORM("SPACL",1)
 +6       ; SPAA Calculated Later                              ;   % Processed
 +7       ; SPAB Calculated Later                              ;   % of Processed auto-processed to secondary
 +8       ;   Processed
                   IF $$PROCSSED^IBCEMSR5(IBIFN)
                       Begin DoDot:2
 +9       ;     Total Number of Processes Requests
                           DO SFORM("SPAC",1)
 +10      ;       Auto-processed to secondary
                           IF ((IBOB(35)=2)!(IBOB(35)=3))
                               Begin DoDot:3
 +11      ;         Total Number auto-processed to secondary
                                   DO SFORM("SPACA",1)
 +12      ;           Printed Locally
                                   IF IBOB(35)=2
                                       Begin DoDot:4
 +13      ;             Number Printed Locally
                                           DO SFORM("SPACAA",1)
 +14      ;               Total Secondary Charges
                                           DO SFORM("SPACAA1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                                       End DoDot:4
 +15      ;           Transmitted
                                   IF IBOB(35)=3
                                       Begin DoDot:4
 +16      ;             Number Transmitted
                                           DO SFORM("SPACAB",1)
 +17      ;               Total Secondary Charges
                                           DO SFORM("SPACAB1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                                       End DoDot:4
                               End DoDot:3
 +18      ;       Manually processed to secondary
                           IF '((IBOB(35)=2)!(IBOB(35)=3))
                               IF IBOB(38)="PC"
                                   Begin DoDot:3
 +19      ;         Number manually processed to secondary
                                       DO SFORM("SPACB",1)
 +20      ;           Printed Locally
                                       IF $GET(IBOBS(27))'=""
                                           IF $GET(IBOBS(21))=""
                                               Begin DoDot:4
 +21      ;             Number Printed Locally
                                                   DO SFORM("SPACBA",1)
 +22      ;               Total secondary charges
                                                   DO SFORM("SPACBA1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                                               End DoDot:4
 +23      ;           Transmitted
                                       IF $GET(IBOBS(21))'=""
                                           IF $GET(IBOBS(27))=""
                                               Begin DoDot:4
 +24      ;             Number Transmitted
                                                   DO SFORM("SPACBB",1)
 +25      ;               Total secondary charges
                                                   DO SFORM("SPACBB1",$GET(IBOBS(201))-$GET(IBOBS(218)))
                                               End DoDot:4
                                   End DoDot:3
 +26      ;       Number without secondary
                           IF $$NOSUB^IBCEMSR5(IBIFN)
                               IF $PIECE($$BILL^RCJIBFN2(IBIFN),U,2)=22
                                   Begin DoDot:3
 +27      ;         Total number w/out secondary
                                       DO SFORM("SPWOS",1)
                                   End DoDot:3
 +28      ;DBIA 1452 ; Number of EEOBs not collected/closed
 +29                       IF '((IBOB(35)=1)!(IBOB(35)=4))
                               IF $$NOSUB^IBCEMSR5(IBIFN)
                                   IF $PIECE($$BILL^RCJIBFN2(IBIFN),U,2)'=22
                                       Begin DoDot:3
 +30      ;         Total Number of EEOBs not collected/closed
                                           DO SFORM("SPNCC",1)
                                       End DoDot:3
 +31      ;           Still on worklist
                           IF IBOB(35)=1
                               Begin DoDot:3
 +32      ;             Number still on worklist
                                   DO SFORM("SPABD",1)
                               End DoDot:3
                       End DoDot:2
 +33      ;  Denied
                   IF $$DENIED^IBCEMSR5(IBIFN)
                       Begin DoDot:2
 +34      ;    Number of Denied EEOBs
                           DO SFORM("SPAD",1)
                       End DoDot:2
               End DoDot:1
 +35      ;
 +36      ; Secondary
           IF IBOB(.21)="S"
               Begin DoDot:1
 +37      ; Total number of EEOBs received
                   DO SFORM("SSA",1)
 +38      ; Count each CLAIM/BILL only once
                   if $DATA(^TMP($JOB,"IBCEMSR2","SFORM",IBIFN))
                       QUIT 
 +39      ; Record CLAIM/BILL use
                   SET ^TMP($JOB,"IBCEMSR2","SFORM",IBIFN)=""
 +40      ; Total number of associated CLAIM/BILLS
                   DO SFORM("SSACL",1)
 +41      ; SSAA Calculated Later                              ;   % Processed
 +42      ; SSAB Calculated Later                              ;   % of Processed auto-processed to tertiary
 +43      ;   Processed
                   IF $$PROCSSED^IBCEMSR5(IBIFN)
                       Begin DoDot:2
 +44      ;     Total Number of Processes Requests
                           DO SFORM("SSAC",1)
 +45      ;       Auto-processed to tertiary
                           IF ((IBOB(35)=2)!(IBOB(35)=3))
                               Begin DoDot:3
 +46      ;         Total Number auto-processed to tertiary
                                   DO SFORM("SSACA",1)
 +47      ;           Printed Locally
                                   IF IBOB(35)=2
                                       Begin DoDot:4
 +48      ;             Number Printed Locally
                                           DO SFORM("SSACAA",1)
 +49      ;    Total tertiary Charges
                                           DO SFORM("SSACAA1",$GET(IBOBT(201))-$GET(IBOBT(218))-$GET(IBOBT(219)))
                                       End DoDot:4
 +50      ;           Transmitted
                                   IF IBOB(35)=3
                                       Begin DoDot:4
 +51      ;             Number Transmitted
                                           DO SFORM("SSACAB",1)
 +52      ;    Total tertiary Charges
                                           DO SFORM("SSACAB1",$GET(IBOBT(201))-$GET(IBOBT(218))-$GET(IBOBT(219)))
                                       End DoDot:4
                               End DoDot:3
 +53      ;       Manually processed to tertiary
                           IF '((IBOB(35)=2)!(IBOB(35)=3))
                               IF IBOB(38)="PC"
                                   Begin DoDot:3
 +54      ;         Number manually processed to tertiary
                                       DO SFORM("SSADB",1)
 +55      ;           Printed Locally
                                       IF $GET(IBOBT(27))'=""
                                           IF $GET(IBOBT(21))=""
                                               Begin DoDot:4
 +56      ;             Number Printed Locally
                                                   DO SFORM("SSADBA",1)
 +57      ;    Total tertiary charges
                                                   DO SFORM("SSADBA1",$GET(IBOBT(201))-$GET(IBOBT(218))-$GET(IBOBT(219)))
                                               End DoDot:4
 +58      ;           Transmitted
                                       IF $GET(IBOBT(21))'=""
                                           IF $GET(IBOBT(27))=""
                                               Begin DoDot:4
 +59      ;             Number Transmitted
                                                   DO SFORM("SSPDABB",1)
 +60      ;    Total tertiary charges
                                                   DO SFORM("SSADBB1",$GET(IBOBT(201))-$GET(IBOBT(218))-$GET(IBOBT(219)))
                                               End DoDot:4
                                   End DoDot:3
 +61      ;       Number without tertiary
                           IF $$NOSUB^IBCEMSR5(IBIFN)
                               IF $PIECE($$BILL^RCJIBFN2(IBIFN),U,2)=22
                                   Begin DoDot:3
 +62      ;         Total number w/out tertiary
                                       DO SFORM("SSWOT",1)
                                   End DoDot:3
 +63      ;DBIA 1452 ; Number of EEOBs not collected/closed
 +64      ;DBIA 1452 ; Number of EEOBs not collected/closed
                           IF '((IBOB(35)=1)!(IBOB(35)=4))
                               IF $$NOSUB^IBCEMSR5(IBIFN)
                                   IF $PIECE($$BILL^RCJIBFN2(IBIFN),U,2)'=22
                                       Begin DoDot:3
 +65      ;         Total Number of EEOBs not collected/closed
                                           DO SFORM("SSNCC",1)
                                       End DoDot:3
 +66      ;           Still on worklist
                           IF IBOB(35)=1
                               Begin DoDot:3
 +67      ;             Number still on worklist
                                   DO SFORM("SSABD",1)
                               End DoDot:3
                       End DoDot:2
 +68      ;  Denied
                   IF $$DENIED^IBCEMSR5(IBIFN)
                       Begin DoDot:2
 +69      ;    Number of Denied EEOBs
                           DO SFORM("SSAD",1)
                       End DoDot:2
               End DoDot:1
 +70      ;
 +71       QUIT 
 +72      ;
SFORM(IBACCUM,IBCNTCST) ; Summary Form Collectors
 +1       ; IBLSTMP(IBDIV2,IBACCUM,IBFT)
 +2       ;         |      |       |
 +3       ;         |      |        - BILL/CLAIM FORM TYPE 2-CMS1500, 3-UB4
 +4       ;         |       --------- ACCUMULATOR IDENTIFIER FOR COUNTS AND CHARGES
 +5       ;          -------------------------- BILL/CLAIM DEFAULT IBDIV2, DICT #40.8, ^DG(40.8,)
 +6        SET IBLTMP(IBOB(.22),IBACCUM,IBOB(.19))=$GET(IBLTMP(IBOB(.22),IBACCUM,IBOB(.19)))+IBCNTCST
 +7        SET IBLTMP("DIVISION",IBACCUM,IBOB(.19))=$GET(IBLTMP("DIVISION",IBACCUM,IBOB(.19)))+IBCNTCST
 +8        QUIT