LRAPX ;AVAMC/REG/WTY - AP CODING ;11/26/01
;;5.2;LAB SERVICE;**72,259,422**;Sep 27, 1994;Build 29
;
D ^LRAP
I '$D(Y) D END Q
D @LRSS,END
Q
SP ;SNOMED coding, surg path
S LR(2)=1,DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=10;.03;10"
S DR(2,63.12)=".01;S LR(8)=$P(^LAB(61,X,0),U,4);S:'LR(8) Y=4;2;4;"
S DR(2,63.12)=DR(2,63.12)_"I '$D(LR(1)) S Y=0;1;1.5;3"
S DR(3,63.16)=".01;I '$D(LR(1)) S Y=0;1"
S DR(3,63.82)=".01;S:'$P(^LAB(61.5,X,0),U,3) Y=0;.02"
D ^LRAPDA,END
Q
CY ;SNOMED coding, cytopath
S LR(2)=1,DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=10;.03;10"
S DR(2,63.912)=".01;S LR(8)=$P(^LAB(61,X,0),U,4);S:'LR(8) Y=4;2;4;"
S DR(2,63.912)=DR(2,63.912)_"I '$D(LR(1)) S Y=0;1;1.5;3"
S DR(3,63.916)=".01;I '$D(LR(1)) S Y=0;1"
S DR(3,63.982)=".01;S:'$P(^LAB(61.5,X,0),U,3) Y=0;.02"
D ^LRAPDA,END
Q
EM ;SNOMED coding, EM
S LR(2)=1,DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=10;.03;10"
S DR(2,63.212)=".01;S LR(8)=$P(^LAB(61,X,0),U,4);S:'LR(8) Y=4;2;4;"
S DR(2,63.212)=DR(2,63.212)_"I '$D(LR(1)) S Y=0;1;1.5;3"
S DR(3,63.216)=".01;I '$D(LR(1)) S Y=0;1"
S DR(3,63.282)=".01;S:'$P(^LAB(61.5,X,0),U,3) Y=0;.02"
D ^LRAPDA,END
Q
AU ;SNOMED coding, autopsy
S LR(2)=1
S DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=13.01;13;"
S DR=DR_"13.01///^S X=LRWHO;32"
S DR(2,63.2)=".01;I '$D(LR(1)) S Y=4;1;1.5;3;4"
S DR(3,63.21)=".01"
S DR(3,63.22)=".01;I '$D(LR(1)) S Y=0;1"
S DR(3,63.24)=".01;S:'$P(^LAB(61.5,X,0),U,3) Y=0;.02"
S DR(4,63.23)=".01"
;SET LRSOP="H" SO IT WILL SKIP ALL EDITS AND ONLY EXECUTE DIR
S LRSOP="H"
D ^LRAPDA,END
Q
ISP ;ICDCM coding, surg path
S DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=""@2"";.03;@2;D F80^LRAPX;@1;80"
D ^LRAPDA,END
Q
ICY ;ICDCM coding, cytopath
S DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=""@2"";.03;@2;D F80^LRAPX;@1;80"
D ^LRAPDA,END
Q
IEM ;ICDCM coding, EM
S DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=""@2"";.03;@2;D F80^LRAPX;@1;80"
D ^LRAPDA,END
Q
IAU ;ICDCM coding, autopsy
S DR="D F80^LRAPX;@1;80"
D ^LRAPDA,END
Q
EN ;entry point for ICDCM coding
D ^LRAP
I '$D(Y) D END Q
D @("I"_LRSS),END
Q
RELCHK ;Check to see if report is released
D RELEASE^LRAPUTL(.LRREL,LRDFN,LRSS,LRI)
Q
F80 ;ICD field #80 lookup path
N LRIENS
I LRSS="AU" D Q
.S LRICDT=$P($G(^LR(LRDFN,"AU")),U,1)
.S LRCDSYS=$S(LRICDT'<$$IMPDATE^LEXU("10D"):30,1:1),ICDSYS=LRCDSYS,LRDXV=LRDFN_";"_LRSS
.I $G(LRCDSYS)=30 D EN^LRAPICD(LRDXV) S Y=0 Q
.S Y="@1"
S LRIENS=LRI_","_LRDFN_","
S LRICDT=$$GET1^DIQ(LRSF,LRIENS,.1,"I")
S LRCDSYS=$S(LRICDT'<$$IMPDATE^LEXU("10D"):30,1:1),ICDSYS=LRCDSYS,LRDXV=LRDFN_";"_LRSS_";"_LRI
I $G(LRCDSYS)=30 D EN^LRAPICD(LRDXV) S Y=0 Q
S Y="@1"
Q
END ;
K LRREL
D V^LRU
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRAPX 2741 printed Nov 22, 2024@17:18:52 Page 2
LRAPX ;AVAMC/REG/WTY - AP CODING ;11/26/01
+1 ;;5.2;LAB SERVICE;**72,259,422**;Sep 27, 1994;Build 29
+2 ;
+3 DO ^LRAP
+4 IF '$DATA(Y)
DO END
QUIT
+5 DO @LRSS
DO END
+6 QUIT
SP ;SNOMED coding, surg path
+1 SET LR(2)=1
SET DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=10;.03;10"
+2 SET DR(2,63.12)=".01;S LR(8)=$P(^LAB(61,X,0),U,4);S:'LR(8) Y=4;2;4;"
+3 SET DR(2,63.12)=DR(2,63.12)_"I '$D(LR(1)) S Y=0;1;1.5;3"
+4 SET DR(3,63.16)=".01;I '$D(LR(1)) S Y=0;1"
+5 SET DR(3,63.82)=".01;S:'$P(^LAB(61.5,X,0),U,3) Y=0;.02"
+6 DO ^LRAPDA
DO END
+7 QUIT
CY ;SNOMED coding, cytopath
+1 SET LR(2)=1
SET DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=10;.03;10"
+2 SET DR(2,63.912)=".01;S LR(8)=$P(^LAB(61,X,0),U,4);S:'LR(8) Y=4;2;4;"
+3 SET DR(2,63.912)=DR(2,63.912)_"I '$D(LR(1)) S Y=0;1;1.5;3"
+4 SET DR(3,63.916)=".01;I '$D(LR(1)) S Y=0;1"
+5 SET DR(3,63.982)=".01;S:'$P(^LAB(61.5,X,0),U,3) Y=0;.02"
+6 DO ^LRAPDA
DO END
+7 QUIT
EM ;SNOMED coding, EM
+1 SET LR(2)=1
SET DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=10;.03;10"
+2 SET DR(2,63.212)=".01;S LR(8)=$P(^LAB(61,X,0),U,4);S:'LR(8) Y=4;2;4;"
+3 SET DR(2,63.212)=DR(2,63.212)_"I '$D(LR(1)) S Y=0;1;1.5;3"
+4 SET DR(3,63.216)=".01;I '$D(LR(1)) S Y=0;1"
+5 SET DR(3,63.282)=".01;S:'$P(^LAB(61.5,X,0),U,3) Y=0;.02"
+6 DO ^LRAPDA
DO END
+7 QUIT
AU ;SNOMED coding, autopsy
+1 SET LR(2)=1
+2 SET DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=13.01;13;"
+3 SET DR=DR_"13.01///^S X=LRWHO;32"
+4 SET DR(2,63.2)=".01;I '$D(LR(1)) S Y=4;1;1.5;3;4"
+5 SET DR(3,63.21)=".01"
+6 SET DR(3,63.22)=".01;I '$D(LR(1)) S Y=0;1"
+7 SET DR(3,63.24)=".01;S:'$P(^LAB(61.5,X,0),U,3) Y=0;.02"
+8 SET DR(4,63.23)=".01"
+9 ;SET LRSOP="H" SO IT WILL SKIP ALL EDITS AND ONLY EXECUTE DIR
+10 SET LRSOP="H"
+11 DO ^LRAPDA
DO END
+12 QUIT
ISP ;ICDCM coding, surg path
+1 SET DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=""@2"";.03;@2;D F80^LRAPX;@1;80"
+2 DO ^LRAPDA
DO END
+3 QUIT
ICY ;ICDCM coding, cytopath
+1 SET DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=""@2"";.03;@2;D F80^LRAPX;@1;80"
+2 DO ^LRAPDA
DO END
+3 QUIT
IEM ;ICDCM coding, EM
+1 SET DR="K LRREL D RELCHK^LRAPX I LRREL(1) S Y=""@2"";.03;@2;D F80^LRAPX;@1;80"
+2 DO ^LRAPDA
DO END
+3 QUIT
IAU ;ICDCM coding, autopsy
+1 SET DR="D F80^LRAPX;@1;80"
+2 DO ^LRAPDA
DO END
+3 QUIT
EN ;entry point for ICDCM coding
+1 DO ^LRAP
+2 IF '$DATA(Y)
DO END
QUIT
+3 DO @("I"_LRSS)
DO END
+4 QUIT
RELCHK ;Check to see if report is released
+1 DO RELEASE^LRAPUTL(.LRREL,LRDFN,LRSS,LRI)
+2 QUIT
F80 ;ICD field #80 lookup path
+1 NEW LRIENS
+2 IF LRSS="AU"
Begin DoDot:1
+3 SET LRICDT=$PIECE($GET(^LR(LRDFN,"AU")),U,1)
+4 SET LRCDSYS=$SELECT(LRICDT'<$$IMPDATE^LEXU("10D"):30,1:1)
SET ICDSYS=LRCDSYS
SET LRDXV=LRDFN_";"_LRSS
+5 IF $GET(LRCDSYS)=30
DO EN^LRAPICD(LRDXV)
SET Y=0
QUIT
+6 SET Y="@1"
End DoDot:1
QUIT
+7 SET LRIENS=LRI_","_LRDFN_","
+8 SET LRICDT=$$GET1^DIQ(LRSF,LRIENS,.1,"I")
+9 SET LRCDSYS=$SELECT(LRICDT'<$$IMPDATE^LEXU("10D"):30,1:1)
SET ICDSYS=LRCDSYS
SET LRDXV=LRDFN_";"_LRSS_";"_LRI
+10 IF $GET(LRCDSYS)=30
DO EN^LRAPICD(LRDXV)
SET Y=0
QUIT
+11 SET Y="@1"
+12 QUIT
END ;
+1 KILL LRREL
+2 DO V^LRU
+3 QUIT