Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: VAQDIS17

VAQDIS17.m

Go to the documentation of this file.
VAQDIS17 ;ALB/JFP - PDX,DEVICE SELECTER FOR DISPLAY;01MAR93
 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
DEVICE(TYPE) ; -- Gets device
ASK S %ZIS="MNQ" D ^%ZIS I POP D EXIT Q -1
 I IOM<80 D ^%ZISC W !!,$C(7),"RIGHT MARGIN MUST BE AT LEAST 80",!! G ASK
 I POP D EXIT QUIT -1
 ; -- output to screen
 I IO=IO(0) K %ZIS QUIT 1
 ; -- Task to device
 I IO'=IO(0)  D QUEUE,EXIT Q 0
 QUIT 0
 ;
QUEUE ;QUEUE FOR PRINTING
 S ZTRTN="TASK^VAQDIS17",ZTIO=ION,ZTDTH=$H
 S ZTDESC="Print list PDX"
 F X="DFN","VALMCC","TYPE","^TMP(""VAQIDX"",$J,","^TMP(""VAQIDXSG"",$J,","VALMY(" S ZTSAVE(X)=""
 D SAVE^VALM1,^%ZTLOAD
 D PRTLQ^VALM1
 I $D(ZTSK) W !!,"Output Queued - Task number = ",ZTSK D PAUSE^VAQUTL95
 ;D:'$D(ZTQUEUED) ^%ZISC
 QUIT
 ;
TASK ; -- Task for printing
 I TYPE="ALL" D ALL S:$D(ZTQUEUED) ZTREQ="@" QUIT
 I TYPE="SEL" D SELECT S:$D(ZTQUEUED) ZTREQ="@" QUIT
 QUIT
 ;
ALL ; -- Builds display for all segments
 S ENTRY="",VALMCNT=0,ROOT="^TMP(""VAQD3"",$J)" K @ROOT
 F  S ENTRY=$O(^TMP("VAQIDXSG",$J,ENTRY)) Q:ENTRY=""  D BLDDIS^VAQDIS15 Q:$$S^%ZTLOAD
 Q:$$S^%ZTLOAD
 D BLD
 ; W @IOF
 D ^%ZISC
ALLQ QUIT
 ;
SELECT ; -- Builds display for selected segments
 S ENTRY="",VALMCNT=0,ROOT="^TMP(""VAQD3"",$J)" K @ROOT
 F  S ENTRY=$O(VALMY(ENTRY))  Q:ENTRY=""  D BLDDIS^VAQDIS15 Q:$$S^%ZTLOAD
 Q:$$S^%ZTLOAD
 D BLD
 ; W @IOF
 D ^%ZISC
SELQ QUIT
 ;
BLD ; -- Builds printed output
 D ENDLN^VAQDIS15
 S NROOT="^TMP(""VAQD3"",$J)"
 N VALMAR
 S VALMAR=$$ROOT^VAQDIS20(NROOT)
 D CHGCAP^VALM("ENTRY","")
 D CHGCAP^VALM("SEGMENTS","")
 D CHGCAP^VALM("SEGNAME","")
 D PRTLS^VALM1 ; -- list processor routine
 QUIT
 ;
EXIT ; -- Kill device/queue variables
 K ZTSK,%ZIS,ZTRTN,ZTIO,ZTDESC,ZTSAVE
 K DTOUT,DUOUT,DIRUT,DIROUT
 K ROOT
 QUIT
END ; -- End of code
 QUIT