source: FOIAVistA/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUEPRNT.m@ 1582

Last change on this file since 1582 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1TIUEPRNT ; SLC/JER - Handle print following entry/edit ; 5/3/04
2 ;;1.0;TEXT INTEGRATION UTILITIES;**20,100,182**;Jun 20, 1997
3PRINT(TIUDA) ; Prompt and print
4 N TIUDEV,TIUTYP,DFN,TIUPMTHD,TIUD0,TIUMSG,TIUPR,TIUDARR,TIUFLAG,TIUDPRM
5 N TIUPGRP,TIUPFHDR,TIUPFNBR
6 S TIUMSG="Print this note"
7 S TIUPR=$$READ^TIUU("Y",TIUMSG,"No")
8 I +TIUPR'>0 Q
9 I +$$ISADDNDM^TIULC1(TIUDA) S TIUDA=$P($G(^TIU(8925,+TIUDA,0)),U,6)
10 I $G(^TIU(8925,TIUDA,21)) S TIUDA=^TIU(8925,TIUDA,21)
11 S TIUD0=$G(^TIU(8925,TIUDA,0))
12 S TIUTYP=$P(TIUD0,U),DFN=$P(TIUD0,U,2)
13 I +TIUTYP'>0 Q
14 S TIUPMTHD=$$PRNTMTHD^TIULG(+TIUTYP)
15 S TIUPGRP=$$PRNTGRP^TIULG(+TIUTYP)
16 S TIUPFHDR=$$PRNTHDR^TIULG(+TIUTYP)
17 S TIUPFNBR=$$PRNTNBR^TIULG(+TIUTYP)
18 D DOCPRM^TIULC1(+TIUTYP,.TIUDPRM,TIUDA)
19 I +$P($G(TIUDPRM(0)),U,9) S TIUFLAG=$$FLAG^TIUPRPN3
20 ;I $G(TIUPMTHD)]"",+$G(TIUPGRP),($G(TIUPFHDR)]""),($G(TIUPFNBR)]"") S TIUDARR(TIUPMTHD,$G(TIUPGRP)_"$"_TIUPFHDR_";"_DFN,1,TIUDA)=TIUPFNBR
21 ;E S TIUDARR(TIUPMTHD,DFN,1,TIUDA)=""
22 I $G(TIUPMTHD)']"" W !,$C(7),"No Print Method Defined for ",$P($G(^TIU(8925.1,+TIUTYP,0)),U) H 2 G PRINT1X
23 ; -- P182: Set array same whether or not flds are defined, with
24 ; TIUPGRP piece possibly 0, TIUPFHDR piece possibly null, and
25 ; array value TIUPFNBR possibly null.
26 S TIUDARR(TIUPMTHD,+$G(TIUPGRP)_"$"_$G(TIUPFHDR)_";"_DFN,1,TIUDA)=$G(TIUPFNBR)
27 S TIUDEV=$$DEVICE^TIUDEV(.IO) ; Get Device/allow queueing
28 I $S($G(IO)']"":1,TIUDEV']"":1,1:0) D ^%ZISC Q
29 I $D(IO("Q")) D QUE^TIUDEV("PRINTQ^TIUEPRNT",TIUDEV) G PRINT1X
30 D PRINTQ,^%ZISC
31PRINT1X ; Exit single document print
32 Q
33PRINTQ ; Entry point for queued single document print
34 D PRNTDOC(TIUPMTHD,.TIUDARR)
35 Q
36PRNTDOC(TIUPMTHD,TIUDARR) ; Print a single document type
37 ; Receives TIUPMTHD & TIUDARR
38 N TIUDA
39 I '+$D(TIUDARR) W !,"No Documents selected." Q
40 M ^TMP("TIUPR",$J)=TIUDARR(TIUPMTHD)
41 I TIUPMTHD']"" D G PRNTDOCX
42 . W !!,"No Print Method Defined for ",$P(TIUTYP,U,2) H 2
43 X TIUPMTHD
44PRNTDOCX ; Exit single document type print
45 K ^TMP("TIUPR",$J)
46 Q
Note: See TracBrowser for help on using the repository browser.