source: FOIAVistA/tag/r/ENGINEERING-EN/ENTIRRNA.m@ 897

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1ENTIRRNA ;WOIFO/SAB - IT Equipment Not Assigned Report ;2/4/2008
2 ;;7.0;ENGINEERING;**87**;Aug 17, 1993;Build 16
3 ;
4 N ENBFMT,ENSM,ENSMV,ENSRT,ENX,ENY
5 N DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
6 ;
7 ; ask equipment selection method
8 S ENX=$$ASKEQSM^ENTIUTL2("ACULS")
9 S ENSM=$P(ENX,U),ENSMV=$P(ENX,U,2)
10 Q:"^A^C^U^L^S^"'[(U_ENSM_U)
11 ;
12 ; ask sort
13 S ENSRT=$$ASKEQSRT^ENTIUTL2(ENSM)
14 Q:ENSRT="" ; user time-out or '^'
15 ;
16 ; ask format
17 S DIR(0)="Y"
18 S DIR("A")="Do you want the brief display format"
19 S DIR("B")="YES"
20 D ^DIR K DIR Q:$D(DIRUT)
21 S ENBFMT=Y
22 ;
23 ; ask device
24 S %ZIS="Q" D ^%ZIS G:POP EXIT
25 I $D(IO("Q")) D G EXIT
26 . S ZTRTN="QEN^ENTIRRNA",ZTDESC="IT Equipment Not Assigned Report"
27 . F ENY="ENSM","ENSMV","ENSRT","ENBFMT" S ZTSAVE(ENY)=""
28 . D ^%ZTLOAD,HOME^%ZIS K ZTSK,IO("Q")
29 ;
30QEN ; queued entry
31 U IO
32 ;
33 ; generate output
34 K ENT S ENT=0
35 S (END,ENPG)=0 D NOW^%DTC S Y=% D DD^%DT S ENDT=Y
36 ;
37 ; build header line 2 string
38 S ENHL2=$$BLDHL2^ENTIUTL(ENSM,ENSMV,ENSRT)
39 ;
40 D HD
41 ;
42 ; build sorted list of equipment
43 D GETEQ^ENTIUTL2(ENSM,ENSMV,ENSRT,0)
44 ;
45 ; print equipment
46 ; loop thru sort value
47 S ENSRTV=""
48 F S ENSRTV=$O(^TMP($J,"ENITEQ",ENSRTV)) Q:ENSRTV="" D Q:END
49 . ; loop thru equipment
50 . S ENDA=0
51 . F S ENDA=$O(^TMP($J,"ENITEQ",ENSRTV,ENDA)) Q:'ENDA D Q:END
52 . . S ENT=ENT+1
53 . . ; display equipment data
54 . . I $Y+$S(ENBFMT:5,1:8)>IOSL D HD Q:END
55 . . I ENBFMT D
56 . . . S ENCMR=$$GET1^DIQ(6914,ENDA,19)
57 . . . S ENLOC=$$GET1^DIQ(6914,ENDA,24)
58 . . . S ENSVC=$$GET1^DIQ(6914,ENDA,21)
59 . . . S ENNAM=$$GET1^DIQ(6914,ENDA,3)
60 . . . W !,ENDA,?12,ENCMR,?19,ENLOC,?41,ENSVC
61 . . . W !,?2,$E(ENNAM,1,78)
62 . . E D CAPEQ^ENTIUTL(ENDA,"HD^ENTIRRNA",,.END) Q:END
63 . . W !
64 ;
65 I 'END D
66 . ; report footer
67 . I $Y+4>IOSL D HD Q:END
68 . W !!,"Count of IT equipment items on report = ",ENT
69 . I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR
70 ;
71 D ^%ZISC
72 ;
73EXIT I $D(ZTQUEUED) S ZTREQ="@"
74 K ^TMP($J,"ENITEQ")
75 K DIR,DIROUT,DIRUT,DIWF,DIWL,DTOUT,DUOUT,POP,X,Y
76 K ENBFMT,ENCMR,ENDA,ENHL2,ENLOC,ENNAM,ENSM,ENSMV
77 K ENSRT,ENSRTV,ENSVC,ENT,END,ENDT,ENPG
78 Q
79 ;
80HD ; header
81 I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
82 I $E(IOST,1,2)="C-"!ENPG W @IOF
83 S ENPG=ENPG+1
84 W "IT EQUIPMENT NOT ASSIGNED REPORT",?48,ENDT,?72,"page ",ENPG
85 W !,ENHL2,!
86 I ENBFMT D
87 . W !,"Entry #",?12,"CMR",?19,"Location",?41,"Using Service"
88 . W !,"---------",?12,"-----",?19,"--------------------"
89 . W ?41,"------------------------------"
90 Q
91 ;
92 ;ENTIRRNA
Note: See TracBrowser for help on using the repository browser.