source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRVER2.m@ 1073

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

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1LRVER2 ;SLC/CJS - LAB ROUTINE DATA VERIFICATION ;2/7/91 11:36 ;
2 ;;5.2;LAB SERVICE;**153,201**;Sep 27, 1994
3 S LRSPEC="",X=DUZ D DUZ^LRX S:'$D(LREAL) LREAL=1
4V3 G:$D(^LR(LRDFN,LRSS,LRIDT,0)) V5 G:"AP EM"[LRSS V4
5V3A IF LRSAMP'="" S LRSPEC=$P(^LAB(62,LRSAMP,0),U,2) G:$D(^LAB(61,+LRSPEC,0)) V4
6 I LRDPF'=62.3 Q:$D(LRGVP) S DIC="^LAB(61,",DIC(0)="AEOQ" D ^DIC S LRSPEC=+Y IF LRSPEC=-1 W !,"The specimen MUST be defined." Q
7V4 I '$D(^LR(LRDFN,LRSS,0)) S ^LR(LRDFN,LRSS,0)=U_$P(^DD(63,$O(^DD(63,"GL",LRSS,0,0)),0),U,2)_U
8 L +^LR(LRDFN,LRSS) S ^LR(LRDFN,LRSS,0)=$P(^LR(LRDFN,LRSS,0),U,1,2)_U_LRIDT_U_(1+$P(^(0),U,4))
9 IF "AP EM"[LRSS S ^LR(LRDFN,LRSS,LRIDT,0)=LRCDT_U_LREAL L -^LR(LRDFN,LRSS) G V5
10 S LRVOL="" S:$D(^LRO(69,LRODT,1,LRSN,1)) LRVOL=$P(^(1),U,5) S ^LR(LRDFN,LRSS,LRIDT,0)=LRCDT_U_LREAL_U_U_U_LRSPEC_U_LRAN_U_LRVOL_U_LRMETH_U L -^LR(LRDFN,LRSS)
11V5 I LRDPF=62.3 S LRSPEC=$S($D(^LR(LRDFN,LRSS,LRIDT,0)):$P(^(0),U,5),1:"")
12 S LRLDT=LRIDT,LRVF=0 G V6:'$L($P(^LR(LRDFN,LRSS,LRIDT,0),U,3)) S LRVF=1,X=$P(^(0),U,4),T=$P(^(0),U,3)
13 W:'X&(LRDPF=62.3) !,"This control has been automatically verified" W:'X&(LRDPF'=62.3) !,"Verified"
14 I X W !,"These results have been approved by ",$S($D(^VA(200,X,0)):$P(^(0),"^",1),1:"Unknown"),!," on ",$$FMTE^XLFDT(T)
15V6 I LRDPF'=62.3 S LRSPEC=$P(^LR(LRDFN,LRSS,LRIDT,0),U,5) G:'+LRSPEC V3A
16 W:$D(^LAB(61,+LRSPEC,0)) !,"Specimen: ",$P(^(0),U)
17 K LRNOVER I LRSS="CH",'LRVF S LRNOVER=""
18 K ^TMP("LR",$J,"VTO") S LRCFL="" D ^LRVER3
19 K LRSA,LRSB,LRNOVER,LRACC,LRCAPWA,Y,Z,Z1,Z2,K1,LRURG
20 K DA,DIC,DIE,LRNG,LRNG2,LRNG3,LRNG4,LRNG5,LREDIT,LREXEC,DR
21 Q ;LEAVE LRVER2, BACK TO LRVER1
22V7 ;from LRVER3
23 S LRLDT=$O(^LR(LRDFN,LRSS,LRLDT)) G V8:LRLDT<1 S:LRLDT>LRTM60 LRLDT=-1 G V8:LRLDT=-1,V7:'$D(^LR(LRDFN,LRSS,LRLDT,0)) D V9 G:$P(^LR(LRDFN,LRSS,LRLDT,0),U,5)'=LRSPEC!'$P(^(0),U,3)!'$D(LRMA) V7
24V8 S LRDAT(2)="",Z2="" I LRLDT>0 S Z2=^LR(LRDFN,"CH",LRLDT,0),X=+Z2,Z=Z2 D DAT S LRDAT(2)=LRDAT
25 S Z1=^LR(LRDFN,"CH",LRIDT,0),X=+Z1,Z=Z1 D DAT
26 Q
27DAT N LRX
28 S LRX=$$FMTE^XLFDT(X,"5M")
29 S LRDAT=$P(LRX,"/",1,2)_" "_$P(LRX,"@",2)_$S($P(Z,U,2)!(X'["."):"r",1:"d") Q
30V9 K LRMA S I=0 F S I=$O(^TMP("LR",$J,"TMP",I)) Q:I<1 I $D(^LR(LRDFN,LRSS,LRLDT,I)) S LRMA=1 Q
31 Q
Note: See TracBrowser for help on using the repository browser.