source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRSTUF2.m@ 1042

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1LRSTUF2 ;SLC/CJS/DALOI/FHS - MASS DATA ENTRY INTO FILE 63.04 ;2/6/91 15:49
2 ;;5.2;LAB SERVICE;**121,153,263,347**;Sep 27, 1994
3LRSTUFF W !,"Acc #: ",LRAN I '$D(^LRO(68,LRAA,1,LRAD,1,LRAN,0))!'$D(^(3)) W !," not set up." Q
4 S LRNOP=1,I=0 F S I=$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,I)) Q:I<1 I $D(^(I,0)),LRTESTSV=+^(0) S LRNOP=0
5 I LRNOP W " doesn't have the test required." Q
6 S LRDFN=+^LRO(68,LRAA,1,LRAD,1,LRAN,0),LRODT=$P(^(0),U,4),LRSN=$P(^(0),U,5),LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3) D PT^LRX W ?15,PNM,?45,SSN
7 Q:'$D(^LRO(68,LRAA,1,LRAD,1,LRAN,3)) S LRIDT=$P(^(3),U,5),LRMETH="(BD)"_DUZ_"/"_DUZ(2) I LRDPF'=62.3 S LRLLOC=$P(^(0),U,7) S:'$L(LRLLOC) LRLLOC="UNKNOWN" W ?65,LRLLOC
8 L +^LR(LRDFN,"CH",LRIDT):5 I '$T W !!,"Someone else is editing this entry ",!,$C(7) Q
9 I $P(^LR(LRDFN,LRSS,LRIDT,0),U,3),("pending"'[$S($D(^(LRFLD)):$P(^(LRFLD),U,1),1:"pending")) W !?25,"VERIFIED DATA, CAN'T CHANGE" L -^LR(LRDFN,"CH",LRIDT) Q
10 I $P(^LR(LRDFN,LRSS,LRIDT,0),U,3) W ?45,"Some Data Already Verified "
11 I '$T,$O(^LR(LRDFN,LRSS,LRIDT,1))>1 W ?45,"Some Unverified Data Already Entered. " L -^LR(LRDFN,"CH",LRIDT) Q
12 S I=0 F S I=$O(^TMP("LR",$J,"VTO",I)) Q:I<1 S ^TMP("LR",$J,"VTO",I,"P")=I_U_$$NLT^LRVER1(I)
13 W ! S DIE="^LR("_LRDFN_",""CH"",",DA=LRIDT D ^DIE I LRA'=1,$D(Y) W !,"Do you wish to stop" S %=1 D YN^DICN I %=1 S LREND=1 L -^LR(LRDFN,"CH",LRIDT) Q
14 I $L($G(LRVX)) S X=LRVX,LRFLG="",LRSPEC=+$P(^LR(LRDFN,LRSS,LRIDT,0),U,5),LRTS=LRTESTSV D
15 . K LRSB S LRSB=LRFLD
16 . D V25^LRVER5,RANGE^LRVER5
17STOR I $D(^LR(LRDFN,LRSS,LRIDT,LRFLD))#2,$L($P(^(LRFLD),U)),$L(X) D
18 . N LRX,LRXX,LRP
19 . X:$G(LRDEL)'="" LRDEL
20 . S LRXX=X
21 . S $P(LRXX,U,2)=LRFLG,$P(LRXX,U,4)=DUZ,$P(LRXX,U,9)=$G(DUZ(2))
22 . S $P(LRXX,U,5)=$TR(LRNG,U,"!")
23 . K ^TMP("LR",$J,"TMP")
24 . S LRP=$O(^LAB(60,"C",LRSS_";"_LRFLD_";1",0))
25 . S ^TMP("LR",$J,"TMP",LRFLD)=LRP
26 . S LRX=+$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRTESTSV,0)),U,9)
27 . I LRX,LRP D
28 . . S ^TMP("LR",$J,"TMP",LRFLD,"P")=LRX_U_$$NLT^LRVER1(LRX)_"!"_$$RNLT^LRVER1(LRP)
29 . . S $P(LRXX,U,3)=$P($G(^TMP("LR",$J,"TMP",LRFLD,"P")),U,2)
30 . S ^LR(LRDFN,LRSS,LRIDT,LRFLD)=LRXX
31 . I $D(^LR(LRDFN,LRSS,LRIDT,0)),$P(^(0),U,8)'[LRMETH S $P(^(0),U,8)=LRMETH_";"_$P(^(0),U,8)
32 I '$D(LRSB(LRFLD)) W ?39,"**NOT STUFFED**",$C(7) L -^LR(LRDFN,"CH",LRIDT) Q
33 N LRCORECT S LRCORECT=0
34 D VER^LRVER3A,REQ W ?45,"STUFFED"
35 I $P(LRPARAM,U,14),$P($G(^LRO(68,LRAA,0)),U,16) D LOOK^LRCAPV1
36 S ^LRO(68,"AC",LRDFN,LRIDT,LRFLD)=""
37 L -^LR(LRDFN,"CH",LRIDT)
38 I $P($G(LRORU3),U,3),$O(LRSB(0)) D LRORU3^LRVER3
39 Q
40RANGE F R=$P(LRAC,"-",1):1:$P(LRAC,"-",2) S LRAC(R)=""
41 Q
42REQ F X=0:0 S X=$O(M(X)) Q:X<1 S I=M(X) D:'$D(^LR(LRDFN,"CH",LRIDT,X)) ROLL
43 Q
44ROLL S ^LRO(68,LRAA,1,LRAD,1,LRAN,4,I,0)=I_U_LROUTINE,$P(^(0),U,9)=$P($G(^TMP("LR",$J,"TMP",LRFLD,"P")),U)
45 S ^LRO(68,LRAA,1,LRAD,1,LRAN,4,"B",I,I)="",^LR(LRDFN,"CH",LRIDT,X)="pending",$P(^LRO(68,LRAA,1,LRAD,1,LRAN,3),U,4)=""
46 Q
Note: See TracBrowser for help on using the repository browser.