IVMRTSR1 ;ALB/KCL - Report of IVM Transmissions ; 30 April 1993
;;Version 2.0 ; INCOME VERIFICATION MATCH ;; 21-OCT-94
;
;
EN ;entry point
;
; Convert FM dates to external date format
S Y=IVMBEG D DD^%DT S IVMBEG=Y
S Y=IVMEND D DD^%DT S IVMEND=Y
;
HDR ; Print header of report
D HEAD
;
SINGLE ; Check for a single date report
; Print body of report for single transmission date
I IVMFLG=1 D
.I 'IVMCNT W !!!!!,?19,"No data found for the date: ",$E(IVMBEG,1,12),!!! Q
.W !!?10,"Transmission Date: ",$E(IVMBEG,1,12)
.W !?10,"Number of Transmissions: ",IVMCNT
.W !?21,"Without Status: ",+$G(IVMCNTS("NO"))
.W !?24,"Transmitted: ",+$G(IVMCNTS(0))
.W !?27,"Received: ",+$G(IVMCNTS(1))
.W !?27,"In Error: ",+$G(IVMCNTS(2))
.W !?21,"Re-transmitted: ",+$G(IVMCNTS(3))
.W !?10,"Multiple Transmissions: ",IVMCNT1," (of ",IVMCNT,")"
.W !!!,?10,"Category",?30,"With Insurance",?55,"Without Insurance"
.W !,?10,"-----------",?30,"--------------",?55,"-----------------"
.W !,?10,"Category A ",?30,$J(IVMIN,10),?55,$J(IVMNIN,10)
.W !,?10,"Category C ",?30,$J(IVMCIN,10),?55,$J(IVMCNIN,10)
;
IVMRNG ; Check for a date range report
; Print body of report summary for a range of transmssion dates
I IVMFLG=2 D
.I 'IVMCNT W !!!!!,?7,"No data found for the date range: "_$E(IVMBEG,1,12)_" to "_$E(IVMEND,1,12),!!! Q
.W !!,?10,"Date range selected: "_$E(IVMBEG,1,12)_" to "_$E(IVMEND,1,12),!!
.W !,?10,"Total number of days: ",?49,$J(IVMRNG,10)
.W !,?10,"Total number of transmissions: ",?49,$J(IVMCNT,10)," (",$J(IVMCNT/IVMRNG,0,2),"/day)"
.W !!?12,"Without Status: ",+$G(IVMCNTS("NO")),?50,"In Error: ",+$G(IVMCNTS(3))
.W !?15,"Transmitted: ",+$G(IVMCNTS(0)),?44,"Re-transmitted: ",+$G(IVMCNTS(2))
.W !?18,"Received: ",+$G(IVMCNTS(1)),?36,"Multiple Transmissions: ",IVMCNT1," (of ",IVMCNT,")"
.W !!,?35,"With Insurance",?55,"Without Insurance"
.W !,?35,"--------------",?55,"-----------------"
.W !,?10,"Percentage Category A:",?38,$J(IVMPERA,6,2)_" %",?61,$J(IVMPERB,6,2)_" %"
.W !,?10,"Percentage Category C:",?38,$J(IVMPERC1,6,2)_" %",?61,$J(IVMPERC,6,2)_" %"
;
D PAUSE^IVMRUTL I $G(IVMQUIT) G ENQ
;
MQRY ; Display Master Query Results
I $E(IOST,1,2)["C-" D HEAD
I $E(IOST,1,2)'["C-" W !
D HEAD1
I '$D(^IVM(301.9,1,10)) W !!?22,"-- No Master Queries Received --" G ENQ1
S IVM=0 F S IVM=$O(^IVM(301.9,1,10,IVM)) Q:'IVM S IVMD=$G(^(IVM,0)) D I $G(IVMQUIT) G ENQ
.Q:'IVMD
.I $Y>(IOSL-5) D PAUSE^IVMRUTL Q:$G(IVMQUIT) D HEAD,HEAD1
.W !?16,$E(+IVMD,1,3)+1700
.W ?30,$$DAT1^IVMUFNC4($P(IVMD,"^",2),1)
.W ?50,$$DAT1^IVMUFNC4($P(IVMD,"^",3),1)
;
ENQ1 D PAUSE^IVMRUTL
;
ENQ ; cleanup
K IVMCNIN,IVMCNT,IVMCNT1,IVMFLG,IVMIN,IVMNIN,IVMPERA,IVMPERB,IVMPERC,IVMRNG,Y,IVMQUIT,IVM,IVMD,IVMCIN,IVMPERC1
Q
;
HEAD ; Display header.
I $E(IOST,1,2)["C-" W @IOF ; init form feed to CRT, subsequent form feeds to all other devices
W !?5,"====================================================================="
W !?5,"|",?17,"INCOME VERIFICATION MATCH - TRANSMISSIONS REPORT",?73,"|"
W !?5,"|",?73,"|"
W !?5,"|-------------------------------------------------------------------|"
S Y=DT D DD^%DT W !?5,"|",?25,"DATE PRINTED: ",Y,?73,"|"
W !?5,"====================================================================="
Q
;
HEAD1 ; Display Master Query header.
W !!?16,"** M A S T E R Q U E R Y S U M M A R Y **"
W !!?10,"Query Income Year",?30,"Date Received",?50,"Date Responded"
W !?10,"-----------------",?30,"-----------------",?50,"-----------------"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIVMRTSR1 3587 printed Dec 13, 2024@02:02:40 Page 2
IVMRTSR1 ;ALB/KCL - Report of IVM Transmissions ; 30 April 1993
+1 ;;Version 2.0 ; INCOME VERIFICATION MATCH ;; 21-OCT-94
+2 ;
+3 ;
EN ;entry point
+1 ;
+2 ; Convert FM dates to external date format
+3 SET Y=IVMBEG
DO DD^%DT
SET IVMBEG=Y
+4 SET Y=IVMEND
DO DD^%DT
SET IVMEND=Y
+5 ;
HDR ; Print header of report
+1 DO HEAD
+2 ;
SINGLE ; Check for a single date report
+1 ; Print body of report for single transmission date
+2 IF IVMFLG=1
Begin DoDot:1
+3 IF 'IVMCNT
WRITE !!!!!,?19,"No data found for the date: ",$EXTRACT(IVMBEG,1,12),!!!
QUIT
+4 WRITE !!?10,"Transmission Date: ",$EXTRACT(IVMBEG,1,12)
+5 WRITE !?10,"Number of Transmissions: ",IVMCNT
+6 WRITE !?21,"Without Status: ",+$GET(IVMCNTS("NO"))
+7 WRITE !?24,"Transmitted: ",+$GET(IVMCNTS(0))
+8 WRITE !?27,"Received: ",+$GET(IVMCNTS(1))
+9 WRITE !?27,"In Error: ",+$GET(IVMCNTS(2))
+10 WRITE !?21,"Re-transmitted: ",+$GET(IVMCNTS(3))
+11 WRITE !?10,"Multiple Transmissions: ",IVMCNT1," (of ",IVMCNT,")"
+12 WRITE !!!,?10,"Category",?30,"With Insurance",?55,"Without Insurance"
+13 WRITE !,?10,"-----------",?30,"--------------",?55,"-----------------"
+14 WRITE !,?10,"Category A ",?30,$JUSTIFY(IVMIN,10),?55,$JUSTIFY(IVMNIN,10)
+15 WRITE !,?10,"Category C ",?30,$JUSTIFY(IVMCIN,10),?55,$JUSTIFY(IVMCNIN,10)
End DoDot:1
+16 ;
IVMRNG ; Check for a date range report
+1 ; Print body of report summary for a range of transmssion dates
+2 IF IVMFLG=2
Begin DoDot:1
+3 IF 'IVMCNT
WRITE !!!!!,?7,"No data found for the date range: "_$EXTRACT(IVMBEG,1,12)_" to "_$EXTRACT(IVMEND,1,12),!!!
QUIT
+4 WRITE !!,?10,"Date range selected: "_$EXTRACT(IVMBEG,1,12)_" to "_$EXTRACT(IVMEND,1,12),!!
+5 WRITE !,?10,"Total number of days: ",?49,$JUSTIFY(IVMRNG,10)
+6 WRITE !,?10,"Total number of transmissions: ",?49,$JUSTIFY(IVMCNT,10)," (",$JUSTIFY(IVMCNT/IVMRNG,0,2),"/day)"
+7 WRITE !!?12,"Without Status: ",+$GET(IVMCNTS("NO")),?50,"In Error: ",+$GET(IVMCNTS(3))
+8 WRITE !?15,"Transmitted: ",+$GET(IVMCNTS(0)),?44,"Re-transmitted: ",+$GET(IVMCNTS(2))
+9 WRITE !?18,"Received: ",+$GET(IVMCNTS(1)),?36,"Multiple Transmissions: ",IVMCNT1," (of ",IVMCNT,")"
+10 WRITE !!,?35,"With Insurance",?55,"Without Insurance"
+11 WRITE !,?35,"--------------",?55,"-----------------"
+12 WRITE !,?10,"Percentage Category A:",?38,$JUSTIFY(IVMPERA,6,2)_" %",?61,$JUSTIFY(IVMPERB,6,2)_" %"
+13 WRITE !,?10,"Percentage Category C:",?38,$JUSTIFY(IVMPERC1,6,2)_" %",?61,$JUSTIFY(IVMPERC,6,2)_" %"
End DoDot:1
+14 ;
+15 DO PAUSE^IVMRUTL
IF $GET(IVMQUIT)
GOTO ENQ
+16 ;
MQRY ; Display Master Query Results
+1 IF $EXTRACT(IOST,1,2)["C-"
DO HEAD
+2 IF $EXTRACT(IOST,1,2)'["C-"
WRITE !
+3 DO HEAD1
+4 IF '$DATA(^IVM(301.9,1,10))
WRITE !!?22,"-- No Master Queries Received --"
GOTO ENQ1
+5 SET IVM=0
FOR
SET IVM=$ORDER(^IVM(301.9,1,10,IVM))
if 'IVM
QUIT
SET IVMD=$GET(^(IVM,0))
Begin DoDot:1
+6 if 'IVMD
QUIT
+7 IF $Y>(IOSL-5)
DO PAUSE^IVMRUTL
if $GET(IVMQUIT)
QUIT
DO HEAD
DO HEAD1
+8 WRITE !?16,$EXTRACT(+IVMD,1,3)+1700
+9 WRITE ?30,$$DAT1^IVMUFNC4($PIECE(IVMD,"^",2),1)
+10 WRITE ?50,$$DAT1^IVMUFNC4($PIECE(IVMD,"^",3),1)
End DoDot:1
IF $GET(IVMQUIT)
GOTO ENQ
+11 ;
ENQ1 DO PAUSE^IVMRUTL
+1 ;
ENQ ; cleanup
+1 KILL IVMCNIN,IVMCNT,IVMCNT1,IVMFLG,IVMIN,IVMNIN,IVMPERA,IVMPERB,IVMPERC,IVMRNG,Y,IVMQUIT,IVM,IVMD,IVMCIN,IVMPERC1
+2 QUIT
+3 ;
HEAD ; Display header.
+1 ; init form feed to CRT, subsequent form feeds to all other devices
IF $EXTRACT(IOST,1,2)["C-"
WRITE @IOF
+2 WRITE !?5,"====================================================================="
+3 WRITE !?5,"|",?17,"INCOME VERIFICATION MATCH - TRANSMISSIONS REPORT",?73,"|"
+4 WRITE !?5,"|",?73,"|"
+5 WRITE !?5,"|-------------------------------------------------------------------|"
+6 SET Y=DT
DO DD^%DT
WRITE !?5,"|",?25,"DATE PRINTED: ",Y,?73,"|"
+7 WRITE !?5,"====================================================================="
+8 QUIT
+9 ;
HEAD1 ; Display Master Query header.
+1 WRITE !!?16,"** M A S T E R Q U E R Y S U M M A R Y **"
+2 WRITE !!?10,"Query Income Year",?30,"Date Received",?50,"Date Responded"
+3 WRITE !?10,"-----------------",?30,"-----------------",?50,"-----------------"
+4 QUIT