IBCOMDT1 ;ALB/CKB - INSURANCE COMPANY MISSING DATA REPORT (COMPILE/PRINT) ; 12-APR-2023
;;2.0;INTEGRATED BILLING;**763**;21-MAR-94;Build 29
;;Per VA Directive 6402, this routine should not be modified.
;
;Selected Insurance Company(s):
; ^TMP(IBCOMDT("$J"),"PR",<insurance co name>,<insurance IEN>)=""
;
;
;Print data:
; ^TMP(IBCOMDT("$J"),"PR",<insurance co name>,<insurance IEN>)=DATA
;
; DATA=INSURANCE COMPANY ^ ADDRESS ON FILE ^ STREET LINE 1 ^ STREET LINE 2 ^ STREET LINE 3 ^
; CITY ^ STATE ^ ZIP+4 ^ TYPE OF COVERAGE ^ FILING TIME FRAME"
;
; ***Note: the pieces in DATA are set to 'YES' if they are missing data
;
Q
COMPILE(IBCNRTN,IBCOMDT) ; Entry Point called from EN^XUTMDEVQ (indirectly from IBCOMDT).
; IBCNRTN = Routine name for ^TMP(IBCNRTN,IBCOMDT("$J"),...
; IBCOMDT = Array of params
; Compile and Print Report
N ADDRESS,CITY,DATA,FOUND,I,IBCT,IBPGN,INS,INSNM,SL1,SL2,SL3,ST,FTF,TYPCOV,ZIP,ZIP4
K ^TMP(IBCOMDT("$J"),"PR")
;
S IBCT=0
S INSNM=0 F S INSNM=$O(^TMP(IBCNRTN,IBCOMDT("$J"),INSNM)) Q:INSNM="" D
. S INS=0 F S INS=$O(^TMP(IBCNRTN,IBCOMDT("$J"),INSNM,INS)) Q:INS="" D
. . ; Write '.' to the screen to keep session alive (logic from BLD^IBCNBLL)
. . S IBCT=IBCT+1 I '$D(ZTQUEUED),'(IBCT#50) W "."
. . ; Get Insurance Company field details
. . S DATA=""
. . S SL1=$$GET1^DIQ(36,INS_",",.111,"E")
. . S SL2=$$GET1^DIQ(36,INS_",",.112,"E")
. . S SL3=$$GET1^DIQ(36,INS_",",.113,"E")
. . S CITY=$$GET1^DIQ(36,INS_",",.114,"E")
. . ; Use State 2 digit abbreviation
. . S ST=$$GET1^DIQ(5,$$GET1^DIQ(36,INS_",",.115,"I")_",",1)
. . S ZIP=$$GET1^DIQ(36,INS_",",.116,"E"),ZIP4=""
. . I $L(ZIP)>5 S ZIP4=$P(ZIP,"-",2)
. . S ADDRESS=""
. . I SL1'="" S ADDRESS=ADDRESS_SL1
. . I SL2'="" S ADDRESS=ADDRESS_", "_SL2
. . I SL3'="" S ADDRESS=ADDRESS_", "_SL3
. . I CITY'="" S ADDRESS=ADDRESS_", "_CITY
. . I ST'="" S ADDRESS=ADDRESS_", "_ST
. . I ZIP'="" S ADDRESS=ADDRESS_", "_ZIP
. . S TYPCOV=$$GET1^DIQ(36,INS_",",.13,"E")
. . S FTF=$$FTFIC^IBCNEUT7(INS)
. . ;
. . ; Set DATA for Report output (filtered)
. . I IBCOMDT("IBOUT")="R" S FOUND=0,DATA="" D
. . . S $P(DATA,U,1)=ADDRESS
. . . ; If there is missing data add it to DATA
. . . I IBCOMDT("IBSL1") I SL1="" S $P(DATA,U,2)="YES"
. . . I IBCOMDT("IBSL2") I SL2="" S $P(DATA,U,3)="YES"
. . . I IBCOMDT("IBSL3") I SL3="" S $P(DATA,U,4)="YES"
. . . I IBCOMDT("IBCTY") I CITY="" S $P(DATA,U,5)="YES"
. . . I IBCOMDT("IBST") I ST="" S $P(DATA,U,6)="YES"
. . . I IBCOMDT("IBZIP") I (ZIP4="")!(ZIP4="0000")!(ZIP4="9999") S $P(DATA,U,7)="YES"
. . . I IBCOMDT("IBCOV") I TYPCOV="" S $P(DATA,U,8)="YES"
. . . I IBCOMDT("IBFTF") I FTF["UNK" S $P(DATA,U,9)="YES"
. . . F I=2:1:$L(DATA,U) I $P(DATA,U,I)'="" S FOUND=1
. . ;
. . ; Set DATA for Excel output (doesn't filter, includes all 8 fields)
. . I IBCOMDT("IBOUT")="E" S FOUND=1,DATA="" D
. . . S $P(DATA,U,1)=ADDRESS
. . . S $P(DATA,U,2)=$S(SL1="":"YES",1:"NO")
. . . S $P(DATA,U,3)=$S(SL2="":"YES",1:"NO")
. . . S $P(DATA,U,4)=$S(SL3="":"YES",1:"NO")
. . . S $P(DATA,U,5)=$S(CITY="":"YES",1:"NO")
. . . S $P(DATA,U,6)=$S(ST="":"YES",1:"NO")
. . . S $P(DATA,U,7)="NO"
. . . I (ZIP4="")!(ZIP4="0000")!(ZIP4="9999") S $P(DATA,U,7)="YES"
. . . S $P(DATA,U,8)=$S(TYPCOV="":"YES",1:"NO")
. . . S $P(DATA,U,9)=$S(FTF["UNK":"YES",1:"NO")
. . ;
. . ; Add to ^TMP global for printing if missing data was found or Excel output
. . I FOUND S ^TMP(IBCOMDT("$J"),"PR",INSNM,INS)=DATA
. . K DATA
K ^TMP(IBCNRTN,IBCOMDT("$J"))
;
; Print Excel or Report output
D PRINT
Q
;
PRINT ; Print Report
N CRT,CT,DASHES,DATA,EORMSG,IBHDT,IBPGC,IBQUIT,INS,LCT,NODATA,NONEMSG,MAXCNT,STOP,%
S EORMSG="*** End of Report ***"
S NONEMSG="*** NO DATA FOUND ***"
S HDRNAME="INSURANCE COMPANY MISSING DATA"
D NOW^%DTC
S IBHDT=$$DAT2^IBOUTL($E(%,1,12))
S (IBPGC,IBQUIT,LCT,STOP,ZSTOP)=0
S $P(DASHES,"-",81)=""
S MAXCNT=IOSL-2,CRT=1
I 'IOST["C-" S MAXCNT=IOSL-6,CRT=0
I IBCOMDT("IBOUT")="E" D EHDR
I IBCOMDT("IBOUT")="R" D HEADER(HDRNAME,IBHDT)
I '$D(^TMP(IBCOMDT("$J"),"PR")) W !,NONEMSG,! G PRINTQ ; NO DATA FOUND
;
; Loop through ^TMP(IBCOMDT("$J"),"PR") and display report output
S INS=0 F S INS=$O(^TMP(IBCOMDT("$J"),"PR",INS)) Q:INS=""!(IBQUIT!$G(ZTSTOP)) D
. S CT=0 F S CT=$O(^TMP(IBCOMDT("$J"),"PR",INS,CT)) Q:CT=""!(IBQUIT!$G(ZTSTOP)) D
. . ; Excel output
. . I IBCOMDT("IBOUT")="E" D
. . . S DATA=^TMP(IBCOMDT("$J"),"PR",INS,CT)
. . . W INS,U,$S($P(DATA,U,1)="":"<no address on file>",1:$P(DATA,U,1)),U
. . . W $P(DATA,U,2,9),!
. . ; Report output
. . I IBCOMDT("IBOUT")="R" D REPORT
;
PRINTQ ;
; Only display 'End of Report' and PAUSE if User didn't enter a '^' (IBQUIT=1)
I '(IBQUIT!$G(ZTSTOP)) D
. W !,EORMSG,!
. D PAUSE
I $D(ZTQUEUED) S ZTREQ="@" Q
; Close Device
D ^%ZISC
Q
;
REPORT ; Report output
N ADDOF,RPT1,RPT2,RPT3,RPT4
; Use Line counter (LCT) to keep all Insurance Company data on the same page
S (RPT1,RPT2,RPT3,RPT4)=""
S DATA=^TMP(IBCOMDT("$J"),"PR",INS,CT)
S ADDOF=$P(DATA,U,1)
;
; Build line 1
I $P(DATA,U,2)="YES" S RPT1=RPT1_$S(RPT1'="":", ",1:"")_"STREET LINE 1"
I $P(DATA,U,3)="YES" S RPT1=RPT1_$S(RPT1'="":", ",1:"")_"STREET LINE 2"
I $P(DATA,U,4)="YES" S RPT1=RPT1_$S(RPT1'="":", ",1:"")_"STREET LINE 3"
I RPT1'="" S LCT=LCT+1
; Build line 2
I $P(DATA,U,5)="YES" S RPT2=RPT2_$S(RPT2'="":", ",1:"")_"CITY"
I $P(DATA,U,6)="YES" S RPT2=RPT2_$S(RPT2'="":", ",1:"")_"STATE"
I $P(DATA,U,7)="YES" S RPT2=RPT2_$S(RPT2'="":", ",1:"")_"ZIP+4"
I RPT2'="" S LCT=LCT+1
; Determine lines 3 and 4
I $P(DATA,U,8)'="" S RPT3=1,LCT=LCT+1
I $P(DATA,U,9)'="" S RPT4=1,LCT=LCT+1
;
;I ($Y+LCT)>MAXCNT D S LCT=0 Q:(IBQUIT!$G(ZTSTOP)) D HEADER(HDRNAME,IBHDT)
I ($Y+LCT)>MAXCNT D S LCT=0 D HEADER(HDRNAME,IBHDT)
. ;Write blank lines to fill page prior to displaying "Type <Enter> to continue or '^' to exit:"
. I $E(IOST,1,2)["C-",MAXCNT<51 F LIN=1:1:(MAXCNT-$Y) W !
I IBQUIT!$G(ZSTOP) Q
;
; Display results
W !,INS,!
W $S(ADDOF="":"<no address on file>",1:ADDOF),!
I RPT1'="" W ?8,RPT1,!
I RPT2'="" W ?8,RPT2,!
I RPT3 W ?8,"TYPE OF COVERAGE",!
I RPT4 W ?8,"FILING TIME FRAME",!
Q
;
;
N DIR,DTOUT,DUOUT,LIN,OFFSET,X,Y
I IBPGC>0,$E(IOST,1,2)["C-" D Q:(IBQUIT!$G(ZTSTOP))
. I MAXCNT<51 F LIN=1:1:(MAXCNT-$Y) W !
. D PAUSE
I $E(IOST,1,2)'["C-",$$S^%ZTLOAD() S ZTSTOP=1 Q
S IBPGC=IBPGC+1 I IBPGC>1!($E(IOST,1,2)["C-") W @IOF
; Excel and Report Header
I IBCOMDT("IBOUT")="E",IBPGC=1 D EHDR
I IBCOMDT("IBOUT")="R" D
. W HDRNAME
. S HDRDATE=HDRDATE_" Page: "_+IBPGC,OFFSET=(80-($L(HDRDATE)+1))
. W ?OFFSET,HDRDATE,!
. W "Missing Data: ",IBCOMDT("SUBHD"),!,DASHES,!
Q
;
EHDR ; Excel Header
N EHDR
S EHDR="INSURANCE COMPANY"_U_"ADDRESS ON FILE"_U_"STREET LINE 1"_U_"STREET LINE 2 "_U_"STREET LINE 3"
S EHDR=EHDR_U_"CITY"_U_"STATE"_U_"ZIP+4"_U_"TYPE OF COVERAGE"_U_"FILING TIME FRAME"
W !,HDRNAME,"^",IBHDT,!,"Missing Data: SEARCH ALL",!,"**YES indicates Missing Data**"
W !!,EHDR,!
Q
;
PAUSE ; Pause for screen output.
N DIR,DIRUT,DTOUT,DUOUT
Q:$E(IOST,1,2)'["C-"
S DIR(0)="E" D ^DIR K DIR I $D(DIRUT)!($D(DUOUT)) S IBQUIT=1 K DIR,DIRUT,DTOUT,DUOUT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCOMDT1 7369 printed Nov 22, 2024@17:28:28 Page 2
IBCOMDT1 ;ALB/CKB - INSURANCE COMPANY MISSING DATA REPORT (COMPILE/PRINT) ; 12-APR-2023
+1 ;;2.0;INTEGRATED BILLING;**763**;21-MAR-94;Build 29
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ;Selected Insurance Company(s):
+5 ; ^TMP(IBCOMDT("$J"),"PR",<insurance co name>,<insurance IEN>)=""
+6 ;
+7 ;
+8 ;Print data:
+9 ; ^TMP(IBCOMDT("$J"),"PR",<insurance co name>,<insurance IEN>)=DATA
+10 ;
+11 ; DATA=INSURANCE COMPANY ^ ADDRESS ON FILE ^ STREET LINE 1 ^ STREET LINE 2 ^ STREET LINE 3 ^
+12 ; CITY ^ STATE ^ ZIP+4 ^ TYPE OF COVERAGE ^ FILING TIME FRAME"
+13 ;
+14 ; ***Note: the pieces in DATA are set to 'YES' if they are missing data
+15 ;
+16 QUIT
COMPILE(IBCNRTN,IBCOMDT) ; Entry Point called from EN^XUTMDEVQ (indirectly from IBCOMDT).
+1 ; IBCNRTN = Routine name for ^TMP(IBCNRTN,IBCOMDT("$J"),...
+2 ; IBCOMDT = Array of params
+3 ; Compile and Print Report
+4 NEW ADDRESS,CITY,DATA,FOUND,I,IBCT,IBPGN,INS,INSNM,SL1,SL2,SL3,ST,FTF,TYPCOV,ZIP,ZIP4
+5 KILL ^TMP(IBCOMDT("$J"),"PR")
+6 ;
+7 SET IBCT=0
+8 SET INSNM=0
FOR
SET INSNM=$ORDER(^TMP(IBCNRTN,IBCOMDT("$J"),INSNM))
if INSNM=""
QUIT
Begin DoDot:1
+9 SET INS=0
FOR
SET INS=$ORDER(^TMP(IBCNRTN,IBCOMDT("$J"),INSNM,INS))
if INS=""
QUIT
Begin DoDot:2
+10 ; Write '.' to the screen to keep session alive (logic from BLD^IBCNBLL)
+11 SET IBCT=IBCT+1
IF '$DATA(ZTQUEUED)
IF '(IBCT#50)
WRITE "."
+12 ; Get Insurance Company field details
+13 SET DATA=""
+14 SET SL1=$$GET1^DIQ(36,INS_",",.111,"E")
+15 SET SL2=$$GET1^DIQ(36,INS_",",.112,"E")
+16 SET SL3=$$GET1^DIQ(36,INS_",",.113,"E")
+17 SET CITY=$$GET1^DIQ(36,INS_",",.114,"E")
+18 ; Use State 2 digit abbreviation
+19 SET ST=$$GET1^DIQ(5,$$GET1^DIQ(36,INS_",",.115,"I")_",",1)
+20 SET ZIP=$$GET1^DIQ(36,INS_",",.116,"E")
SET ZIP4=""
+21 IF $LENGTH(ZIP)>5
SET ZIP4=$PIECE(ZIP,"-",2)
+22 SET ADDRESS=""
+23 IF SL1'=""
SET ADDRESS=ADDRESS_SL1
+24 IF SL2'=""
SET ADDRESS=ADDRESS_", "_SL2
+25 IF SL3'=""
SET ADDRESS=ADDRESS_", "_SL3
+26 IF CITY'=""
SET ADDRESS=ADDRESS_", "_CITY
+27 IF ST'=""
SET ADDRESS=ADDRESS_", "_ST
+28 IF ZIP'=""
SET ADDRESS=ADDRESS_", "_ZIP
+29 SET TYPCOV=$$GET1^DIQ(36,INS_",",.13,"E")
+30 SET FTF=$$FTFIC^IBCNEUT7(INS)
+31 ;
+32 ; Set DATA for Report output (filtered)
+33 IF IBCOMDT("IBOUT")="R"
SET FOUND=0
SET DATA=""
Begin DoDot:3
+34 SET $PIECE(DATA,U,1)=ADDRESS
+35 ; If there is missing data add it to DATA
+36 IF IBCOMDT("IBSL1")
IF SL1=""
SET $PIECE(DATA,U,2)="YES"
+37 IF IBCOMDT("IBSL2")
IF SL2=""
SET $PIECE(DATA,U,3)="YES"
+38 IF IBCOMDT("IBSL3")
IF SL3=""
SET $PIECE(DATA,U,4)="YES"
+39 IF IBCOMDT("IBCTY")
IF CITY=""
SET $PIECE(DATA,U,5)="YES"
+40 IF IBCOMDT("IBST")
IF ST=""
SET $PIECE(DATA,U,6)="YES"
+41 IF IBCOMDT("IBZIP")
IF (ZIP4="")!(ZIP4="0000")!(ZIP4="9999")
SET $PIECE(DATA,U,7)="YES"
+42 IF IBCOMDT("IBCOV")
IF TYPCOV=""
SET $PIECE(DATA,U,8)="YES"
+43 IF IBCOMDT("IBFTF")
IF FTF["UNK"
SET $PIECE(DATA,U,9)="YES"
+44 FOR I=2:1:$LENGTH(DATA,U)
IF $PIECE(DATA,U,I)'=""
SET FOUND=1
End DoDot:3
+45 ;
+46 ; Set DATA for Excel output (doesn't filter, includes all 8 fields)
+47 IF IBCOMDT("IBOUT")="E"
SET FOUND=1
SET DATA=""
Begin DoDot:3
+48 SET $PIECE(DATA,U,1)=ADDRESS
+49 SET $PIECE(DATA,U,2)=$SELECT(SL1="":"YES",1:"NO")
+50 SET $PIECE(DATA,U,3)=$SELECT(SL2="":"YES",1:"NO")
+51 SET $PIECE(DATA,U,4)=$SELECT(SL3="":"YES",1:"NO")
+52 SET $PIECE(DATA,U,5)=$SELECT(CITY="":"YES",1:"NO")
+53 SET $PIECE(DATA,U,6)=$SELECT(ST="":"YES",1:"NO")
+54 SET $PIECE(DATA,U,7)="NO"
+55 IF (ZIP4="")!(ZIP4="0000")!(ZIP4="9999")
SET $PIECE(DATA,U,7)="YES"
+56 SET $PIECE(DATA,U,8)=$SELECT(TYPCOV="":"YES",1:"NO")
+57 SET $PIECE(DATA,U,9)=$SELECT(FTF["UNK":"YES",1:"NO")
End DoDot:3
+58 ;
+59 ; Add to ^TMP global for printing if missing data was found or Excel output
+60 IF FOUND
SET ^TMP(IBCOMDT("$J"),"PR",INSNM,INS)=DATA
+61 KILL DATA
End DoDot:2
End DoDot:1
+62 KILL ^TMP(IBCNRTN,IBCOMDT("$J"))
+63 ;
+64 ; Print Excel or Report output
+65 DO PRINT
+66 QUIT
+67 ;
PRINT ; Print Report
+1 NEW CRT,CT,DASHES,DATA,EORMSG,IBHDT,IBPGC,IBQUIT,INS,LCT,NODATA,NONEMSG,MAXCNT,STOP,%
+2 SET EORMSG="*** End of Report ***"
+3 SET NONEMSG="*** NO DATA FOUND ***"
+4 SET HDRNAME="INSURANCE COMPANY MISSING DATA"
+5 DO NOW^%DTC
+6 SET IBHDT=$$DAT2^IBOUTL($EXTRACT(%,1,12))
+7 SET (IBPGC,IBQUIT,LCT,STOP,ZSTOP)=0
+8 SET $PIECE(DASHES,"-",81)=""
+9 SET MAXCNT=IOSL-2
SET CRT=1
+10 IF 'IOST["C-"
SET MAXCNT=IOSL-6
SET CRT=0
+11 IF IBCOMDT("IBOUT")="E"
DO EHDR
+12 IF IBCOMDT("IBOUT")="R"
DO HEADER(HDRNAME,IBHDT)
+13 ; NO DATA FOUND
IF '$DATA(^TMP(IBCOMDT("$J"),"PR"))
WRITE !,NONEMSG,!
GOTO PRINTQ
+14 ;
+15 ; Loop through ^TMP(IBCOMDT("$J"),"PR") and display report output
+16 SET INS=0
FOR
SET INS=$ORDER(^TMP(IBCOMDT("$J"),"PR",INS))
if INS=""!(IBQUIT!$GET(ZTSTOP))
QUIT
Begin DoDot:1
+17 SET CT=0
FOR
SET CT=$ORDER(^TMP(IBCOMDT("$J"),"PR",INS,CT))
if CT=""!(IBQUIT!$GET(ZTSTOP))
QUIT
Begin DoDot:2
+18 ; Excel output
+19 IF IBCOMDT("IBOUT")="E"
Begin DoDot:3
+20 SET DATA=^TMP(IBCOMDT("$J"),"PR",INS,CT)
+21 WRITE INS,U,$SELECT($PIECE(DATA,U,1)="":"<no address on file>",1:$PIECE(DATA,U,1)),U
+22 WRITE $PIECE(DATA,U,2,9),!
End DoDot:3
+23 ; Report output
+24 IF IBCOMDT("IBOUT")="R"
DO REPORT
End DoDot:2
End DoDot:1
+25 ;
PRINTQ ;
+1 ; Only display 'End of Report' and PAUSE if User didn't enter a '^' (IBQUIT=1)
+2 IF '(IBQUIT!$GET(ZTSTOP))
Begin DoDot:1
+3 WRITE !,EORMSG,!
+4 DO PAUSE
End DoDot:1
+5 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
QUIT
+6 ; Close Device
+7 DO ^%ZISC
+8 QUIT
+9 ;
REPORT ; Report output
+1 NEW ADDOF,RPT1,RPT2,RPT3,RPT4
+2 ; Use Line counter (LCT) to keep all Insurance Company data on the same page
+3 SET (RPT1,RPT2,RPT3,RPT4)=""
+4 SET DATA=^TMP(IBCOMDT("$J"),"PR",INS,CT)
+5 SET ADDOF=$PIECE(DATA,U,1)
+6 ;
+7 ; Build line 1
+8 IF $PIECE(DATA,U,2)="YES"
SET RPT1=RPT1_$SELECT(RPT1'="":", ",1:"")_"STREET LINE 1"
+9 IF $PIECE(DATA,U,3)="YES"
SET RPT1=RPT1_$SELECT(RPT1'="":", ",1:"")_"STREET LINE 2"
+10 IF $PIECE(DATA,U,4)="YES"
SET RPT1=RPT1_$SELECT(RPT1'="":", ",1:"")_"STREET LINE 3"
+11 IF RPT1'=""
SET LCT=LCT+1
+12 ; Build line 2
+13 IF $PIECE(DATA,U,5)="YES"
SET RPT2=RPT2_$SELECT(RPT2'="":", ",1:"")_"CITY"
+14 IF $PIECE(DATA,U,6)="YES"
SET RPT2=RPT2_$SELECT(RPT2'="":", ",1:"")_"STATE"
+15 IF $PIECE(DATA,U,7)="YES"
SET RPT2=RPT2_$SELECT(RPT2'="":", ",1:"")_"ZIP+4"
+16 IF RPT2'=""
SET LCT=LCT+1
+17 ; Determine lines 3 and 4
+18 IF $PIECE(DATA,U,8)'=""
SET RPT3=1
SET LCT=LCT+1
+19 IF $PIECE(DATA,U,9)'=""
SET RPT4=1
SET LCT=LCT+1
+20 ;
+21 ;I ($Y+LCT)>MAXCNT D S LCT=0 Q:(IBQUIT!$G(ZTSTOP)) D HEADER(HDRNAME,IBHDT)
+22 IF ($Y+LCT)>MAXCNT
Begin DoDot:1
+23 ;Write blank lines to fill page prior to displaying "Type <Enter> to continue or '^' to exit:"
+24 IF $EXTRACT(IOST,1,2)["C-"
IF MAXCNT<51
FOR LIN=1:1:(MAXCNT-$Y)
WRITE !
End DoDot:1
SET LCT=0
DO HEADER(HDRNAME,IBHDT)
+25 IF IBQUIT!$GET(ZSTOP)
QUIT
+26 ;
+27 ; Display results
+28 WRITE !,INS,!
+29 WRITE $SELECT(ADDOF="":"<no address on file>",1:ADDOF),!
+30 IF RPT1'=""
WRITE ?8,RPT1,!
+31 IF RPT2'=""
WRITE ?8,RPT2,!
+32 IF RPT3
WRITE ?8,"TYPE OF COVERAGE",!
+33 IF RPT4
WRITE ?8,"FILING TIME FRAME",!
+34 QUIT
+35 ;
+36 ;
+1 NEW DIR,DTOUT,DUOUT,LIN,OFFSET,X,Y
+2 IF IBPGC>0
IF $EXTRACT(IOST,1,2)["C-"
Begin DoDot:1
+3 IF MAXCNT<51
FOR LIN=1:1:(MAXCNT-$Y)
WRITE !
+4 DO PAUSE
End DoDot:1
if (IBQUIT!$GET(ZTSTOP))
QUIT
+5 IF $EXTRACT(IOST,1,2)'["C-"
IF $$S^%ZTLOAD()
SET ZTSTOP=1
QUIT
+6 SET IBPGC=IBPGC+1
IF IBPGC>1!($EXTRACT(IOST,1,2)["C-")
WRITE @IOF
+7 ; Excel and Report Header
+8 IF IBCOMDT("IBOUT")="E"
IF IBPGC=1
DO EHDR
+9 IF IBCOMDT("IBOUT")="R"
Begin DoDot:1
+10 WRITE HDRNAME
+11 SET HDRDATE=HDRDATE_" Page: "_+IBPGC
SET OFFSET=(80-($LENGTH(HDRDATE)+1))
+12 WRITE ?OFFSET,HDRDATE,!
+13 WRITE "Missing Data: ",IBCOMDT("SUBHD"),!,DASHES,!
End DoDot:1
+14 QUIT
+15 ;
EHDR ; Excel Header
+1 NEW EHDR
+2 SET EHDR="INSURANCE COMPANY"_U_"ADDRESS ON FILE"_U_"STREET LINE 1"_U_"STREET LINE 2 "_U_"STREET LINE 3"
+3 SET EHDR=EHDR_U_"CITY"_U_"STATE"_U_"ZIP+4"_U_"TYPE OF COVERAGE"_U_"FILING TIME FRAME"
+4 WRITE !,HDRNAME,"^",IBHDT,!,"Missing Data: SEARCH ALL",!,"**YES indicates Missing Data**"
+5 WRITE !!,EHDR,!
+6 QUIT
+7 ;
PAUSE ; Pause for screen output.
+1 NEW DIR,DIRUT,DTOUT,DUOUT
+2 if $EXTRACT(IOST,1,2)'["C-"
QUIT
+3 SET DIR(0)="E"
DO ^DIR
KILL DIR
IF $DATA(DIRUT)!($DATA(DUOUT))
SET IBQUIT=1
KILL DIR,DIRUT,DTOUT,DUOUT
+4 QUIT