DGRPTP ;ALB/RMO - Print 10-10T Registration;06 JAN 1997 2:56 pm
;;5.3;Registration;**108**;08/13/93
;
QUE(DFN,DFN1,DGIO) ;Queue 10-10T print
; Input -- DFN Patient IEN
; DFN1 Disposition multiple IEN (optional)
; DGIO Registration printer array
; Output -- None
N %,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK
S ZTDESC="PRINT 10-10T"_$S($G(DFN1):" - FROM REGISTRATION",1:"")
S ZTRTN="EN^DGRPTP"
S ZTSAVE("DFN")=DFN
S:$G(DFN1)'="" ZTSAVE("DFN1")=DFN1
S ZTIO=DGIO(10)
D NOW^%DTC S ZTDTH=%
D ^%ZTLOAD
W:$D(ZTSK) " (Task: ",ZTSK,")"
Q
;
ENDEV(DFN,DFN1) ;Entry point to ask device before printing 10-10T
; Input -- DFN Patient IEN
; DFN1 Disposition multiple IEN (optional)
; Output -- None
S DGPGM="EN^DGRPTP"
S DGVAR="DFN"_$S($G(DFN1)'="":"^DFN1",1:"")
W !!?5,*7,"This output requires 132 column output to a PRINTER."
W !?5,"Output to SCREEN will be unreadable."
D ZIS^DGUTQ G Q:POP
;
EN ;Entry point to print a 10-10T
; Input -- DFN Patient IEN
; DFN1 Disposition multiple IEN (optional)
; DGOPT Registration variable (optional)
; Output -- None
N DGLNE,DGNAM,DGPGE,DGSSN
U IO
D SETUP(DFN,.DGNAM,.DGSSN,.DGLNE,.DGPGE)
I $$FIRST^DGUTL G Q ;first heading of report utility
D EN^DGRPTP1(DFN,$G(DFN1),DGNAM,DGSSN,.DGLNE,DGPGE)
Q D ENDREP^DGUTL ;end report utility
I '$D(DGOPT) D CLOSE^DGUTQ ;close device
Q
;
SETUP(DFN,DGNAM,DGSSN,DGLNE,DGPGE) ;Set-up print variables
; Input -- DFN Patient IEN
; Output -- DGNAM Patient name
; DGSSN Patient ssn
; DGLNE Line format array
; DGPGE Page number
N X
S DGLNE("ULC")=$S('($D(IOST)#2):"-",IOST["C-":"-",1:"_")
S DGLNE("D")="",DGLNE("DD")="",DGLNE("UL")=""
S $P(DGLNE("D"),"-",131)="",$P(DGLNE("DD"),"=",131)="",$P(DGLNE("UL"),DGLNE("ULC"),131)=""
S DGNAM=$P($G(^DPT(DFN,0)),U,1),X=$P($G(^(0)),U,9)
S DGSSN=$S(X'="":$E(X,1,3)_"-"_$E(X,4,5)_"-"_$E(X,6,10),1:"")
S DGPGE=0
Q
;
HD(DGNAM,DGSSN,DGLNE) ;Print header
; Input -- DGNAM Patient name
; DGSSN Patient ssn
; DGLNE Line format array
; Output -- None
W @IOF,!,DGNAM,?116,DGSSN,!,DGLNE("DD")
Q
;
FT(DFN,DFN1,DGLNE,DGPGE) ;Print footer
; Input -- DFN Patient IEN
; DFN1 Disposition multiple IEN (optional)
; DGLNE Line format array
; DGPGE Page number
; Output -- None
N DGCLK,DGDIS,Y,%
W !,DGLNE("DD")
S DGDIS(0)=$G(^DPT(DFN,"DIS",+$G(DFN1),0))
S Y=$P(DGDIS(0),U,1) X ^DD("DD") W !,"Reg Date/Time: ",Y
D NOW^%DTC S Y=% X ^DD("DD") W ?52,"PRINTED: ",Y
S DGCLK=$P(DGDIS(0),U,5)
W ?98,"Clerk: ",$S($P($G(^VA(200,+DGCLK,0)),U,2)'="":$P(^(0),U,2)_"/"_DGCLK,DGCLK:"unk/"_DGCLK,1:"")
W !!!!,"AUTOMATED VA FORM 10-10T",?120,"PAGE: ",DGPGE
Q
DGRPTP ;ALB/RMO - Print 10-10T Registration;06 JAN 1997 2:56 pm
+1 ;;5.3;Registration;**108**;08/13/93
+2 ;
QUE(DFN,DFN1,DGIO) ;Queue 10-10T print
+1 ; Input -- DFN Patient IEN
+2 ; DFN1 Disposition multiple IEN (optional)
+3 ; DGIO Registration printer array
+4 ; Output -- None
+5 NEW %,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK
+6 SET ZTDESC="PRINT 10-10T"_$SELECT($GET(DFN1):" - FROM REGISTRATION",1:"")
+7 SET ZTRTN="EN^DGRPTP"
+8 SET ZTSAVE("DFN")=DFN
+9 IF $GET(DFN1)'=""
SET ZTSAVE("DFN1")=DFN1
+10 SET ZTIO=DGIO(10)
+11 DO NOW^%DTC
SET ZTDTH=%
+12 DO ^%ZTLOAD
+13 IF $DATA(ZTSK)
WRITE " (Task: ",ZTSK,")"
+14 QUIT
+15 ;
ENDEV(DFN,DFN1) ;Entry point to ask device before printing 10-10T
+1 ; Input -- DFN Patient IEN
+2 ; DFN1 Disposition multiple IEN (optional)
+3 ; Output -- None
+4 SET DGPGM="EN^DGRPTP"
+5 SET DGVAR="DFN"_$SELECT($GET(DFN1)'="":"^DFN1",1:"")
+6 WRITE !!?5,*7,"This output requires 132 column output to a PRINTER."
+7 WRITE !?5,"Output to SCREEN will be unreadable."
+8 DO ZIS^DGUTQ
IF POP
GOTO Q
+9 ;
EN ;Entry point to print a 10-10T
+1 ; Input -- DFN Patient IEN
+2 ; DFN1 Disposition multiple IEN (optional)
+3 ; DGOPT Registration variable (optional)
+4 ; Output -- None
+5 NEW DGLNE,DGNAM,DGPGE,DGSSN
+6 USE IO
+7 DO SETUP(DFN,.DGNAM,.DGSSN,.DGLNE,.DGPGE)
+8 ;first heading of report utility
IF $$FIRST^DGUTL
GOTO Q
+9 DO EN^DGRPTP1(DFN,$GET(DFN1),DGNAM,DGSSN,.DGLNE,DGPGE)
Q ;end report utility
DO ENDREP^DGUTL
+1 ;close device
IF '$DATA(DGOPT)
DO CLOSE^DGUTQ
+2 QUIT
+3 ;
SETUP(DFN,DGNAM,DGSSN,DGLNE,DGPGE) ;Set-up print variables
+1 ; Input -- DFN Patient IEN
+2 ; Output -- DGNAM Patient name
+3 ; DGSSN Patient ssn
+4 ; DGLNE Line format array
+5 ; DGPGE Page number
+6 NEW X
+7 SET DGLNE("ULC")=$SELECT('($DATA(IOST)#2):"-",IOST["C-":"-",1:"_")
+8 SET DGLNE("D")=""
SET DGLNE("DD")=""
SET DGLNE("UL")=""
+9 SET $PIECE(DGLNE("D"),"-",131)=""
SET $PIECE(DGLNE("DD"),"=",131)=""
SET $PIECE(DGLNE("UL"),DGLNE("ULC"),131)=""
+10 SET DGNAM=$PIECE($GET(^DPT(DFN,0)),U,1)
SET X=$PIECE($GET(^(0)),U,9)
+11 SET DGSSN=$SELECT(X'="":$EXTRACT(X,1,3)_"-"_$EXTRACT(X,4,5)_"-"_$EXTRACT(X,6,10),1:"")
+12 SET DGPGE=0
+13 QUIT
+14 ;
HD(DGNAM,DGSSN,DGLNE) ;Print header
+1 ; Input -- DGNAM Patient name
+2 ; DGSSN Patient ssn
+3 ; DGLNE Line format array
+4 ; Output -- None
+5 WRITE @IOF,!,DGNAM,?116,DGSSN,!,DGLNE("DD")
+6 QUIT
+7 ;
FT(DFN,DFN1,DGLNE,DGPGE) ;Print footer
+1 ; Input -- DFN Patient IEN
+2 ; DFN1 Disposition multiple IEN (optional)
+3 ; DGLNE Line format array
+4 ; DGPGE Page number
+5 ; Output -- None
+6 NEW DGCLK,DGDIS,Y,%
+7 WRITE !,DGLNE("DD")
+8 SET DGDIS(0)=$GET(^DPT(DFN,"DIS",+$GET(DFN1),0))
+9 SET Y=$PIECE(DGDIS(0),U,1)
XECUTE ^DD("DD")
WRITE !,"Reg Date/Time: ",Y
+10 DO NOW^%DTC
SET Y=%
XECUTE ^DD("DD")
WRITE ?52,"PRINTED: ",Y
+11 SET DGCLK=$PIECE(DGDIS(0),U,5)
+12 WRITE ?98,"Clerk: ",$SELECT($PIECE($GET(^VA(200,+DGCLK,0)),U,2)'="":$PIECE(^(0),U,2)_"/"_DGCLK,DGCLK:"unk/"_DGCLK,1:"")
+13 WRITE !!!!,"AUTOMATED VA FORM 10-10T",?120,"PAGE: ",DGPGE
+14 QUIT