source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRMIVER1.m@ 1259

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1LRMIVER1 ;SLC/CJS/BA- MICRO CHART COPY APPROVAL CONT. ;2/19/91 11:01 ;
2 ;;5.2;LAB SERVICE;**295**;Sep 27, 1994
3 ;from LRMIVER
4APPROVE I '$O(^LRO(68,"AVS",LRAA,0)) W !,"No data." Q
5 F I=0:0 W !!,"Do you wish to review the data as the (W)ards will see it, as the (L)ab",!,"will see it, or (N)ot review the data? N// " R X:DTIME S:'$T X=U S:'$L(X) X="N" Q:X[U!("WLN"[X&($L(X)=1)) D INFO^LRMINEW
6 Q:X[U I X="N" D ACCEPT Q
7 S:X="W" LRWRDVEW="" F I=0:0 W !,"Do you want to queue the data to print and approve it later" S %=1 D YN^DICN Q:% W !,"Answer 'Y'es or 'N'o"
8 Q:%<1 S ZTRTN="DQ^LRMIVER1" I %=1 S %ZIS="QM",%ZIS("B")="",IOP="Q"
9 D IO^LRWU
10 Q
11DQ S:$D(ZTQUEUED) ZTREQ="@" U IO
12 S LREND=0,LRSB=0 K ^TMP($J) S LRAD=0 F I=0:0 S LRAD=+$O(^LRO(68,"AVS",LRAA,LRAD)) Q:LRAD<1 D SORT Q:LREND
13 S LRONESPC="",LRONETST="" D PRINT
14 Q
15SORT S LRAN=0 F I=0:0 S LRAN=+$O(^LRO(68,"AVS",LRAA,LRAD,LRAN)) Q:LRAN<1 D S1
16 Q
17S1 S LRDFN=+^LRO(68,"AVS",LRAA,LRAD,LRAN),LRIDT=$P(^(LRAN),U,2)
18 I $D(^LR(LRDFN,"MI",LRIDT,0)) S LRVLOC=$S($L($P(^(0),U,8)):$P(^(0),U,8),1:0),^TMP($J,LRVLOC,LRDFN,LRIDT)=^(0)
19 S ^TMP($J,LRVLOC,LRDFN,LRIDT,1)=LRAD
20 Q
21PRINT S LRVLOC="" F LRLCNT=0:0 S LRVLOC=$O(^TMP($J,LRVLOC)) Q:LRVLOC="" S LRLTR=$E(LRVLOC,1,4) W @IOF D ^LRLTR:$E(IOST,1,2)'="C-",P1 Q:LREND
22 Q
23P1 S LRDFN=0 F I=0:0 S LRDFN=+$O(^TMP($J,LRVLOC,LRDFN)) Q:LRDFN<1 D P2 Q:LREND
24 Q
25P2 S LRIDT=0 F I=0:0 S LRIDT=+$O(^TMP($J,LRVLOC,LRDFN,LRIDT)) Q:LRIDT<1 D P3 Q:LREND
26 Q
27P3 S LRWLSAVE=LRAA,LRLLT=^TMP($J,LRVLOC,LRDFN,LRIDT),LRACC=$P(LRLLT,U,6),LRAD=$E(LRLLT)_$P(LRACC," ",2)_"0000",X=$P(LRACC," "),DIC=68,DIC(0)="M"
28 D ^DIC S LRAA=+Y,LRAN=$P(LRACC," ",3),LRCMNT=$S($D(^LR(LRDFN,"MI",LRIDT,99)):^(99),1:""),LRPG=0 D EN^LRMIPSZ1 S LRAA=LRWLSAVE Q:LREND
29 Q
30ACCEPT W !!,"Indicate those you wish to exclude from verification." D LRAN^LRMIUT
31 S LRAN=0 F I=0:0 S LRAN=+$O(LRAN(LRAN)) Q:LRAN<1 S LRAD=0 F I=0:0 S LRAD=+$O(^LRO(68,"AVS",LRAA,LRAD)) Q:LRAD<1 K ^LRO(68,"AVS",LRAA,LRAD,LRAN)
32 F I=0:0 W !,"Ready to approve" S %=2 D YN^DICN Q:% W !,"Answer 'Y'es or 'N'o"
33 Q:%'=1 W !
34 S LRAD=0 F I=0:0 S LRAD=+$O(^LRO(68,"AVS",LRAA,LRAD)) Q:LRAD<1 D LRAD
35 K LRWRDVEW,LRAD,LRAN,LRTK,Z
36 Q
37LRAD S LRAN=0 F I=0:0 S LRAN=+$O(^LRO(68,"AVS",LRAA,LRAD,LRAN)) Q:LRAN<1 D STUFF
38 Q
39STUFF S LRDFN=+^LRO(68,"AVS",LRAA,LRAD,LRAN),LRIDT=$P(^(LRAN),U,2)
40 D UPDATE^LRPXRM(LRDFN,"MI",LRIDT)
41 I $D(^LRO(68,LRAA,1,LRAD,1,LRAN,0)) S LRODT=$P(^(0),U,4),LRSN=$P(^(0),U,5),LRLLOC=$P(^(0),U,7),DFN=$P(^LR(LRDFN,0),U,3),LRDPF=$P(^(0),U,2),LRCDT=9999999-LRIDT D PT^LRX S Y=DT D VT^LRMIUT1
42 S ^LR(LRDFN,"MI",LRIDT,0)=$P(^LR(LRDFN,"MI",LRIDT,0),U,1,2)_U_LRNT_U_DUZ_U_$P(^(0),U,5,99)
43 S LRSET=1,II=0 F I=0:0 S II=+$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,II)) Q:I<1 I '$L($P(^(II,0),U,5)) S LRSET=0
44 S:LRSET $P(^LRO(68,LRAA,1,LRAD,1,LRAN,3),U,4)=LRNT W "."
45 F II=1,5,8,11,16 I $D(^LR(LRDFN,"MI",LRIDT,II)),$P(^(II),U) K ^LRO(68,LRAA,1,LRAD,"AC",II,LRAN)
46 Q
Note: See TracBrowser for help on using the repository browser.