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

ACGSMENU.m

Go to the documentation of this file.
ACGSMENU ;IHS/OIRM/DSD/THL,AEF - CONTROL CIS HEADINGS AND MENUS; [ 03/28/2000  8:45 AM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;ROUTINE TO CONTROL CIS HEADINGS AND MENUS
EN ;
TITLE ;EP;TO DISPLAY PACKAGE HEADER
 D HOME
 D HEAD
EXIT K ACGZ,ACGPREFX,ACGTRM
 Q:'+$G(ACGSPARA)
 I $D(ACGY),ACGY'="" W !!?80-$L(ACGY)/2,ACGY
 Q
 D HOME^%ZIS
 W @IOF
 ;Q:$G(ACGPARA)=""   ;*** TESTING - AEF ***
 Q:$D(ACGQUIT)
 I '$D(^ACGPARA(ACGPODA,0)) D EN1^ACGSPARA W:$D(IOF) @IOF
 I '$P(^ACGPARA(ACGPODA,0),U) D EN1^ACGSPARA W:$D(IOF) @IOF
 I '$D(^ACGPARA(ACGPODA,0)) W "You must select a primary PROCUREMENT OFFICE for this session",!
HEAD1 S ACGPARA=^ACGPARA(ACGPODA,0),ACG4=$P(ACGPARA,U,3)
 N ACGX
 D H1
 D HDVS
 I DUZ S ACGX=$P(^VA(200,DUZ,0),U),ACGX=$P($P(ACGX,",",2)," ")_" "_$P(ACGX,","),ACGX="CURRENT USER: "_ACGX W !?80-$L(ACGX)\2,ACGX K ACGX
 Q
H1 F ACGJ=0:1:3 S ACGX=$T(TEXT+ACGJ),ACGX=$P(ACGX,";;",2) W !?80-$L(ACGX)\2,ACGX
 Q
HDVS K ACGX
 I $D(^ACGPARA(ACGPODA,0)) S ACGPARA=^(0),ACG4=$P(ACGPARA,U,3),ACGX="CONTRACTING OFFICE: "_$P(^ACGPO(+ACGPARA,0),U)_"  ("_ACG4_")"
 S:'$D(ACGPREFX) ACGPREFX="ACG"
 I $D(ACGPREFX),$D(^DIC(9.4,"C",ACGPREFX)) S ACGZ=$O(^DIC(9.4,"C",ACGPREFX,0)),ACGZ=$P(^DIC(9.4,ACGZ,22,0),U,3),ACGZ="VERSION "_ACGZ
 I IOST["C-" W:$D(ACGZ) !?80-$L(ACGZ)\2,ACGZ
 W:$D(ACGX) !?80-$L(ACGX)\2,ACGX
 Q
MM ;EP
 S ACGY="MAIN MENU" G TITLE
RP S ACGY="REPORTS" G TITLE
CM S ACGY="CONTRACTS MANAGEMENT" G TITLE
SR S ACGY="SYSTEM REPORTS" G TITLE
SS ;EP
 S ACGY="SYSTEM SETUP" G TITLE
NQ ;;
TEXT ;;*****************************************
 ;;**      INDIAN HEALTH SERVICE          **
 ;;**   CONTRACTS INFORMATION SYSTEM      **
 ;;*****************************************
HOME ;XEP;TO SET UP SCREEN HANDLING VARIABLES FOR CIS
 ;;THIS POINT IS CALLED BY ARMS DURING INTERFACE BETWEEN ARMS AND CIS
 S IOP="HOME" D ^%ZIS
 S ACGTRM=^%ZIS(2,IOST(0),5),ACGON=$P(ACGTRM,U,4),ACGOF=$P(ACGTRM,U,5),ACGEOP="W "_$P(ACGTRM,U,7),ACGEOL="W "_$P(ACGTRM,U,6),ACGXY=$P(^%ZIS(2,IOST(0),1),U,5),ACGXYWIN="S DX=0,DY=4 "_ACGXY,ACGW3="X ACGWIN2,ACGXYW2,ACGEOP"
 S ACGDXY="S DX=0,DY=18 "_ACGXY,ACGDW="X ACGWIND,ACGDXY,ACGEOP,ACGM",ACGWIND="U 0:0 W *27,*91,19,*59,24,""r"""
 S ACGREY="D:'$D(DISYS) OS^DII I $D(^DD(""OS"",DISYS,""XY"")) S DIZ=^(""XY"") I DIZ?1U.E S IOX=0,IOY=DY X DIZ K IOX,IOY"
 S ACGXYW2="S DX=0,DY=19 "_ACGXY_" X ACGREY",ACGWIN="U 0:0 W *27,*91,4,*59,24,""r""",ACGWIN2="U 0:0 W *27,*91,20,*59,24,""r""",ACGCWIN="W *27,*91,1,*59,24,""r"" X ACGEOP K ACGMESS,ACGDDIE",ACGOWIN="X ACGWIN,ACGXYWIN,ACGEOP,ACGM"
 S ACGW2="X ACGWIN2,ACGXYW2,ACGEOP,ACGM W !",ACGM="W:$D(ACGMESS) !,@ACGON,""     "",ACGMESS,?75,@ACGOF W:'$D(ACGMESS) !,@ACGON,"" "",?79,@ACGOF",ACGPAUSE="D HOLD^ACGSMENU"
 S ACGRECNT="N ACGI S ACGI=0 F ACGJ=1:1 S ACGI=$O(ACGDA(ACGI)) Q:'ACGI  I ACGI>ACGJ S ACG0(ACGJ)=ACG0(ACGI),ACGDA(ACGJ)=ACGDA(ACGI) K ACG0(ACGI),ACGDA(ACGI),@ACGGREC@(ACGI) S @ACGGREC@(ACGJ,ACGDA(ACGJ))="""",$P(^ACGREC(ACGDA(ACGJ),0),U,26)=ACGJ"
 S ACGCHK="I '$D(^ACGREC(ACGDA,0)) S DA=ACGDA,DIK=""^ACGREC("" D ^DIK K DIK,@ACGGREC@(ACGJ) S ACGQUIT="""",ACGJ=ACGJ-1"
 S ACGW="W ACGI F ACGJ=1:1:$L(ACGDR,"";"") S ACG=$P(ACGDR,"";"",ACGJ),ACGRDA=ACGI S ACGX=$P(ACGF(ACG),"";;"",3),ACGD=ACGFD(ACG),X="""" X ACGX W ?ACGD,X"
 S ACGXEXP="S ACGDEXP=$T(@ACGDSCDA+2^ACGSDSC) X $P(ACGDEXP,"";;"",2) S:ACGDATA'="""" @ACGEXP@(ACGREC,ACGDA)=ACGDATA"
 S ACGXEXPD="K @ACGEXP@(ACGREC,ACGDA)"
 Q
HOLD ;EP;TO HOLD SCREEN
 S DIR(0)="EOA",DIR("A")="Press RETURN to continue....." W ! D ^DIR S:$D(DUOUT) ACGQUIT="" K DIR,DIRUT,DUOUT,DQOUT
 Q