| 1 | LRAPS1 ;AVAMC/REG/CYM/KLL - ANATOMIC PATH PRINT ;2/9/98 08:04 ;
|
---|
| 2 | ;;5.2;LAB SERVICE;**72,173,201,259**;Sep 27, 1994
|
---|
| 3 | S LRA("A")="Y"
|
---|
| 4 | S ;from LRAPS
|
---|
| 5 | F S="SP","CY","EM" D HDR1 Q:LRA("A")]"" F LRI=0:0 S LRI=$O(^LR(LRDFN,S,LRI)) Q:'LRI D:$Y>(IOSL-3) M Q:LRA("A")]"" D EN
|
---|
| 6 | Q
|
---|
| 7 | EN S X=^LR(LRDFN,S,LRI,0),LR("PATH")=$P(X,U,2),N=$P(X,"^",6),N(11)=$P(X,"^",11),X=$P(X,"^",10),X=$P(X,"."),H(2)=$E(X,1,3),LRH(3)=$$Y2K^LRX(X)
|
---|
| 8 | I LR("PATH")]"" S LR("PATH")=$$EXTERNAL^DILFD(63.08,.02,"",LR("PATH"),LR("PATH"))
|
---|
| 9 | S:N="" N="?" S:'H(2) H(2)="?" D:$Y>(IOSL-3) M
|
---|
| 10 | Q:LRA("A")]"" W !?2,"Organ/tissue:",?17,"Date rec'd: ",LRH(3),?43,"Acc #:",N,?64,$E(LR("PATH"),1,12)
|
---|
| 11 | I 'N(11) W !?5,"Report not verified." Q
|
---|
| 12 | ;DON'T DISPLAY SNOMED CODES IF USER DOESN'T HAVE LRLAB KEY
|
---|
| 13 | Q:'$D(^XUSEC("LRLAB",DUZ))
|
---|
| 14 | F O=0:0 S O=$O(^LR(LRDFN,S,LRI,2,O)) Q:'O D:$Y>(IOSL-3) HDR2 Q:LRA("A")]"" S X=^LR(LRDFN,S,LRI,2,O,0),W(3)=$P(X,"^",3),O(6)=$P(^LAB(61,+X,0),"^") W !?5,O(6) W:W(3) " ",W(3)," gm" D L
|
---|
| 15 | I $D(LRQ(3)) F B=0:0 S B=$O(^LR(LRDFN,S,LRI,99,B)) Q:'B W !?5,$E(^(B,0),1,74)
|
---|
| 16 | Q
|
---|
| 17 | L F B=0:0 S B=$O(^LR(LRDFN,S,LRI,2,O,3,B)) Q:'B S B(1)=+^(B,0) D:$Y>(IOSL-3) HDR3 Q:LRA("A")]"" W !?10,$P(^LAB(61.3,B(1),0),"^")
|
---|
| 18 | F B=0:0 S B=$O(^LR(LRDFN,S,LRI,2,O,4,B)) Q:'B S X=^(B,0),B(1)=+X,B(2)=$P(X,"^",2) D:$Y>(IOSL-3) HDR3 Q:LRA("A")]"" W !?10,$P(^LAB(61.5,B(1),0),"^") W:B(2)]"" " (",$S(B(2)=0:"Negative",B(2)=1:"Positive",1:"?"),")"
|
---|
| 19 | F B=0:0 S B=$O(^LR(LRDFN,S,LRI,2,O,1,B)) Q:'B S B(1)=+^(B,0) D:$Y>(IOSL-3) HDR3 Q:LRA("A")]"" W !?10,$P(^LAB(61.4,B(1),0),"^")
|
---|
| 20 | F M=0:0 S M=$O(^LR(LRDFN,S,LRI,2,O,2,M)) Q:'M S M(1)=+^(M,0) D:$Y>(IOSL-3) HDR3 Q:LRA("A")]"" W !?10,$P(^LAB(61.1,M(1),0),"^") D E
|
---|
| 21 | F E=0:0 S E=$O(^LR(LRDFN,S,LRI,2,O,5,E)) Q:'E S E(1)=^(E,0),Y=$P(E(1),"^",2),E(3)=$P(E(1),"^",3),E(4)=$P(E(1),"^")_":",E(4)=$P($P(LR(S),E(4),2),";") D D^LRU S E(2)=Y D:$Y>(IOSL-12) HDR3 W !?5,E(4)," ",E(3)," Date: ",E(2)
|
---|
| 22 | Q
|
---|
| 23 | E F E=0:0 S E=$O(^LR(LRDFN,S,LRI,2,O,2,M,1,E)) Q:'E S E(1)=+^(E,0) D:$Y>(IOSL-3) HDR3 Q:LRA("A")]"" W !?12,$P(^LAB(61.2,E(1),0),"^")
|
---|
| 24 | Q
|
---|
| 25 | HDR1 D:$Y>(IOSL-3) M Q:'$O(^LR(LRDFN,S,0))!(LRA("A")]"") W !,LR("%")
|
---|
| 26 | W !?30,$S(S="SP":"SURGICAL PATHOLOGY",S="CY":"CYTOPATHOLOGY",S="EM":"ELECTRON MICROSCOPY",1:"") Q
|
---|
| 27 | HDR2 D M Q:LRA("A")]""
|
---|
| 28 | HDR21 W !?3,"Organ/tissue:",?20,"Date rec'd: ",LRH(3),?43,"Acc #:",$J(N,5),?64,$E(LR("PATH"),1,12) Q
|
---|
| 29 | HDR3 D M Q:LRA("A")]"" D HDR21 W !?5,O(6) W:W(3) " ",W(3)," gm" Q
|
---|
| 30 | ;
|
---|
| 31 | M Q:$D(ORHFS) ;Don't allow reads if coming from CPRS
|
---|
| 32 | Q:LRA("A")]"" R !,"'^' TO STOP ",LRA("A"):DTIME S:'$T LRA("A")="^" Q:LRA("A")="^" I LRA("A")]"" W $C(7) G M
|
---|
| 33 | W @IOF,$E(LRP,1,30),?31,SSN,?50,"DOB: ",DOB,?68,"LOC: ",$E(LRLLOC,1,5) D HDR1 Q
|
---|