source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRLSTWRK.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: 3.6 KB
RevLine 
[613]1LRLSTWRK ;SLC/CJS/DALISC/DRH - BRIEF ACCESSION LIST ;2/19/91 10:44 ;
2 ;;5.2;LAB SERVICE;**153**;Sep 27, 1994
3EN ;
4 K ^TMP($J),LRTEST,LR,LRTSTS,LRAA
5 D ADATE^LRWU3
6 G END^LRLSTWRL:LREND
7 S LRAD=Y,DIC="^LRO(68,",DIC(0)="AEMOQ",LR(1)=0,LRTEST(0)=0
8 D LRAA^LRLSTWRL G END:LREND,LRLSTWRK:LR(1)<1
9 I '$D(LRSTAR) S LREND=0 D LRAN^LRWU3 G END:LREND
10L2 ;
11 W !,"Expand panels" S %=2 D YN^DICN
12 S LREX=(%=1)
13 G END:%=-1
14 I %=0 W !,"If yes, each panel encountered will be expanded." G L2
15L2B ;
16 W !,"Do you wish to see unverified data"
17 S %=2 D YN^DICN
18 S LR(2)=(%=1)
19 G END:%=-1
20 I %=0 W !,"If yes, unverified data may also be displayed." G L2B
21L2A ;
22 S LREND=0,LRCEN("W")=0
23 R !,"Spacing: 1// ",LR(4):DTIME
24 Q:'$T!(LR(4)["^") W:LR(4)["?" !,"Single, Double, Triple spacing, etc."
25 G:X["?" L2A S LR(4)=+LR(4) S:LR(4)<1 LR(4)=1
26 S %ZIS="QM" D ^%ZIS G END:POP
27 I $D(IO("Q")) D G END
28 . S ZTRTN="DQ^LRLSTWRK",ZTSAVE("L*")=""
29 . D ^%ZTLOAD K ZTSK,ZTRTN,ZTIO,ZTSAVE,IO("Q")
30ENT ;
31 U IO D URG^LRX K ^TMP("LR",$J)
32 S LRNTPP=((IOM-4)-45)/$S(LR(4)>1:7,1:5)\1,LRNTP=0
33 I '$D(LRSTAR) F LRAA=1:1:LR(1) D L11 Q:LREND
34 I $D(LRSTAR) F LRAA=1:1:LR(1) D L3 Q:LREND
35 I $O(^TMP($J,0))<1 W !!,"NO DATA TO REPORT" G END
36 S:LRTEST(0)<LRNTPP LRNTPP=LRTEST(0) G EN^LRLSTWRL
37 Q
38L11 W "." S LRAN=LRFAN-1 F K=0:0 S LRAN=$O(^LRO(68,LRAA(LRAA),1,LRAD,1,LRAN)) Q:LRAN=""!(LRAN>LRLAN) D L12 Q:LREND
39 Q
40L12 Q:'$D(^LRO(68,LRAA(LRAA),1,LRAD,1,LRAN,0))#2
41 S X=^LRO(68,LRAA(LRAA),1,LRAD,1,LRAN,0),LRCEN=$S($D(^(.1)):^(.1),1:0),LRACC=$S($D(^(.2)):^(.2),1:"?"),LRIDT=$S($D(^(3)):^(3),1:"")
42 S LRUID=$P($G(^LRO(68,LRAA(LRAA),1,LRAD,1,LRAN,.3)),"^")
43 S T(2)="",T(5)="",T(3)="",LRDFN=+X,LRSDT=$P(X,U,4)\1,LRSN=+$P(X,U,5),LRLLOC=$P(X,U,7)
44 S:LRCEN&'LRCEN("W") LRCEN("W")=1
45 I LRIDT'="" D
46 . I +LRIDT S T(2)=+LRIDT_$S($P(LRIDT,U,2):"r",1:"d")
47 . E S T(2)="No Collect Date/Time"
48 . S T(3)=$P(LRIDT,U,4),T(5)=$P(LRIDT,U,3),LRIDT=$P(LRIDT,U,5)
49 S II=0 F S II=$O(^LRO(68,LRAA(LRAA),1,LRAD,1,LRAN,4,II)) Q:II<1!LREND S X=^(II,0) D L13
50 S LR(3)=$S(LR(4)>1:7,1:5)*LRTEST(0)+67+$S('LRCEN("W"):0,1:8)<(IOM-4) S:LR(3) LR(3)=22+$S('LRCEN("W"):0,1:8)
51 Q
52L13 S T(1)=$P(X,U,6),LRURG=+$P(X,U,2),LRURG=$S($D(LRURG(LRURG)):LRURG(LRURG),1:""),T(3)=$P(X,U,5),LRTS=+X
53 I $G(LRURG)>49,'$P($G(LRPARAM),U,3) Q
54 S T(4)=$S(T(3):"done",$L(T(1)):"#"_$J(T(1),3),LRURG["STAT":"Spen",1:" pen"),LRSPEC=$S($D(^LRO(68,LRAA(LRAA),1,LRAD,1,LRAN,5,1,0)):+^(0),1:""),S4=$S($D(^LAB(60,LRTS,0)):$P(^(0),U,5),1:""),T4=T(4)
55 D STORE I LREX S LRTEST=LRTS,LRTSTLM=100 D ^LREXPD S JJ=0 F S JJ=$O(LRORD(JJ)) Q:JJ<1 S LRTS=LRORD(JJ),S4=$P(^LAB(60,LRTS,0),U,5) D STORE
56 K JJ,LRORD,^TMP("LR",$J,"T") Q
57STORE S:'$D(LRTEST("B",LRTS)) LRTEST(0)=LRTEST(0)+1,LRTEST(LRTEST(0))=$S($D(^LAB(60,LRTS,0)):$P(^(0),U,1),1:"deleted test"),LRTEST("B",LRTS)=LRTEST(0),LRNTP=LRTEST(0)-1\LRNTPP+1
58 S LRSS=$P(S4,";",1),S2=$P(S4,";",2),S3=$P(S4,";",3),T(4)=T4
59 I $L(S4) D
60 . S T(4)=$S(LRURG["STAT":"S...",1:"....")
61 . I LRIDT,$D(^LR(LRDFN,LRSS,LRIDT,S2)),$P(^(0),U,3)!LR(2),$L($P(^(S2),U,S3)) S T(4)=$S($P(^(S2),U,S3)'="pending":$P(^(S2),U,S3),1:"pen")
62 S ^TMP($J,(LRTEST("B",LRTS)-1\LRNTPP+1),LRAN,LRACC,LRDFN,LRTEST("B",LRTS))=LRLLOC_U_LRURG_U_T(4)_U_LRSPEC_U_LRCEN_U_T(2)_U_LRACC_U_T(5)_U_LRUID
63 Q
64END G END^LRLSTWRL
65 Q
66YN R %:DTIME Q:%=""!(%["N")!(%["Y") W !,"Answer 'Y' or 'N': " G YN
67L3 S LRAD=$E(LRSTAR,1,3)_"0000"-.00001 F S LRAD=$O(^LRO(68,LRAA(LRAA),1,LRAD)) Q:LRAD<1!(LRAD>LRWDTL) D AC Q:LREND
68AC S T1=LRSTAR-.00001 F S T1=$O(^LRO(68,+LRAA(LRAA),1,+LRAD,1,"E",T1)) Q:T1<1!(LAST>1&(T1\1>LAST)) D AC1
69 Q
70AC1 S LRAN=0 F S LRAN=$O(^LRO(68,+LRAA(LRAA),1,LRAD,1,"E",T1,LRAN)) Q:LRAN<1 I $D(^LRO(68,+LRAA(LRAA),1,LRAD,1,LRAN,0)) D L12 Q:LREND
71 Q
72DQ S:$D(ZTQUEUED) ZTREQ="@" U IO K ^TMP($J) G ENT
73 Q
Note: See TracBrowser for help on using the repository browser.