Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ENSA3

ENSA3.m

Go to the documentation of this file.
ENSA3 ;(WASH ISC)/DH-Process MedTester Data ;4.22.99
 ;;7.0;ENGINEERING;**14,54**;Aug 17, 1993
NOLBL ;No barcode label scanned
 S EN="" I ENMOD]"",$D(^ENG(6914,"E",ENMOD)) S I=0 F J=0:0 S I=$O(^ENG(6914,"E",ENMOD,I)) Q:I'=+I  I $D(^ENG(6914,I,1)),$P(^(1),U,3)=ENSN D MATCH,POST^ENSA4 Q
 ;If match found EN will be killed
 I $D(EN) D
 . S ENMSG="ITEM NOT FOUND IN DATABASE.  MedTester REC # "_ENREC
 . S ENMSG(0,1)="Model: "_$S(ENMOD]"":ENMOD,1:"Unknown")
 . S ENMSG(0,2)="Serial Number: "_$S(ENSN]"":ENSN,1:"Unknown")
 . D XCPTN^ENSA2
 Q
MATCH ;Equipment unlabelled but present in 6914
 S ENEQ=I D UPDATE1^ENSA2
 K EN Q
 ;
HOLD U IO(0) W !,"Press RETURN to continue..." R X:DTIME
 Q
ERR ;Error message (Forced exit)
 W !!,*7,"FATAL ERROR OR USER ABORT.",*7
 W !!,"Unrecoverable error has occurred. You will need to start the MedTester",!,"upload again from the beginning."
 S ENY=0 D HOLD
EXIT I $E(IOST,1,2)="C-",$D(ENY),ENY>0 D HOLD
 K:$D(ENTID) ^ENG("TMP",ENTID)
EXIT1 K EN,ENSA1,ENSA2,ENEQ,ENLBL,ENMSG,ENY,ENBRANCH,ENCAT,ENFAIL,ENFLG,ENMAN,ENMOD,ENMEN,ENDATE,ENSTA,ENSTAL
 K ENLOC,ENOLDLOC,ENEMP,ENPM,ENPMDT,ENPMWO,ENSHABR,ENSTDT,ENSHOP,ENSHKEY,ENDTCP,ENH,ENINV,ENPG,ENWOX,ENW,ENCOST
 K ENPAPER,ENPMN,ENREC,ENSN,ENTEC,ENWP,ENX,ENY,ENTID,EN1,EN2,ENAUTO,ENCTCLOS,ENCTEOFF,ENCTEON,ENCTOPEN,ENCTTYPE,ENTIME,ENTEST
 K %,I,I1,J,K,DA,DIC,DIE,DR,ENDEL,X,Y,X1,X2,%DT,DNX
 W @IOF I $E(IOST,1,2)="P-",'$D(ZTQUEUED) D ^%ZISC
 K ^TMP($J)
 Q
 ;ENSA3