GMTSLTR ; SLC/JER,KER - Print Big Letters ; 08/27/2002
;;2.7;Health Summary;**28,56**;Oct 20, 1995
;
; External Reference
; DBIA 10060 ^VA(200
; DBIA 2056 $$GET1^DIQ (file #200)
;
Q:'$L($G(GMTSLTR)) I '$D(^UTILITY("GMTSLTR",$J,"A")) D ^GMTSLTR2
B1 ; Setup for banner print
N GMTSDIV,GMTSLEN,GMTSXXX,GMTSBLNK,X
S GMTSLEN=$L(GMTSLTR),GMTSDIV=60\GMTSLEN,$P(GMTSXXX,"X",(GMTSDIV\5+1))=""
S $P(GMTSBLNK," ",(GMTSDIV\5+1))=""
S GMTSLTY=$E(GMTSLTR,1,$S(GMTSLEN'>2:GMTSLEN,1:(IOM\GMTSDIV-1))),GMTSLTX=""
F GMTSLT1=1:1:$L(GMTSLTY) D
. I $A(GMTSLTY,GMTSLT1)>32,$D(^UTILITY("GMTSLTR",$J,$E(GMTSLTY,GMTSLT1))) D
. . S GMTSLTX=GMTSLTX_$E(GMTSLTY,GMTSLT1)
W:$L($P($G(GMTSSC),U,2)) "HEALTH SUMMARY REPORT FOR PATIENTS AT: ",$P(GMTSSC,U,2)
I $L($P($G(GMTSSC),U,4)) S X=$P(GMTSSC,U,4) D REGDTM4^GMTSU W !?34,"FOR: ",X
I $L($P($G(GMTSSC),U,5)) S X=$P(GMTSSC,U,5) D REGDTM4^GMTSU W " TO ",X
W ! I $D(GMTSTITL) W ?(IOM-$L(GMTSTITL)\2),GMTSTITL,!!
I $D(GMTSPNM) W ?10,"Patient: ",GMTSPNM,!
I $D(GMTSWDN) W "Hospital Location: ",GMTSWDN,!
I $D(DUZ) W ?33,"User: ",$$GET1^DIQ(200,(+($G(DUZ))_","),.01),!
W ! F GMTSLT=1:1:6 D B2
W @IOF
K GMTSLT1,GMTSLT2,GMTSLT3,GMTSLTX,GMTSLTY,GMTSLT,^UTILITY("GMTSLTR",$J)
Q
B2 ; Write Banner
W ! F GMTSLT1=9:-1:1 W ! F GMTSLT3=1:1:$L(GMTSLTX) S X=^UTILITY("GMTSLTR",$J,$E(GMTSLTX,GMTSLT3)) W " " F GMTSLT2=1:1:5 W $S($E(X,(GMTSLT2-1*9+GMTSLT1)):GMTSXXX,1:GMTSBLNK)
Q
GMTSLTR ; SLC/JER,KER - Print Big Letters ; 08/27/2002
+1 ;;2.7;Health Summary;**28,56**;Oct 20, 1995
+2 ;
+3 ; External Reference
+4 ; DBIA 10060 ^VA(200
+5 ; DBIA 2056 $$GET1^DIQ (file #200)
+6 ;
+7 IF '$LENGTH($GET(GMTSLTR))
QUIT
IF '$DATA(^UTILITY("GMTSLTR",$JOB,"A"))
DO ^GMTSLTR2
B1 ; Setup for banner print
+1 NEW GMTSDIV,GMTSLEN,GMTSXXX,GMTSBLNK,X
+2 SET GMTSLEN=$LENGTH(GMTSLTR)
SET GMTSDIV=60\GMTSLEN
SET $PIECE(GMTSXXX,"X",(GMTSDIV\5+1))=""
+3 SET $PIECE(GMTSBLNK," ",(GMTSDIV\5+1))=""
+4 SET GMTSLTY=$EXTRACT(GMTSLTR,1,$SELECT(GMTSLEN'>2:GMTSLEN,1:(IOM\GMTSDIV-1)))
SET GMTSLTX=""
+5 FOR GMTSLT1=1:1:$LENGTH(GMTSLTY)
Begin DoDot:1
+6 IF $ASCII(GMTSLTY,GMTSLT1)>32
IF $DATA(^UTILITY("GMTSLTR",$JOB,$EXTRACT(GMTSLTY,GMTSLT1)))
Begin DoDot:2
+7 SET GMTSLTX=GMTSLTX_$EXTRACT(GMTSLTY,GMTSLT1)
End DoDot:2
End DoDot:1
+8 IF $LENGTH($PIECE($GET(GMTSSC),U,2))
WRITE "HEALTH SUMMARY REPORT FOR PATIENTS AT: ",$PIECE(GMTSSC,U,2)
+9 IF $LENGTH($PIECE($GET(GMTSSC),U,4))
SET X=$PIECE(GMTSSC,U,4)
DO REGDTM4^GMTSU
WRITE !?34,"FOR: ",X
+10 IF $LENGTH($PIECE($GET(GMTSSC),U,5))
SET X=$PIECE(GMTSSC,U,5)
DO REGDTM4^GMTSU
WRITE " TO ",X
+11 WRITE !
IF $DATA(GMTSTITL)
WRITE ?(IOM-$LENGTH(GMTSTITL)\2),GMTSTITL,!!
+12 IF $DATA(GMTSPNM)
WRITE ?10,"Patient: ",GMTSPNM,!
+13 IF $DATA(GMTSWDN)
WRITE "Hospital Location: ",GMTSWDN,!
+14 IF $DATA(DUZ)
WRITE ?33,"User: ",$$GET1^DIQ(200,(+($GET(DUZ))_","),.01),!
+15 WRITE !
FOR GMTSLT=1:1:6
DO B2
+16 WRITE @IOF
+17 KILL GMTSLT1,GMTSLT2,GMTSLT3,GMTSLTX,GMTSLTY,GMTSLT,^UTILITY("GMTSLTR",$JOB)
+18 QUIT
B2 ; Write Banner
+1 WRITE !
FOR GMTSLT1=9:-1:1
WRITE !
FOR GMTSLT3=1:1:$LENGTH(GMTSLTX)
SET X=^UTILITY("GMTSLTR",$JOB,$EXTRACT(GMTSLTX,GMTSLT3))
WRITE " "
FOR GMTSLT2=1:1:5
WRITE $SELECT($EXTRACT(X,(GMTSLT2-1*9+GMTSLT1)):GMTSXXX,1:GMTSBLNK)
+2 QUIT