[613] | 1 | LRSPRPT2 ;AVAMC/REG/WTY - SURG PATH PRINT SNOMED;09/06/01
|
---|
| 2 | ;;5.2;LAB SERVICE;**72,259**;Sep 27, 1994
|
---|
| 3 | ;
|
---|
| 4 | D:$Y>(IOSL-13) F Q:LR("Q")
|
---|
| 5 | I $D(^LR(LRDFN,LRSS,LRI,2,A)) W !,"SNOMED code(s):"
|
---|
| 6 | S A=0 F S A=$O(^LR(LRDFN,LRSS,LRI,2,A)) Q:'A!(LR("Q")) D
|
---|
| 7 | .S T=+^LR(LRDFN,LRSS,LRI,2,A,0),T=^LAB(61,T,0)
|
---|
| 8 | .D:$Y>(IOSL-12) F Q:LR("Q")
|
---|
| 9 | .W !,"T-",$P(T,"^",2),": "
|
---|
| 10 | .S X=$P(T,"^") D:LR(69.2,.05) C^LRUA W X
|
---|
| 11 | .D M
|
---|
| 12 | Q
|
---|
| 13 | M ;
|
---|
| 14 | S B=0 F S B=$O(^LR(LRDFN,LRSS,LRI,2,A,2,B)) Q:'B!(LR("Q")) D
|
---|
| 15 | .S M=+^LR(LRDFN,LRSS,LRI,2,A,2,B,0),M=^LAB(61.1,M,0)
|
---|
| 16 | .D:$Y>(IOSL-12) F Q:LR("Q")
|
---|
| 17 | .W !?5,"M-",$P(M,"^",2),": "
|
---|
| 18 | .S X=$P(M,"^") D:LR(69.2,.05) C^LRUA W X
|
---|
| 19 | .D E
|
---|
| 20 | D ;
|
---|
| 21 | Q:LR("Q")
|
---|
| 22 | F B=1.4,3.3,4.5 D
|
---|
| 23 | .S C=0 F S C=$O(^LR(LRDFN,LRSS,LRI,2,A,$P(B,"."),C)) Q:'C!(LR("Q")) D
|
---|
| 24 | ..S X=^LR(LRDFN,LRSS,LRI,2,A,$P(B,"."),C,0)
|
---|
| 25 | ..D A
|
---|
| 26 | Q
|
---|
| 27 | A ;
|
---|
| 28 | S M=+X,M(2)=$P(X,"^",2),E="61."_$P(B,".",2),M=^LAB(E,M,0)
|
---|
| 29 | D:$Y>(IOSL-12) F Q:LR("Q")
|
---|
| 30 | W !?5,$S(B=1.4:"D-",B=3.3:"F-",B=4.5:"P-",1:""),$P(M,"^",2),?12,": "
|
---|
| 31 | S X=$P(M,"^") D:LR(69.2,.05) C^LRUA W X
|
---|
| 32 | I B=4.5,M(2)]"" D W
|
---|
| 33 | Q
|
---|
| 34 | E ;
|
---|
| 35 | S C=0 F S C=$O(^LR(LRDFN,LRSS,LRI,2,A,2,B,1,C)) Q:'C!(LR("Q")) D
|
---|
| 36 | .S E=+^LR(LRDFN,LRSS,LRI,2,A,2,B,1,C,0),E=^LAB(61.2,E,0)
|
---|
| 37 | .D:$Y>(IOSL-12) F Q:LR("Q")
|
---|
| 38 | .W !?10,"E-",$P(E,"^",2),": " S X=$P(E,"^") D:LR(69.2,.05) C^LRUA W X
|
---|
| 39 | Q
|
---|
| 40 | F ;
|
---|
| 41 | D F^LRAPF,^LRAPF
|
---|
| 42 | Q
|
---|
| 43 | W ;
|
---|
| 44 | W " (",$S(M(2)=0:"negative",M(2)=1:"positive",1:"?"),")"
|
---|
| 45 | Q
|
---|
| 46 | EN ;from LRSPRPT,LRSPT
|
---|
| 47 | Q:'LRAPX(1)
|
---|
| 48 | W !!,"Add/Delete reports to/from print queue for ",LRH(0)," "
|
---|
| 49 | S %=2 D YN^LRU I %=1 D AD
|
---|
| 50 | I '$O(^LRO(69.2,LRAA,LRAPX(1),0)) D Q
|
---|
| 51 | .W $C(7),!!,"NO ",$S(LRAPX(1)=2:"FINAL",1:"PRELIMINARY")
|
---|
| 52 | .W " REPORTS CURRRENTLY ON THE PRINT QUEUE" S %=0
|
---|
| 53 | Q
|
---|
| 54 | AD ;
|
---|
| 55 | D XR^LRU S LRY=$E(LRAD,1,3),LRY(1)=LRY+1700
|
---|
| 56 | I '$O(^LR(LRXREF,LRY,LRABV,0)) D Q
|
---|
| 57 | .W $C(7),!,"No accessions for ",LRY(1)
|
---|
| 58 | ACC ;
|
---|
| 59 | W !!,"Select ",LRO(68)," accession number: " R X:DTIME Q:X=""!(X[U)
|
---|
| 60 | I +X'=X W $C(7),!,"Enter NUMBERS only." G ACC
|
---|
| 61 | I '$O(^LR(LRXREF,LRY,LRABV,X,0)) D G ACC
|
---|
| 62 | .W $C(7),!,"Accession number doesn't exist for ",LRY(1)
|
---|
| 63 | S LRDFN=$O(^LR(LRXREF,LRY,LRABV,X,0)),LRI=$O(^(LRDFN,0))
|
---|
| 64 | S LRAN=X,X=^LR(LRDFN,0) D ^LRUP W !,LRP," ID: ",SSN
|
---|
| 65 | I $D(^LRO(69.2,LRAA,LRAPX(1),LRAN,0)) D DEL G ACC
|
---|
| 66 | I LRAPX(1)=2,'$P(^LR(LRDFN,LRSS,LRI,0),"^",3) D G ACC
|
---|
| 67 | .W $C(7),!,LRO(68)," Accession ",LRAN," for ",LRH(0),!,"does not "
|
---|
| 68 | .W "have a complete date."
|
---|
| 69 | W !!,"Add ",LRO(68)," accession ",LRAN," for ",LRY(1)," to"
|
---|
| 70 | W !,$S(LRAPX(1)=2:"final",1:"preliminary")," rpt print queue "
|
---|
| 71 | S %=2 D YN^LRU D:%=1 ADD
|
---|
| 72 | G ACC
|
---|
| 73 | DEL ;
|
---|
| 74 | W !!,"Delete ",LRO(68)," accession ",LRAN," for ",LRY(1),!,"from "
|
---|
| 75 | W $S(LRAPX(1)=2:"final",1:"preliminary")," rpt print queue "
|
---|
| 76 | S %=2 D YN^LRU Q:%'=1
|
---|
| 77 | K ^LRO(69.2,LRAA,LRAPX(1),LRAN)
|
---|
| 78 | L +^LRO(69.2,LRAA,LRAPX(1))
|
---|
| 79 | S X=^LRO(69.2,LRAA,LRAPX(1),0)
|
---|
| 80 | S X(1)=$O(^LRO(69.2,LRAA,LRAPX(1),0))
|
---|
| 81 | S ^LRO(69.2,LRAA,LRAPX(1),0)=$P(X,"^",1,2)_"^"_X(1)_"^"_($P(X,"^",4)-1)
|
---|
| 82 | L -^LRO(69.2,LRAA,LRAPX(1))
|
---|
| 83 | Q
|
---|
| 84 | ADD ;
|
---|
| 85 | S ^LRO(69.2,LRAA,LRAPX(1),LRAN,0)=LRDFN_"^"_LRI_"^"_LRH(0)
|
---|
| 86 | L +^LRO(69.2,LRAA,LRAPX(1))
|
---|
| 87 | S X=^LRO(69.2,LRAA,LRAPX(1),0)
|
---|
| 88 | S ^LRO(69.2,LRAA,LRAPX(1),0)=$P(X,"^",1,2)_"^"_LRAN_"^"_($P(X,"^",4)+1)
|
---|
| 89 | L -^LRO(69.2,LRAA,LRAPX(1))
|
---|
| 90 | Q
|
---|