BLRESRNS ; IHS/OIT/MKK - Laboratory E-SIG Report: Not Signed ; [ 04/12/06 4:00 PM ]
;;5.2;LR;**1022**;September 20, 2007
;
; NOTE: The LRIDT variable in the LR("BLRA") index is stored as
; as a negative number. That is why, in several places,
; the code does -(LRIDT).
;
EP ; "Ersatz" EP
W $C(7),$C(7),$C(7),!
W "Use Label Only",!
W $C(7),$C(7),$C(7),!
Q
;
; This routine prints a summary listing of all providers in the
; BLRA LAB PHYSICIANS file that have not signed E-SIG transactions.
NREVNSGN ; EP
NEW RESP,STATUS,LRIDT,LRIIDT,LRDFN,LRAA
NEW TOTAL,NVTOT,NSTOT
NEW PHYNAME
;
S RESP=0,STATUS=""
F S RESP=$O(^LR("BLRA",RESP)) Q:RESP="" D
. F S STATUS=$O(^LR("BLRA",RESP,STATUS)) Q:STATUS="" D
.. I STATUS=2 Q ; If Signed, skip it
.. ;
.. S STATUS(STATUS)=""
.. S LRIIDT=""
.. F S LRIIDT=$O(^LR("BLRA",RESP,STATUS,LRIIDT)) Q:LRIIDT="" D
... S LRDFN=""
... F S LRDFN=$O(^LR("BLRA",RESP,STATUS,LRIIDT,LRDFN)) Q:LRDFN="" D
.... S LRAA=$O(^LR("BLRA",RESP,STATUS,LRIIDT,LRDFN,""))
.... I LRAA="" Q
.... ;
.... S TOTAL(RESP)=1+$G(TOTAL(RESP))
.... S TOTAL(RESP,STATUS)=1+$G(TOTAL(RESP,STATUS))
;
I $$GETDEV^BLRESIGR="Q" D Q
. W !,"Output Device Error",!!
. D BLRGPGR^BLRGMENU()
;
D NREVSUMH
;
S (NSTOT,NVTOT,RESP,TOTAL)=0
F S RESP=$O(TOTAL(RESP)) Q:RESP=""!(QFLG="Q") D
. I LINES>MAXLINES D BLRGHWPN^BLRGMENU(.PG,.QFLG) I QFLG="Q" Q
. S PHYNAME=$P($G(^VA(200,RESP,0)),"^",1)
. ;
. W PHYNAME
. W ?34,$J(+$G(TOTAL(RESP,0)),5) ; Not viewed
. W ?44,$J(+$G(TOTAL(RESP,1)),5) ; Not signed
. W ?54,$J(+$G(TOTAL(RESP)),5) ; Total of both
. W !
. S LINES=LINES+1
. S TOTAL=TOTAL+$G(TOTAL(RESP))
. S NVTOT=NVTOT+$G(TOTAL(RESP,0))
. S NSTOT=NSTOT+$G(TOTAL(RESP,1))
;
W ?34,"-----"
W ?44,"-----"
W ?54,"-----"
W !
W "TOTAL"
W ?34,$J(NVTOT,5)
W ?44,$J(NSTOT,5)
W ?54,$J(TOTAL,5)
W !
;
D ^%ZISC
;
D BLRGPGR^BLRGMENU()
;
Q
;
; NOT SIGNED Summary Report Header
NREVSUMH ;
K HEADER
S HEADER(1)="LAB E-SIG NOT SIGNED SUMMARY REPORT"
S HEADER(2)="SORTED BY RESPONSIBLE PHYSICIAN"
S HEADER(3)=" "
S $E(HEADER(4),35)=$J("Not",5)
S $E(HEADER(4),45)=$J("Not",5)
;
S $E(HEADER(5),35)=$J("View",5)
S $E(HEADER(5),45)=$J("Sign",5)
;
S HEADER(6)="Physician Name"
S $E(HEADER(6),35)="Count"
S $E(HEADER(6),45)="Count"
S $E(HEADER(6),55)="Total"
;
Q
BLRESRNS ; IHS/OIT/MKK - Laboratory E-SIG Report: Not Signed ; [ 04/12/06 4:00 PM ]
+1 ;;5.2;LR;**1022**;September 20, 2007
+2 ;
+3 ; NOTE: The LRIDT variable in the LR("BLRA") index is stored as
+4 ; as a negative number. That is why, in several places,
+5 ; the code does -(LRIDT).
+6 ;
EP ; "Ersatz" EP
+1 WRITE $CHAR(7),$CHAR(7),$CHAR(7),!
+2 WRITE "Use Label Only",!
+3 WRITE $CHAR(7),$CHAR(7),$CHAR(7),!
+4 QUIT
+5 ;
+6 ; This routine prints a summary listing of all providers in the
+7 ; BLRA LAB PHYSICIANS file that have not signed E-SIG transactions.
NREVNSGN ; EP
+1 NEW RESP,STATUS,LRIDT,LRIIDT,LRDFN,LRAA
+2 NEW TOTAL,NVTOT,NSTOT
+3 NEW PHYNAME
+4 ;
+5 SET RESP=0
SET STATUS=""
+6 FOR
SET RESP=$ORDER(^LR("BLRA",RESP))
IF RESP=""
QUIT
Begin DoDot:1
+7 FOR
SET STATUS=$ORDER(^LR("BLRA",RESP,STATUS))
IF STATUS=""
QUIT
Begin DoDot:2
+8 ; If Signed, skip it
IF STATUS=2
QUIT
+9 ;
+10 SET STATUS(STATUS)=""
+11 SET LRIIDT=""
+12 FOR
SET LRIIDT=$ORDER(^LR("BLRA",RESP,STATUS,LRIIDT))
IF LRIIDT=""
QUIT
Begin DoDot:3
+13 SET LRDFN=""
+14 FOR
SET LRDFN=$ORDER(^LR("BLRA",RESP,STATUS,LRIIDT,LRDFN))
IF LRDFN=""
QUIT
Begin DoDot:4
+15 SET LRAA=$ORDER(^LR("BLRA",RESP,STATUS,LRIIDT,LRDFN,""))
+16 IF LRAA=""
QUIT
+17 ;
+18 SET TOTAL(RESP)=1+$GET(TOTAL(RESP))
+19 SET TOTAL(RESP,STATUS)=1+$GET(TOTAL(RESP,STATUS))
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+20 ;
+21 IF $$GETDEV^BLRESIGR="Q"
Begin DoDot:1
+22 WRITE !,"Output Device Error",!!
+23 DO BLRGPGR^BLRGMENU()
End DoDot:1
QUIT
+24 ;
+25 DO NREVSUMH
+26 ;
+27 SET (NSTOT,NVTOT,RESP,TOTAL)=0
+28 FOR
SET RESP=$ORDER(TOTAL(RESP))
IF RESP=""!(QFLG="Q")
QUIT
Begin DoDot:1
+29 IF LINES>MAXLINES
DO BLRGHWPN^BLRGMENU(.PG,.QFLG)
IF QFLG="Q"
QUIT
+30 SET PHYNAME=$PIECE($GET(^VA(200,RESP,0)),"^",1)
+31 ;
+32 WRITE PHYNAME
+33 ; Not viewed
WRITE ?34,$JUSTIFY(+$GET(TOTAL(RESP,0)),5)
+34 ; Not signed
WRITE ?44,$JUSTIFY(+$GET(TOTAL(RESP,1)),5)
+35 ; Total of both
WRITE ?54,$JUSTIFY(+$GET(TOTAL(RESP)),5)
+36 WRITE !
+37 SET LINES=LINES+1
+38 SET TOTAL=TOTAL+$GET(TOTAL(RESP))
+39 SET NVTOT=NVTOT+$GET(TOTAL(RESP,0))
+40 SET NSTOT=NSTOT+$GET(TOTAL(RESP,1))
End DoDot:1
+41 ;
+42 WRITE ?34,"-----"
+43 WRITE ?44,"-----"
+44 WRITE ?54,"-----"
+45 WRITE !
+46 WRITE "TOTAL"
+47 WRITE ?34,$JUSTIFY(NVTOT,5)
+48 WRITE ?44,$JUSTIFY(NSTOT,5)
+49 WRITE ?54,$JUSTIFY(TOTAL,5)
+50 WRITE !
+51 ;
+52 DO ^%ZISC
+53 ;
+54 DO BLRGPGR^BLRGMENU()
+55 ;
+56 QUIT
+57 ;
+58 ; NOT SIGNED Summary Report Header
NREVSUMH ;
+1 KILL HEADER
+2 SET HEADER(1)="LAB E-SIG NOT SIGNED SUMMARY REPORT"
+3 SET HEADER(2)="SORTED BY RESPONSIBLE PHYSICIAN"
+4 SET HEADER(3)=" "
+5 SET $EXTRACT(HEADER(4),35)=$JUSTIFY("Not",5)
+6 SET $EXTRACT(HEADER(4),45)=$JUSTIFY("Not",5)
+7 ;
+8 SET $EXTRACT(HEADER(5),35)=$JUSTIFY("View",5)
+9 SET $EXTRACT(HEADER(5),45)=$JUSTIFY("Sign",5)
+10 ;
+11 SET HEADER(6)="Physician Name"
+12 SET $EXTRACT(HEADER(6),35)="Count"
+13 SET $EXTRACT(HEADER(6),45)="Count"
+14 SET $EXTRACT(HEADER(6),55)="Total"
+15 ;
+16 QUIT