source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LAMIAUT0.m@ 1361

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

initial load of WorldVistAEHR

File size: 4.2 KB
Line 
1LAMIAUT0 ;SLC/FHS - MICRO AUTO INSTRUMENT PROGRAM VITEK ;7/20/90 09:31 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;**42**;Sep 27, 1994
3EN ;
4 D CLEAN,^LRPARAM S LRMIDEF=$P(^LAB(69.9,1,1),U,10),LRMIOTH=$P(^(1),U,11),LRINI=$P(^VA(200,DUZ,0),U,2),LRMICOM=$S($D(^DD(63.31,.01,0)):$P(^(0),U,5,99),1:"S Q9=""1,68,KM"" D COM^LRNUM"),LRMICOMS=$P($P(LRMICOM,",",3),"""",1)
5 S LRTEC=LRINI K DIC S DIC=68,DIC(0)="ZMAQE",DIC("S")="I $P(^(0),U,2)=""MI""" D ^DIC G CLEAN:Y<1 S (LRCAPMS,LRAAD,LRCAPWA)=+Y,LAMIAUTO=1
6ACCESS I $P(Y(0),U,14),'$D(^XUSEC($P(^DIC(19.1,$P(Y(0),U,14),0),U),DUZ)) W !!?10,"ACCESS IS DENIED ",$C(7) G CLEAN
7 S TAB1="?20",TAB2="?30",TAB3="?35",LREND=0,LRFIFO=0
8 S LRTRAN=$P(^LRO(68,LRAAD,0),U,3)
9 S DT=$$DT^XLFDT
10 S %DT="AEP",%DT("A")="Select "_$S(LRTRAN=""!("WMQD"]LRTRAN):"Accession Date: ",1:"Accession Year: ")
11 S %DT("B")=$$FMTE^XLFDT($$CADT^LA7UTIL(LRAAD),"1") ; Calculate default date based on accession transform.
12 D DATE^LRWU S LRADDF=+Y I LRADDF<1 G CLEAN
13 K DIC S LREND=0,LRACC="",LRSS="MI",DIC=62.4,DIC("S")="I +Y<99",DIC(0)="AQEZ",DIC("A")="Select Auto Instrument: " D ^DIC G:Y<1 CLEAN S LRLL=$P(Y(0),U,4),LRINST=+Y I '$L(LRLL) W $C(7),!!!,?10,"No Load List For "_$P(Y,U,2),! G CLEAN
14 I '$O(^LAH(LRLL,1,"C",0)) W !!,$C(7),$P(Y(0),U)," Has no data TRY LATER " D CLEAN Q
15 S LRVT="VS" I $L($P(Y(0),U,15)) S LRVT=$P(Y(0),U,15)
16 S LRFMT=$P(^LAB(69.9,1,0),U,11),LRFMT=$S(LRFMT="":"I",1:LRFMT)
17 S LRAA=LRAAD D AUTO^LRCAPV I $G(LREND) K LREND G CLEAN
18 F LRAN=0:0 S LRAN=$O(^LAH(LRLL,1,"C",LRAN)) Q:LRAN<1 D LRANX I LREND Q
19 I '$D(^LAH(LRLL,1,"C")) W !!?10,"End of Data",!!,$C(7)
20CLEAN ;
21 LOCK
22 K LRRB,LRSB,LRTREA,VA,XX,LAMIAUTO,LRCAPWA
23 D KVAR^VADPT
24 K A,DD,GLB,LAYGO,LACAPMS,LRCDEF,LRCDEF0,LRCNT,LRCODE,LRCODEN,LRCSQ,LRCY,LRP,LRPN,LRQC,LRSSC,LRSSCX,LRSTD,LRSTR,LRT,LRTIME,LRTS,NODE,NODE0,ZTSK
25 K %,LRTEC,%DT,%X,%Y,A,AGE,B,B1,B2,B3,DA,DFN,DIC,DIE,DOB,DR,I,II,J,K,LR1PASS,LR2ORMOR,LRAA,LRAAD,LRAADF,LRABVNT,LRACC,LRACCN,LRACNT,LRAD,LRADDF,LRAN,LRAO,LRBN,LRBUG,LRTEC
26 K IR,IX,IXI,LRABCNT,LRLL,LRCNODE,LRD,LRDR,LRDRDX,LRINST,LRNAME,LRNTN,LRNX,LRODT,LRORGD,LRSUB,LRTEST,N,T1,X9,AA,LRDRD,LRCARD,LRDRNAME,LRALL,LRPHYN,LRCAPMS
27 K LRCDT,LRCODE,LRCOMTAB,LRDCOM,LRDFN,LRDPF,LRDTR,LREAL,LREDIT,LREND,LRFLAG,LRFMT,LRI,LRIDT,LRIFN,LRINI,LRLL,LRLLOC,LRLLOC,LRMOVE,LRMICOM,LRMICOMS,LRMIDEF,LRMIOTH,LRODT
28 K LRPTP,LRY,LRVT,LRTS,LRSCOM,LRSAME,LRCAPOK,LRFIFO,LRNB,LRTPT,LRBDUP
29 K LRORG,LRORGCOM,LRORGN,LRPHY,LRRES,LRSAMP,LRSN,LRSPEC,LRSS,LRTCUP,LRTRAN,LRUNDO,LRWRD,LRWRDVEW,PNM,Q9,SEX,SSN,TAB1,TAB2,TAB3,X,X1,X2,Y
30 Q
31LRANX ;
32 W !!," Enter number Part of Accession "_LRAN_" // " R X:DTIME S:'$T!($E(X)="^") LREND=1 Q:LREND S:X="" X=LRAN I $L(X),'$D(^LAH(LRLL,1,"C",X)) D LST S LREND=0 G LRANX
33 K LRAA S:$L(X) LRAN=X S LRIFN=+$O(^LAH(LRLL,1,"C",LRAN,0)) I 'LRIFN W !?7,"RETRANSMIT THE FILE",! Q
34 I '$D(^LAH(LRLL,1,LRIFN,0))#2 W !?7,"NO DATA FOR THIS NUMBER",! K ^LAH(LRLL,1,"C",LRAN,LRIFN) Q
35 S LRAA=+$S($P(^LAH(LRLL,1,LRIFN,0),U,3):$P(^(0),U,3),1:LRAAD) I '$D(^LRO(68,LRAA,0)) D ACC Q:Y<1
36DATE ;
37 Q:'$D(^LRO(68,LRAA,0))#2 S Y(0)=^(0),LRADDF=$P(Y(0),U,2)
38 S LRAD=+$S($P(^LAH(LRLL,1,LRIFN,0),U,4):$P(^(0),U,4),1:LRADDF) I $D(^LRO(68,LRAA,1,LRAD,1,LRAN)) G OK
39 S LRTRAN=$P(Y(0),U,3)
40 S DT=$$DT^XLFDT
41 S %DT="AEP",%DT("A")="Select "_$S(LRTRAN=""!("WMQD"]LRTRAN):"Accession Date: ",1:"Accession Year: ")
42 S %DT("B")=$$FMTE^XLFDT($$CADT^LA7UTIL(LRAA),"1") ; Calculate default date based on accession transform.
43 D DATE^LRWU
44 I '$D(^LRO(68,LRAA,1,Y)) W !!,$C(7)," THERE ARE NO ACCESSIONS FOR THIS DATE " S LRAN=0 Q
45 S LRAD=Y
46OK I '$D(^LRO(68,LRAA,1,LRAD,1,LRAN,0)) W !?7,"Not accessioned -- Would you like a list " S %=2 D YN^DICN G:%=1 SHOW Q
47 S LRTCUP=$P(^LAH(LRLL,1,LRIFN,0),U)_";"_$P(^(0),U,2) D ^LAMIAUT1 LOCK ;Lock is set in BB+4^LAMIAUT1
48 Q
49LST ;
50 W !!,$S(+X>0:" ( "_X_" ) DOES NOT EXIST ",1:"")," WOULD YOU LIKE A LIST " S %=1,LREND=0 D YN^DICN S:%<0 LREND=1 Q:%'=1
51SHOW ;
52 S LREND=0 F A=0:0 S A=$O(^LAH(LRLL,1,"C",A)) Q:LREND!(A<1) D:$Y>(IOSL-4) WAIT Q:$D(X)&($E(X)="^") W !?10,A," " I '$D(^LRO(68,LRAAD,1,LRADDF,1,A)) W " NOT ACCESSIONED "
53 Q
54WAIT R !!," PRESS RETURN FOR MORE ",X:DTIME S:'$T LREND=1 Q:LREND W @IOF Q
55ACC ;
56 K DIC,Y S DIC("B")=$S($D(LRAADF):LRAADF,1:""),DIC=68,DIC(0)="AQEZM",DIC("S")="I $P(^(0),U,2)=""MI""" D ^DIC Q:Y<1 S LRAA=+Y,LRAADF=$P(Y,U,2)
57 Q
Note: See TracBrowser for help on using the repository browser.