source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENARG2.m@ 1154

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1ENARG2 ;(WCIOFO)/JED,SAB-SKELETON ARCHIVE GLOBAL ;10/12/1999
2 ;;7.0;ENGINEERING;**40,50,63**;Aug 17, 1993
3 ;EXPECTS ENSH,ENRT,ENFR,ENTO ;CALLED BY ENARG1
4 Q
5G S (J,Z)=0,ENSTART=$P($H,",",2) W !,"Hold on, this could take awhile" D @ENRT
6 W !,"Elapsed time: ",$J($P($H,",",2)-ENSTART/60,6,2)," minutes."
7 K ENA,ENSTART,Z Q
8 ;;
91 ; Work orders
10 F S Z=$O(^ENG(6920,Z)) Q:Z'?1N.N W:'(Z#500) "." D
11 . Q:'$D(^ENG(6920,Z,0)) ; missing zero node
12 . S Z(1)=$P($P($G(^ENG(6920,Z,5)),U,2),".") ; date complete
13 . Q:Z(1)=""!(Z(1)<ENFR)!(Z(1)>ENTO) ; outside date range
14 . I '$G(ENSHOP("ALL")) S Z(2)=$P($G(^ENG(6920,Z,2)),U) Q:Z(2)="" ; shop
15 . I $G(ENSHOP("INC")),'$D(ENSHOP(Z(2))) Q ; shop not included
16 . I $G(ENSHOP("EXC")),$D(ENSHOP(Z(2))) Q ; shop excluded
17 . ; passed all checks - include on list
18 . S J=J+1,^ENAR(6919.1,J,0)=Z
19 Q
20 ;
21 ; FSA (VA Form 2162)
222 F S Z=$O(^ENG("FSA",Z)) Q:Z'?1N.N W:'(Z#50) "." I $D(^ENG("FSA",Z,0)) S Z(1)=$P(^(0),U,6) I Z(1)]"",(Z(1)'<ENFR),(Z(1)'>ENTO) S J=J+1,^ENAR(6919.2,J,0)=Z
23 ; INV (Equipment File)
243 S Z=$O(^ENG(6914,Z)) Q:Z'?1N.N
25 W:'(Z#200) "."
26 I '$D(^ENG(6914,Z,0)) G 3
27 S Z(1)=$G(^ENG(6914,Z,3))
28 I $P(Z(1),U,11)=""!($P(Z(1),U,11)>ENTO) G 3 ; disp date
29 I +$$CHKFA^ENFAUTL(Z) G 3 ; reported to FAP
30 I 'ENEQ("J"),$P(Z(1),U,9)="Y" G 3 ; exclude JCAHO INV
31 I 'ENEQ("A"),"^1^A^"[(U_$P($G(^ENG(6914,Z,8)),U,2)_U) G 3 ; excl acct NX
32 ;I 'ENEQ("A") S Z(2)=$P($G(^ENG(6914,Z,2)),U,8) I Z(2),"^10^23^70^"[(U_$E($P($G(^ENCSN(6917,Z(2),0)),U),1,2)_U) G 3 ; excl Acct NX (adp, vech, firearm) (commented out by patch EN*7*50)
33 S J=J+1,^ENAR(6919.3,J,0)=Z
34 G 3
35 ;
36 ; PROJECT (not supported)
374 Q
38 ;
39 ; CONTROL POINT ACTIVITY (will never be supported)
405 Q
41 ;ENARG2
Note: See TracBrowser for help on using the repository browser.