source: FOIAVistA/trunk/r/ENGINEERING-EN/ENSA6.m@ 677

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1ENSA6 ;(WASH ISC)/DH-MedTester Utilities ;1/2/2001
2 ;;7.0;ENGINEERING;**54,67**;Aug 17, 1993
3MSG ;Opening message to user
4 W !!,"The system is now ready to update the Equipment File on the basis of",!,"data acquired from the MedTester."
5 W !!,"If the system encounters data that cannot be processed in the normal fashion",!,"it will give you written notice in the form of a MedTester Exception Message."
6 W !,"These messages will provide notification of such things as test failures",!,"and database inconsistencies."
7 W !!,"If a device fails a MedTester test sequence, the site is expected to",!,"evaluate the failure and issue a regular work order for corrective action."
8 W !,"If a PM work order exists for such a device and if you have elected to use",!,"MedTester data to close out that worklist, then the PM status will be set to"
9 W !,"'CORRECTIVE ACTION TAKEN/REQUESTED' but the PM work order will remain open",!,"and nothing will be posted to the Equipment History. Once corrective action"
10 W !,"has been taken, the PM work order should be closed out manually. The WORK",!,"PERFORMED field should contain a reference to the regular work order."
11 W !!,"You will soon select a hard copy device (printer) to receive MedTester",!,"Exception Messages, but first we need to know whether or not you want paper"
12 W !,"copies of the actual test results.",!
13 Q
14WOCHK ;Has PM already been posted?
15 ;Expects ENEQ, ENPMWO, ENREC
16 F I=0:0 S I=$O(^ENG(6914,ENEQ,6,I)) Q:I'>0 I $P(^ENG(6914,ENEQ,6,I,0),U,2)[ENPMWO S ENWOX=I,ENPMWO(0)=$P(^(0),U,2) S ^TMP($J,$S($P(^(0),U,3)="C":"FAIL",1:"PASS"),ENEQ)="" Q
17 Q:'ENWOX ; nothing presently recorded
18 Q:ENTEST="" ; need this to know if duplicate or additional
19 Q:$P(^ENG(6914,ENEQ,6,ENWOX,0),U,9)[ENTEST ; duplicate
20 I 'ENFAIL,$D(^TMP($J,"FAIL",ENEQ)) Q ; already have reg work order
21 S ENMSG=$S(ENFAIL:"FAILed MedTester, but PM Work Order has already been posted for ID#: ",1:"PM Work Order already posted for Equipment ID#: ")_ENEQ
22 I ENFAIL!($D(^TMP($J,"FAIL",ENEQ))) S ENMSG(0,1)="You should manually enter a work order for corrective action."
23 E S ENMSG(0,1)="MedTester time and labor will be added."
24 S ENMSG(0,2)="MedTester REC # "_ENREC S:$D(ENPMWO(0)) ENMSG(0,2)=ENMSG(0,2)_" Work Order Ref: "_ENPMWO(0)
25 D XCPTN^ENSA2
26 ;
27ADDMT ; add anything we have from MedTester to existing entry
28 ; enwox is now the ien of the mult
29 ; enemp, entec, entest & entime from ensa*
30 Q:ENFAIL ; nothing to add
31 L +^ENG(6914,ENEQ,6):5 Q:'$T ; bag it
32 S $P(^ENG(6914,ENEQ,6,ENWOX,0),U,9)=$E($P(^ENG(6914,ENEQ,6,ENWOX,0),U,9)_" "_ENTEST,1,140)
33 N LABOR,WAGE
34 S (LABOR,WAGE)=0
35 S $P(^ENG(6914,ENEQ,6,ENWOX,0),U,4)=$P(^(0),U,4)+ENTIME
36 I ENTEC>0 S PMTOT(ENSHKEY,ENTEC)=$G(PMTOT(ENSHKEY,ENTEC))+ENTIME
37 S WAGE=$S($G(ENTEC):$P($G(^ENG("EMP",ENTEC,0)),U,3),1:$P($G(^DIC(6910,1,0)),U,4)) S:WAGE="" WAGE=0 S X=WAGE*ENTIME,X(0)=2 D ROUND^ENLIB S LABOR=+Y
38 S $P(^ENG(6914,ENEQ,6,ENWOX,0),U,5)=$P(^ENG(6914,ENEQ,6,ENWOX,0),U,5)+LABOR
39 I $P(^ENG(6914,ENEQ,6,ENWOX,0),U,8)'=$E(ENEMP,1,15) S $P(^(0),U,8)="MULTIPLE"
40 L -^ENG(6914,ENEQ,6)
41 Q
42 ;ENSA6
Note: See TracBrowser for help on using the repository browser.