source: WorldVistAEHR/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQDIS17.m@ 1005

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1VAQDIS17 ;ALB/JFP - PDX,DEVICE SELECTER FOR DISPLAY;01MAR93
2 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
3DEVICE(TYPE) ; -- Gets device
4ASK S %ZIS="MNQ" D ^%ZIS I POP D EXIT Q -1
5 I IOM<80 D ^%ZISC W !!,$C(7),"RIGHT MARGIN MUST BE AT LEAST 80",!! G ASK
6 I POP D EXIT QUIT -1
7 ; -- output to screen
8 I IO=IO(0) K %ZIS QUIT 1
9 ; -- Task to device
10 I IO'=IO(0) D QUEUE,EXIT Q 0
11 QUIT 0
12 ;
13QUEUE ;QUEUE FOR PRINTING
14 S ZTRTN="TASK^VAQDIS17",ZTIO=ION,ZTDTH=$H
15 S ZTDESC="Print list PDX"
16 F X="DFN","VALMCC","TYPE","^TMP(""VAQIDX"",$J,","^TMP(""VAQIDXSG"",$J,","VALMY(" S ZTSAVE(X)=""
17 D SAVE^VALM1,^%ZTLOAD
18 D PRTLQ^VALM1
19 I $D(ZTSK) W !!,"Output Queued - Task number = ",ZTSK D PAUSE^VAQUTL95
20 ;D:'$D(ZTQUEUED) ^%ZISC
21 QUIT
22 ;
23TASK ; -- Task for printing
24 I TYPE="ALL" D ALL S:$D(ZTQUEUED) ZTREQ="@" QUIT
25 I TYPE="SEL" D SELECT S:$D(ZTQUEUED) ZTREQ="@" QUIT
26 QUIT
27 ;
28ALL ; -- Builds display for all segments
29 S ENTRY="",VALMCNT=0,ROOT="^TMP(""VAQD3"",$J)" K @ROOT
30 F S ENTRY=$O(^TMP("VAQIDXSG",$J,ENTRY)) Q:ENTRY="" D BLDDIS^VAQDIS15 Q:$$S^%ZTLOAD
31 Q:$$S^%ZTLOAD
32 D BLD
33 ; W @IOF
34 D ^%ZISC
35ALLQ QUIT
36 ;
37SELECT ; -- Builds display for selected segments
38 S ENTRY="",VALMCNT=0,ROOT="^TMP(""VAQD3"",$J)" K @ROOT
39 F S ENTRY=$O(VALMY(ENTRY)) Q:ENTRY="" D BLDDIS^VAQDIS15 Q:$$S^%ZTLOAD
40 Q:$$S^%ZTLOAD
41 D BLD
42 ; W @IOF
43 D ^%ZISC
44SELQ QUIT
45 ;
46BLD ; -- Builds printed output
47 D ENDLN^VAQDIS15
48 S NROOT="^TMP(""VAQD3"",$J)"
49 N VALMAR
50 S VALMAR=$$ROOT^VAQDIS20(NROOT)
51 D CHGCAP^VALM("ENTRY","")
52 D CHGCAP^VALM("SEGMENTS","")
53 D CHGCAP^VALM("SEGNAME","")
54 D PRTLS^VALM1 ; -- list processor routine
55 QUIT
56 ;
57EXIT ; -- Kill device/queue variables
58 K ZTSK,%ZIS,ZTRTN,ZTIO,ZTDESC,ZTSAVE
59 K DTOUT,DUOUT,DIRUT,DIROUT
60 K ROOT
61 QUIT
62END ; -- End of code
63 QUIT
Note: See TracBrowser for help on using the repository browser.