source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENY2REP9.m@ 862

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

initial load of WorldVistAEHR

File size: 3.4 KB
RevLine 
[613]1ENY2REP9 ;(WIRMFO)/DH-Y2K Equipment w/o Y2K Category ;8.18.98
2 ;;7.0;ENGINEERING;**51,55**;August 17, 1993
3NULL ; prints list of equipment with man and mod but no Y2K category
4 W @IOF,!!,?17,"List of Active Equipment Records with MANUFACTURER"
5 W !,?23,"and MODEL, but without a Y2K CATEGORY"
6 N COUNT
7 S COUNT("EQ")=$P(^ENG(6914,0),U,4),COUNT("Y2K")=$P($G(^ENG(6918,0)),U,4) S:COUNT("Y2K")="" COUNT("Y2K")=0
8 I COUNT("Y2K")/COUNT("EQ")'>.5 D Q:'Y
9 . W !!,"From glancing at your data base, it appears that less than half of your",!,"equipment records have a Y2K CATEGORY of any kind on file."
10 . W !!,"Are you sure this report is worth printing?",*7
11 . S DIR(0)="Y",DIR("B")="NO"
12 . D ^DIR K DIR S:$D(DIRUT) Y=0
13 W ! K IO("Q") S %ZIS="QM" D ^%ZIS Q:POP
14 I $D(IO("Q")) S ZTRTN="LIST^ENY2REP9" D Q
15 . S ZTION=ION,ZTDESC="Y2K Null Item List"
16 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
17 ;
18LIST ;
19 N DA,EN,MFG,MOD,LID,EC,SRVC,LOC,SN,DATE,PAGE,ESCAPE
20 K ^TMP($J)
21 S DA=0 F S DA=$O(^ENG(6914,DA)) Q:'DA I $D(^ENG(6914,DA,0)),$P($G(^(11)),U)="" D
22 . I '$D(ZTQUEUED),'(DA#100) W "." ; activity indicator
23 . S EN(1)=$G(^ENG(6914,DA,1)),MFG(0)=$P(EN(1),U,4)
24 . Q:MFG(0)'>0 Q:'$D(^ENG("MFG",MFG(0),0)) S MFG=$E($P(^ENG("MFG",MFG(0),0),U),1,35)
25 . S MOD=$P(EN(1),U,2) Q:MOD']"" S MOD=$P(EN(1),U,2)
26 . S EC(0)=$P(EN(1),U),SN=$P(EN(1),U,3)
27 . S EN(3)=$G(^ENG(6914,DA,3)) Q:"^4^5^"[(U_$P(EN(3),U)_U) ; turn-ins
28 . S SRVC(0)=$P(EN(3),U,2),LOC(0)=$P(EN(3),U,5),LID=$P(EN(3),U,7)
29 . S ^TMP($J,MFG,MOD,DA)=LID_U_EC(0)_U_SRVC(0)_U_LOC(0)_U_SN
30 ;
31PRT ; physical print
32 U IO
33 D NOW^%DTC S Y=% X ^DD("DD") S DATE("PRNT")=$P(Y,":",1,2),PAGE=0
34 D HDR I '$D(^TMP($J)) W !!!,?20,"<Nothing to print>" G EXIT
35 S MFG="" F Q:$G(ESCAPE) S MFG=$O(^TMP($J,MFG)) Q:MFG="" S MOD="" F Q:$G(ESCAPE) S MOD=$O(^TMP($J,MFG,MOD)) Q:MOD="" S DA=0 F S DA=$O(^TMP($J,MFG,MOD,DA)) Q:'DA!($G(ESCAPE)) D
36 . I '$D(ZTQUEUED),IO'=IO(0),'(DA#100) U IO(0) W "." U IO ; activity indicator
37 . S EN=^TMP($J,MFG,MOD,DA),LID=$P(EN,U),EC(0)=$P(EN,U,2),SRVC(0)=$P(EN,U,3),LOC(0)=$P(EN,U,4),SN=$P(EN,U,5)
38 . I EC(0)'>0 S EC=""
39 . E S EC=$S($D(^ENG(6911,EC(0),0)):$P(^(0),U),1:"")
40 . I SRVC(0)'>0 S SRVC=""
41 . E S SRVC=$S($D(^DIC(49,SRVC(0),0)):$P(^(0),U),1:"")
42 . I LOC(0)'?1.N S LOC=LOC(0)
43 . E S LOC=$S($D(^ENG("SP",LOC(0),0)):$P(^(0),U),1:"")
44 . I IOM<96 D Q
45 .. W !!,DA,?10,$E(MFG,1,30),?41,$E(MOD,1,20),?62,LID
46 .. W !,$E(EC,1,22),?23,$E(SRVC,1,20),?44,$E(LOC,1,15),?60,$E(SN,1,20)
47 .. I (IOSL-$Y)'>4 D HOLD D:'$G(ESCAPE) HDR
48 . W !!,DA,?11,MFG,?46,MOD,?76,LID
49 . W !,$E(EC,1,22),?23,$E(SRVC,1,20),?44,LOC,?65,$E(SN,1,30)
50 . I (IOSL-$Y)'>4 D HOLD D:'$G(ESCAPE) HDR
51 G EXIT
52 ;
53HDR ; header print
54 W:$E(IOST,1,2)="C-"!(PAGE) @IOF S PAGE=PAGE+1
55 I IOM<96 D Q
56 . W "Null Equipment List (MAN & MODEL but no Y2K) "_DATE("PRNT")_" Page: "_PAGE
57 . W !,"ENTRY #",?15,"MANUFACTURER",?48,"MODEL",?64,"LOCAL ID"
58 . W !,"EQUIPMENT CATEGORY",?25,"SERVICE",?45,"LOCATION",?62,"SERIAL NUMBER"
59 . K X S $P(X,"-",79)="-" W !,X
60 W "Null Equipment List (MANUFACTURER & MODEL, but no Y2K CATEGORY) "_DATE("PRNT")_" Page: "_PAGE
61 W !,"ENTRY #",?18,"MANUFACTURER",?54,"MODEL",?78,"LOCAL ID"
62 W !,"EQUIPMENT CATEGORY",?26,"SERVICE",?47,"LOCATION",?68,"SERIAL NUMBER"
63 K X S $P(X,"-",95)="-" W !,X
64 Q
65 ;
66HOLD I $E(IOST,1,2)="C-" W !!,"Press <RETURN> to continue, '^' to escape..." R X:DTIME I '$T!($E(X)="^") S ESCAPE=1
67 Q
68 ;
69EXIT ;
70 K ^TMP($J)
71 D ^%ZISC,HOME^%ZIS
72 I $D(ZTQUEUED) S ZTREQN="@"
73 Q
74 ;ENY2REP9
Note: See TracBrowser for help on using the repository browser.