TIUPRPN ;SLC/MJC - Print SF 509 Progress Notes ;;7-6-95 9:00pm
;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
; Writes SF 509- Progress Note to screen or paper.
DEVICE(TIUFLAG,TIUSPG) ; pick your device
;
W ! K IOP S %ZIS="Q" D ^%ZIS I POP K POP G EXIT
S TIUFLAG=+$G(TIUFLAG),TIUSPG=+$G(TIUSPG)
I $D(IO("Q")) K IO("Q") D G EXIT
.S ZTRTN="ENTRY1^TIUPRPN",ZTSAVE("^TMP(""TIUPR"",$J,")=""
.S ZTSAVE("TIUFLAG")="",ZTSAVE("TIUSPG")="",ZTDESC="TIU PRT PNS"
.D ^%ZTLOAD W !,$S($D(ZTSK):"Request Queued!",1:"Request Canceled!")
.K ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,TIUFLAG,TIUSPG
.D HOME^%ZIS
U IO D ENTRY1,^%ZISC
Q
ENTRY ; Entry point to print progress notes-called from ^TIUA
N TIUSPG
U IO
ENTRY1 ; Entry point from above
N TIUERR,D0,DN,Y,DTOUT,DUOUT,DIRUT,DIROUT
I $E(IOST)="C" S (TIUSPG,TIUFLAG)=1
I '+$G(TIUFLAG) S TIUSPG=1
K ^TMP("TIULQ",$J)
I $D(ZTQUEUED) S ZTREQ="@" ; Tell TaskMan to delete Task log entry
D PRINT^TIUPRPN1($G(TIUFLAG),$G(TIUSPG))
EXIT K ^TMP("TIULQ",$J),^TMP("TIUPR",$J)
Q
TIUPRPN ;SLC/MJC - Print SF 509 Progress Notes ;;7-6-95 9:00pm
+1 ;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
+2 ; Writes SF 509- Progress Note to screen or paper.
DEVICE(TIUFLAG,TIUSPG) ; pick your device
+1 ;
+2 WRITE !
KILL IOP
SET %ZIS="Q"
DO ^%ZIS
IF POP
KILL POP
GOTO EXIT
+3 SET TIUFLAG=+$GET(TIUFLAG)
SET TIUSPG=+$GET(TIUSPG)
+4 IF $DATA(IO("Q"))
KILL IO("Q")
Begin DoDot:1
+5 SET ZTRTN="ENTRY1^TIUPRPN"
SET ZTSAVE("^TMP(""TIUPR"",$J,")=""
+6 SET ZTSAVE("TIUFLAG")=""
SET ZTSAVE("TIUSPG")=""
SET ZTDESC="TIU PRT PNS"
+7 DO ^%ZTLOAD
WRITE !,$SELECT($DATA(ZTSK):"Request Queued!",1:"Request Canceled!")
+8 KILL ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,TIUFLAG,TIUSPG
+9 DO HOME^%ZIS
End DoDot:1
GOTO EXIT
+10 USE IO
DO ENTRY1
DO ^%ZISC
+11 QUIT
ENTRY ; Entry point to print progress notes-called from ^TIUA
+1 NEW TIUSPG
+2 USE IO
ENTRY1 ; Entry point from above
+1 NEW TIUERR,D0,DN,Y,DTOUT,DUOUT,DIRUT,DIROUT
+2 IF $EXTRACT(IOST)="C"
SET (TIUSPG,TIUFLAG)=1
+3 IF '+$GET(TIUFLAG)
SET TIUSPG=1
+4 KILL ^TMP("TIULQ",$JOB)
+5 ; Tell TaskMan to delete Task log entry
IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+6 DO PRINT^TIUPRPN1($GET(TIUFLAG),$GET(TIUSPG))
EXIT KILL ^TMP("TIULQ",$JOB),^TMP("TIUPR",$JOB)
+1 QUIT