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

ENLBL9.m

Go to the documentation of this file.
  1. ENLBL9 ;(WASH ISC)/DH-Companion Listing for Equipment Labels ;11.27.96
  1. ;;7.0;ENGINEERING;**12,35,80,90**;Aug 17, 1993;Build 25
  1. ; Print companion list (if desired)
  1. ; Also asks if previously printed labels should be reprinted
  1. EN S DIR(0)="Y",DIR("A")="New labels only",DIR("B")="YES"
  1. S DIR("?",1)="The system records the printing of equipment bar code labels. If you do not"
  1. S DIR("?",2)="wish to have labels printed again if they have already been printed at least"
  1. S DIR("?")="once, please enter 'YES' at this time."
  1. D ^DIR K DIR Q:$D(DIRUT)
  1. S ENEQREP=+Y
  1. EN1 K ENEQIO W !,"Would you like a companion listing for this set of labels" S %=1 D YN^DICN Q:%=2!(%<0) I %<1 D HLP G EN
  1. S %ZIS("A")="Select PRINTER for Companion Listing: ",%ZIS="NQ",%ZIS("B")="" D ^%ZIS K %ZIS I POP D ERR G EN
  1. I IOM<80 D HOME^%ZIS W !,*7,"Device selected must have a MARGIN WIDTH of at least 80 char.",!! G EN
  1. I $E(^%ZOSF("OS"),1,3)="MSM",IO=IO(0) D ^%ZISC W !,*7,"MSM sites may not send Companion List to HOME device.",!! G EN
  1. S ENEQIO=IO,ENEQIOSL=IOSL,ENEQIOF=IOF,ENEQION=ION,ENEQIOST=IOST,ENEQIOST(0)=IOST(0),ENEQPG=0,ENEQY=0 S:$D(IO("S")) ENEQIO("S")=IO("S") S X="N",%DT="T" D ^%DT X ^DD("DD") S ENEQDATE=Y,ENHDMRGN=79-$L(ENEQDATE)
  1. D HOME^%ZIS
  1. I $D(DUZ),$D(^VA(200,DUZ,0)) S ENEQUSER=$P(^(0),U)
  1. E S ENEQUSER=""
  1. Q
  1. ;
  1. CPRNT ;I $D(^ENG(6914,DA,3)),$P(^(3),U,10)]"" Q ;Suppress if already printed
  1. ;I $F(ENEQIO,"/") S ENEQIO=$P(ENEQIO,"/",$L(ENEQIO,"/"))
  1. U ENEQIO I ENEQY=0!((ENEQIOSL-ENEQY)<8) D CHDR
  1. K EN S (ENMAN,ENMOD,ENSN,ENCAT,ENUSE,ENSER,ENLOC,ENPMN)="",ENMEN=$P(^ENG(6914,DA,0),U,2) S:$D(^ENG(6914,DA,1)) EN(1)=^(1) S:$D(^(3)) EN(3)=^(3)
  1. I $D(EN(1)) S ENMAN=$P(EN(1),U,4),ENMOD=$P(EN(1),U,2),ENSN=$P(EN(1),U,3),ENCAT=$P(EN(1),U,1)
  1. S:ENMAN]"" ENMAN=$P(^ENG("MFG",ENMAN,0),U,1) S:ENCAT]"" ENCAT=$P(^ENG(6911,ENCAT,0),U,1)
  1. I $D(EN(3)) S ENUSE=$P(EN(3),U,1),ENSER=$P(EN(3),U,2),ENLOC=$P(EN(3),U,5),ENPMN=$P(EN(3),U,6) S:ENUSE]"" ENUSE=$P($P(^DD(6914,20,0),U,3),";",ENUSE) I ENSER]"",$D(^DIC(49,ENSER)) S ENSER=$P(^DIC(49,ENSER,0),U,1)
  1. I ENLOC=+ENLOC,$D(^ENG("SP",ENLOC,0)) S ENLOC=$P(^(0),U)
  1. W !!,DA,?15,$E(ENMEN,1,60),!,?5,"Man: ",$E(ENMAN,1,30),?40,"Cat: ",$E(ENCAT,1,35)
  1. W !,?5,"Model: ",$E(ENMOD,1,28),?40,"S/N: ",$E(ENSN,1,35),!,?5,"Servc: ",$E(ENSER,1,28),?40,"Status: ",$P(ENUSE,":",2),!,?5,"Location: ",$E(ENLOC,1,25),?40,"PM#: ",ENPMN
  1. S ENEQY=ENEQY+6 K EN
  1. D:$O(^DIC(6910,1,2,0))]"" LOC1^ENLBL16
  1. Q
  1. CHDR W:ENEQPG @ENEQIOF S ENEQPG=ENEQPG+1 W "COMPANION LISTING (Bar Code Labels)",?ENHDMRGN,"Page ",ENEQPG
  1. W !,ENEQBY W:$L(ENEQBY)<41 " (",$S(ENEQUSER]"":$E(ENEQUSER,1,20),1:"User unknown"),")" W ?ENHDMRGN,ENEQDATE,!,"Equip ID",?15,"* Description *"
  1. S X="",$P(X,"-",80)="-" W !,X
  1. S ENEQY=0
  1. Q
  1. HLP W !!,"A 'companion listing' is simply a printout on regular paper (must be at",!,"least 80 columns wide) that is intended for use in the initial application"
  1. W !,"of the actual bar code labels to individual equipment items. The companion",!,"listing will contain more descriptive information than can be printed"
  1. W !,"on the labels themselves, and will be sorted in the same order as the",!,"labels."
  1. Q
  1. OPEN ;
  1. S IOP=ENEQION D ^%ZIS K IOP
  1. S ENEQIO=IO ;HD308658
  1. Q
  1. ERR W !,*7,"Device selection unsuccessful.",!
  1. Q
  1. ;ENLBL9