source: FOIAVistA/trunk/r/ENGINEERING-EN/ENSA7.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1ENSA7 ;(WASH ISC)/DH-Print Actual Test Results ;9-18-95
2 ;;7.0;ENGINEERING;**21**;Aug 17, 1993
3DEVICE ;Identify piece of equipment
4 I ENLBL?.N S ENEQ=ENLBL
5 I $E(ENLBL,3,8)[" EE" D
6 . I $D(^ENG(6914,"OEE",ENLBL)) S ENEQ=$O(^(ENLBL,0)) Q
7 . I $D(^ENG(6914,"EE",ENLBL)) S ENEQ=$O(^(ENLBL,0)) Q
8 . S ENEQ=+$P(ENLBL,"EE",2)
9 I ENLBL?4N1"-"4N0.1U S ENPMN=ENLBL,ENEQ=$O(^ENG(6914,"C",ENPMN,0))
10 I ENEQ="",ENMOD(0)]"",ENSN(0)]"",$D(^ENG(6914,"E",ENMOD(0))) F ENEQ=0:0 S ENEQ=$O(^ENG(6914,"E",ENMOD(0),ENEQ)) Q:ENEQ'>0 I $D(^ENG(6914,ENEQ,0)),$D(^(1)),$P(^(1),U,3)=ENSN(0) Q
11 I ENEQ>0,$D(^ENG(6914,ENEQ,0)) D DEVCK G:'$D(ENXP("?")) DEV1
12 Q:'ENPAPER W !,"DEVICE INFORMATION" W:'$D(ENXP("?")) " (* Item not found in Equipment File *)" W !
13 W ?5,X(1),!?5,X(2),!
14 Q
15DEV1 Q:'ENPAPER W "Equipment ID: ",ENEQ,?40,"Location: ",ENLOC,!
16 S (ENCAT,ENSN,ENMOD,ENMAN,ENPMN)="" I $D(^ENG(6914,ENEQ,1)) S EN(1)=^(1),ENCAT=$P(EN(1),U,1),ENMOD=$P(EN(1),U,2),ENSN=$P(EN(1),U,3),ENMAN=$P(EN(1),U,4)
17 I ENCAT]"",$D(^ENG(6911,ENCAT,0)) S ENCAT=$P(^(0),U,1)
18 I ENMAN]"",$D(^ENG("MFG",ENMAN,0)) S ENMAN=$P(^(0),U,1)
19 K EN I $D(^ENG(6914,ENEQ,3)) S ENPMN=$P(^(3),U,6)
20 W ?5,"Equip Cat: ",ENCAT,?40,"Man: ",ENMAN,!
21 W ?5,"Mod: ",ENMOD,?30,"S/N: ",ENSN,?55,"PM#: ",ENPMN,!
22 Q
23LNPRNT ;Print uploaded data
24 U IO S X=^ENG("TMP",ENTID,ENSA1)
25 I X["MedTester" S ENY=IOSL W:ENSA1>1 @IOF
26 Q:X']"" S X1=$E(X,1,4) W:X1="ECG:"!(X1="CASE") ?5
27 W X,!
28 Q
29DEVCK ;Consistency check
30 K ENXP("?") I ENMOD(0)]"",ENSN(0)]"",$D(^ENG(6914,ENEQ,1)) G DEVCK1
31 Q ;Insufficient info - can't tell
32DEVCK1 I $P(^ENG(6914,ENEQ,1),U,2)]"",$P(^(1),U,2)'=ENMOD(0) G DEVCK2
33 I $P(^ENG(6914,ENEQ,1),U,3)]"",$P(^(1),U,3)'=ENSN(0) G DEVCK2
34 I $D(^ENG(6914,ENEQ,3)),$D(ENPMN),$P(^(3),U,6)]"",$P(^(3),U,6)'=ENPMN G DEVCK2
35 Q ;OK
36DEVCK2 ;Inconsistency
37 S ENXP("?")=1
38 Q
39DEVCK3 S ENMSG="Please check MedTester REC # "_ENREC_" against Equipment File.",ENMSG(0,1)="Apparent inconsistency between Serial Numbers; Models; or (perhaps) VA PM#." D XCPTN^ENSA2
40 Q
41 ;ENSA7
Note: See TracBrowser for help on using the repository browser.