source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRMISTF1.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: 4.4 KB
Line 
1LRMISTF1 ;SLC/CJS/BA/DALOI/FHS - MASS DATA ENTRY INTO FILE 63.05 ;2/25/03 22:24
2 ;;5.2;LAB SERVICE;**121,128,202,263,264,295**;Sep 27, 1994
3 ; Reference to ^DPT( Supported by Reference #10035
4 ; Reference to ^ORD(100.99 Supported by Reference #2414
5 ; Reference to YN^DICN Supported by Reference #10009
6 ; Reference to ^DIE Supported by Reference #10018
7 ; Reference to $$NOW^XLFDT Supported by Reference #10103
8 ; Reference to $$CJ^XLFSTR Supported by Reference #10104
9 ;from LRMISTF
10ASK F I=0:0 D GET Q:LREND=99 D:'LREND ACC S:LREND LREND=0 D MORE Q:LREND K LRAUTO
11 Q
12GET S X1="",LREND=0 I LRMODE<3 D
13 . F R !,"What do you want entered?: ",X1:DTIME Q:'$T!(X1[U)!(X1="") D I $L(X1),$E(X1)'="?" S LREND=0 Q
14 . . I $S(X1[":":1,X1[";":1,1:0) S X1="?" D INFO Q
15 . . S X=X1 S:X[";" X="?" D @$S($G(H9)=11.57:"PN^LRNUM",$G(H9)=24:"AFS^LRNUM",1:"^LRMIXPD") S:'$D(X) X1="?" Q:X1'="?" D INFO
16 I X1[U S LREND=99 Q
17 S:LRMODE<3 LRSTUFF=X1 W !,"I will ",$S(LRMODE=1:"automatically stuff ",1:"prompt "),LRMF W:$D(LRSTUFF) !,"with ",LRSTUFF
18 F W !," ...OK" S %=1 D YN^DICN Q:% W !,"Answer 'Y'es or 'N'o"
19 I %'=1 S LREND=1 Q
20 I LRPF="P" S DR="S:$S($D(^LR(LRDFN,""MI"",LRIDT,"_LRSB_")):$P(^("_LRSB_"),U,2),1:"""")=""F"" Y="_$S(LRSB=1:11.55,LRSB=5:15.5,LRSB=8:19.5,LRSB=11:25.5,LRSB=16:35)_";"
21 I LRPF="F" S DR=""
22 S DR=DR_$S(LRSB=1:"11.5///"_LRPF_";11.55",LRSB=5:"15///"_LRPF_";15.5",LRSB=8:"19///"_LRPF_";19.5",LRSB=11:"23///"_LRPF_";25.5",1:"34///"_LRPF_";35")
23 S DR=DR_"////"_DUZ_";"_H9_$S(LRMODE=1:"///"_LRSTUFF,LRMODE=2:"//"_LRSTUFF,1:"")
24 F W !,"Verify all work automatically" S %=1 D YN^DICN Q:% W !,"Answer 'Y'es or 'N'o"
25 I %=-1 S LREND=1 Q
26 I %=1 S DR=DR_";"_$S(LRSB=1:11,LRSB=5:14,LRSB=8:18,LRSB=11:22,1:33)_"///T",LRAUTO=""
27 S LRCO=0 F W !,"Designate the individual test as complete" S %=2 D YN^DICN Q:% W !,"Answer 'Y'es or 'N'o"
28 S:%=1 LRCO=1 S:%=-1 LREND=1
29 Q
30INFO W !,$$CJ^XLFSTR("What you enter will go through the input transform to be stored in the.",IOM)
31 W !,$$CJ^XLFSTR("Result field of the test",IOM)
32 W !,$$CJ^XLFSTR("The punctuations of ';' or ':' are not allowed in Batch Data Entry.",IOM),!
33 Q
34ACC K LRSTUFF,DIC W !,"Enter the accessions you wish to edit." D LRAN^LRMIUT
35 I +$O(LRAN(0))>0 W !,"Editing the following:" S (J,LRAN)=0 F S LRAN=+$O(LRAN(LRAN)) Q:LRAN<1 W !,LRAN S J=J+1 I J#(IOSL-2)=0 R !,"Press return to continue or '^' to escape ",X:DTIME I X[U S LREND=1 Q
36 Q:LREND
37 F W !,"Everything OK" S %=2 D YN^DICN Q:% W !,"Answer 'Y'es or 'N'o"
38 Q:%'=1
39 S LRAN=0 F S LRAN=+$O(LRAN(LRAN)) Q:LRAN<1 D STUFF Q:LREND
40 Q
41STUFF I '$D(^LRO(68,LRAA,1,LRAD,1,LRAN,0))!'$D(^(3)) W !,"Acc: ",LRAN," not set up." Q
42 I $P(^LRO(68,LRAA,1,LRAD,1,LRAN,3),U,4) W !,"Acc: ",LRAN," has been previously verified by a microbiology supervisor." Q
43 S LRNOP=1,J=0 F S J=+$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,J)) Q:J<1 I LRTEST=+^(J,0) S LRNOP=$P(^(0),U,5) Q
44 I LRNOP=1 W !,"Acc: ",LRAN," doesn't have the test required." Q
45 I LRNOP>1 W !,"Acc: ",LRAN," has been completed for the selected test." Q
46 I H9=11.57!(H9=11.58) S LROK=0 D @$S(H9=11.57:"UR",1:"SPUT") I 'LROK W !,"Acc: ",LRAN," doesn't have the specimen required." Q
47 W !,"Acc: ",LRAN S LRDFN=+^LRO(68,LRAA,1,LRAD,1,LRAN,0),LRLLOC=$P(^(0),U,7),LRODT=$S($P(^(0),U,4):$P(^(0),U,4),1:$P(^(0),U,3)),LRSN=$P(^(0),U,5)
48 S LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3) D PT^LRX W ?15,PNM,?45,SSN I LRDPF=2,$D(^DPT(DFN,.1)) W ?65,^(.1)
49 I LRDPF=2,DFN,$P($G(^ORD(100.99,1,"CONV")),"^")=0 D EN^LR7OV2(DFN_";DPT(",1)
50 W ! S LRCDT=+^LRO(68,LRAA,1,LRAD,1,LRAN,3),LRIDT=+$P(^(3),U,5),DIE="^LR("_LRDFN_",""MI"",",DA=LRIDT D ^DIE,UPDATE^LRPXRM(LRDFN,"MI",LRIDT) I $D(Y) S LREND=1 Q
51 I LRCO S X=$P(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRTEST,0),U,5) K:X ^LRO(68,LRAA,1,LRAD,1,"AD",$P(X,"."),LRAN),^LRO(68,LRAA,1,LRAD,1,"AC",X,LRAN)
52 I LRCO D
53 . S $P(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRTEST,0),U,4)=DUZ,$P(^(0),U,8)=$G(LRCDEF)
54 . S Y=$$NOW^XLFDT
55 . S $P(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRTEST,0),U,5)=Y
56 . S ^LRO(68,LRAA,1,LRAD,1,"AD",$P(Y,"."),LRAN)="",^LRO(68,LRAA,1,LRAD,1,"AC",Y,LRAN)=""
57 . I $$VER^LR7OU1<3 N I S I=LRTEST D V^LROR ;OE/RR 2.5
58 . N CORRECT S:$G(LRCORECT) CORRECT=1 D NEW^LR7OB1(LRODT,LRSN,"RE")
59 I $D(LRAUTO) D STF^LRMIUT
60 Q
61MORE S LREND=1 F W !,"Do you wish to make a new entry for the ",LRMF," field" S %=2 D YN^DICN Q:% W !,"Answer 'Y'es or 'N'o"
62 I %=1 S LREND=0
63 Q
64UR S J=0 F S J=+$O(^LRO(68,LRAA,1,LRAD,1,LRAN,5,J)) Q:J<1 I LRURINE=+^(J,0) S LROK=1 Q
65 Q
66SPUT S J=0 F S J=+$O(^LRO(68,LRAA,1,LRAD,1,LRAN,5,J)) Q:J<1 I 360=+^(J,0) S LROK=1 Q
67 Q
Note: See TracBrowser for help on using the repository browser.