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

IBDFUA.m

Go to the documentation of this file.
  1. IBDFUA ;ALB/CJM - ENCOUNTER FORM (utilities - IBDFU continued) ;NOV 16,1992
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
  1. ;
  1. PRNTVAR ;defines the screen and graphics variables needed for printing
  1. ;
  1. D GSET^%ZISS,KILL^%ZISS
  1. S X="IOINHI;IOINORM;IOUON;IOUOFF"
  1. D ENDR^%ZISS
  1. S (IORVON,IORVOFF)=""
  1. K X
  1. Q
  1. ;
  1. KPRNTVAR ;kills the variables defined by PRINTVAR
  1. ; -- (actually, kills all screen paramters)
  1. ;
  1. Q:$D(VALMEVL) ;don't kill if listman, (needed for 1010T)
  1. D GKILL^%ZISS,KILL^%ZISS
  1. Q
  1. ;
  1. GRAPHICS() ; returns1 if graphic mode available with characters needed
  1. ;sets graphics characters to "|" and "_" if graphics mode not available
  1. ;If not a raster device, then returns 0 no matter what
  1. ;
  1. N GRAPHICS S GRAPHICS=0
  1. I IBDEVICE("RASTER"),($G(IOG0)'=""),($G(IOG1)'=""),($G(IOVL)'=""),($G(IOHL)'=""),($G(IOBLC)'=""),($G(IOBRC)'=""),($G(IOTLC)'=""),($G(IOTRC)'="") S GRAPHICS=1
  1. S:IBDEVICE("PCL") GRAPHICS=1
  1. S:'GRAPHICS (IOVL,IOBLC,IOBRC)="|",(IOHL,IOTRC,IOTLC)="_"
  1. Q GRAPHICS
  1. ;
  1. DEVICE(LISTMAN,IBDEVICE) ;sets various device parameters
  1. ;LISTMAN=1 if display for the List Manager, 0 otherwise
  1. ;returns IBDEVICE array - pass by reference
  1. ;Also, the required Kernel screen and graphics parameters are defined.
  1. ;
  1. ;IBDEVICE array elements:
  1. ; RASTER = 1 if IOXY defined and not a crt
  1. ; CRT= 1 if crt
  1. ; GRAPHICS=1 if graphic mode available with characters needed.
  1. ; PCL=1 if the printer language is PCL, version 5 or higher.
  1. ; SIMPLEX,DUPLEX_LONG,DUPLEX_SHORT are printer control statements for simplex, duplex long-edge binding, duplex short-edge binding - in an encounter form file until added to the TERMINAL TYPE file in future version of KERNEL
  1. ;
  1. S IBDEVICE("TCP")=0
  1. ;
  1. I LISTMAN D Q
  1. .S IBDEVICE("LISTMAN")=1
  1. .S IBDEVICE("CRT")=1
  1. .S IBDEVICE("PCL")=0
  1. .S IBDEVICE("GRAPHICS")=0
  1. .S IBDEVICE("RASTER")=0
  1. .D NOGRPHCS^IBDFU5
  1. ;
  1. ;not List Manager ->
  1. ;
  1. S (IBDEVICE("LISTMAN"),IBDEVICE("RASTER"),IBDEVICE("CRT"),IBDEVICE("PCL"))=0
  1. I $E($G(IOST),1,2)="C-" S IBDEVICE("CRT")=1
  1. I $G(IOXY)'="" S IBDEVICE("RASTER")=1
  1. D PRNTVAR
  1. S (IBDEVICE("SIMPLEX"),IBDEVICE("DUPLEX_LONG"),IBDEVICE("DUPLEX_SHORT"))=""
  1. I 'IBDEVICE("CRT"),'LISTMAN,$G(IOST(0)) D
  1. .N TERMINAL,TEMP
  1. .S TERMINAL=$G(^IBE(357.94,+$O(^IBE(357.94,"B",IOST(0),0)),0))
  1. .S IBDEVICE("TCP")=+$P(TERMINAL,"^",6)
  1. .S IBDEVICE("RESET")=$P(TERMINAL,"^",7)
  1. .S IBDEVICE("PCL")=$S($P(TERMINAL,"^",2)=1:1,1:0)
  1. .I $P(TERMINAL,"^",3)]"" S TEMP="S IBDEVICE(""SIMPLEX"")="_$P(TERMINAL,"^",3) X TEMP
  1. .;
  1. .;do not define duplex mode if simplex not defined
  1. .Q:IBDEVICE("SIMPLEX")=""
  1. .I $P(TERMINAL,"^",4)]"" S TEMP="S IBDEVICE(""DUPLEX_LONG"")="_$P(TERMINAL,"^",4) X TEMP
  1. .I $P(TERMINAL,"^",5)]"" S TEMP="S IBDEVICE(""DUPLEX_SHORT"")="_$P(TERMINAL,"^",5) X TEMP
  1. ;
  1. S IBDEVICE("GRAPHICS")=$$GRAPHICS
  1. Q
  1. ;
  1. KILL ;this can be used just before calling List Manager to save space in the symbol table
  1. ;
  1. ;K XQORKBD,VALMKEY,VALMDDF,VALMHDR,%,CTRLCOL,DIC,Y,X,POP,DX,DY,%I,D,ZTSK,DIC,D0,POP,SEL,DIR,DIE,DR,DA,DIK,DD,%DT,%H,IOP,COL,J
  1. ;
  1. K %,CTRLCOL,DIC,Y,X,POP,DX,DY,%I,D,ZTSK,DIC,D0,POP,SEL,DIR,DIE,DR,DA,DIK,DD,%DT,%H,IOP,COL,J
  1. Q