source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENFACTR.m@ 1036

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1ENFACTR ;(WCIOFO)/SAB-FAP CAPITALIZATION THRESHOLD REMOVED LIST ;10/14/1999
2 ;;7.0;ENGINEERING;**63**;Aug 17, 1993
3EN ;
4 ; ask device
5 S %ZIS="QM" D ^%ZIS G:POP EXIT
6 I $D(IO("Q")) D G EXIT
7 . S ZTRTN="QEN^ENFACTR"
8 . S ZTDESC="ENG List Equip Removed from Expensed List"
9 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
10 ;
11QEN ; queued entry
12 U IO
13 ;
14COLLECT ; collect data
15 S END=0 ; init flag, =true if user stopped job
16 K ^TMP($J)
17 ;
18 ; loop thru equipment in FA DOCUMENT LOG file
19 S ENDA=0 F S ENDA=$O(^ENG(6915.2,"B",ENDA)) Q:'ENDA D
20 . Q:+$$CHKFA^ENFAUTL(ENDA)'>0 ; not currently reported to FAP
21 . S ENX=$$CHKEXP^ENFACTU(ENDA)
22 . Q:$P(ENX,U)'="U" ; not exempted by user
23 . ; put on sorted list to report
24 . S ENSN=$$GET1^DIQ(6914,ENDA_",",60)_" " S:ENSN=" " ENSN="UNK"
25 . S ^TMP($J,ENSN,ENDA)=$P(ENX,U,2)
26 ;
27PRINT ; print results
28 S ENPG=0 D NOW^%DTC S Y=% D DD^%DT S ENDT=Y
29 S ENL="",$P(ENL,"-",IOM)=""
30 I '$D(^TMP($J)) S ENSN="" D HD W !!,"Nothing to report."
31 ; loop thru station
32 S ENSN="" F S ENSN=$O(^TMP($J,ENSN)) Q:ENSN="" D Q:END
33 . D HD Q:END
34 . ; loop thru equipment
35 . S ENDA=0 F S ENDA=$O(^TMP($J,ENSN,ENDA)) Q:'ENDA D Q:END
36 . . I $Y+4>IOSL D HD Q:END W " (continued)"
37 . . S ENCSN=$$GET1^DIQ(6914,ENDA,18)
38 . . W !!,?2,"ENTRY #: ",ENDA
39 . . W ?22,"CMR: ",$E($$GET1^DIQ(6914,ENDA,19),1,5)
40 . . W ?33,"Value: ",$FN($$GET1^DIQ(6914,ENDA,12),",",2)
41 . . W !,?2,"CATEGORY STOCK NUMBER: ",ENCSN
42 . . I ENCSN]"" W " (",$$GET1^DIQ(6914,ENDA,"18:2"),")"
43 . . W !,?2,"Remain Capitalized set by: ",$G(^TMP($J,ENSN,ENDA))
44 . Q:END
45 I END W !!,"REPORT STOPPED BY USER REQUEST"
46 I 'END,$E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR
47 D ^%ZISC
48EXIT I $D(ZTQUEUED) S ZTREQ="@"
49 K ^TMP($J)
50 K DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y,END,ENDT,ENL,ENPG
51 K ENCSN,ENDA,ENSN,ENX
52 Q
53 ;
54HD ; header
55 I $D(ZTQUEUED),$$S^%ZTLOAD S ZTSTOP=1,END=1 Q
56 I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
57 I $E(IOST,1,2)="C-"!ENPG W @IOF
58 S ENPG=ENPG+1
59 W !,"EQUIPMENT THAT USER REMOVED FROM CT TASK"
60 W ?49,ENDT,?72,"page ",ENPG
61 W !,ENL
62 I ENPG=1 D
63 . W !,"The following equipment meets the system criteria to expense, but no action"
64 . W !,"will be taken because a user indicated that it should remain capitalized.",!
65 I ENSN]"" W !,"STATION ",ENSN
66 Q
67 ;
68 ;ENFACTR
Note: See TracBrowser for help on using the repository browser.