source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRAURV.m@ 1800

Last change on this file since 1800 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1LRAURV ;AVAMC/REG - AUTOPSY DATA REVIEW ;2/18/93 12:24 ;
2 ;;5.2;LAB SERVICE;**155**;Sep 27, 1994
3 S LRDICS="AU" D ^LRAP G:'$D(Y) END
4 W !!?20,"Autopsy data review"
5 D B^LRU G:Y<0 END S LRLDT=LRLDT+.99,LRSDT=LRSDT-.0001
6 S LRB=0 W !!,"Count only in-patient deaths " S %=1 D YN^LRU G:%<1 END I %=1 S LRB=1
7 S ZTRTN="QUE^LRAURV" D BEG^LRUTL G:POP!($D(ZTSK)) END
8QUE K ^TMP($J) U IO S (LR("Q"),LRA,LRD,G(0),G(1),C(0),C(1),C(2))="" D XR^LRU,L^LRU,S^LRU,H S LR("F")=1
9 S A=0 F B=0:0 S A=$O(^DG(405.2,"B",A)) Q:A="" I A["DEATH"!(A="WHILE ASIH") S X=$O(^(A,0)) I X S:A["DEATH" LRC(X)="" S:A["ASIH" LRJ(X)="" ;MAS
10 F A=LRSDT:0 S A=$O(^LR(LRXR,A)) Q:'A!(A>LRLDT)!(LR("Q")) F LRDFN=0:0 S LRDFN=$O(^LR(LRXR,A,LRDFN)) Q:'LRDFN!(LR("Q")) S LRX=$G(^LR(LRDFN,"AU")),LRAC=$P(LRX,U,6) I $P(LRAC," ")=LRABV D A Q:LR("Q") I $D(^LR(LRDFN,83)) S X=^(83) D W
11 Q:LR("Q") I IOST?1"C".E W !!,"Please hold, calculating Autopsy% ...",!
12 F A=LRSDT:0 S A=$O(^DPT("AEXP1",A)) Q:'A!(A>LRLDT) F DFN=0:0 S DFN=$O(^DPT("AEXP1",A,DFN)) Q:'DFN S:'LRB LRD=LRD+1 D:LRB P I $D(LRK) S LRD=LRD+1 K LRK
13 S LRF=1 D H Q:LR("Q") W !,$J(LRD,7),?10,$J(LRA,8),?25,$J(LRA/$S('LRD:1,1:LRD)*100,5,1),?34,$J(G(1),6),?45,$J(G(0),6),?55,$J(C(1),5),?63,$J(C(0),4),?70,$J(C(2),4)
14 D END^LRUTL,END Q
15W I LRB,'LRG Q
16 S Y=$P(X,"^",2),X=$P(X,"^") S:X]"" G(X)=G(X)+1 S:Y]"" C(Y)=C(Y)+1 W:X ?36,"X" W:X=0 ?46,"X" W:Y=1 ?57,"X" W:Y=0 ?64,"X" W:Y=2 ?74,"X" Q
17A D:$Y>(IOSL-6) H Q:LR("Q") S LRG=0,Y=+LRX D D^LRU S LRY=Y I 'LRB D B S LRA=LRA+1 Q
18 S X=^LR(LRDFN,0),DFN=$P(X,"^",3) Q:$P(X,"^",2)'=2 D P I $D(LRK) D B S LRA=LRA+1,LRG=1 K LRK
19 Q
20P S Y=0,X=$O(^DGPM("ATID3",DFN,0)) Q:'X S Y=$O(^(X,0)) Q:'Y S Z=$S($D(^DGPM(Y,0)):$P(^(0),"^",18),1:0) Q:'Z I $D(LRC(Z)) S LRK=1 Q
21 Q:'$D(LRJ(Z)) S X=$O(^DGPM("ATID3",DFN,X)) Q:'X S Y=$O(^DGPM("ATID3",DFN,X,Y)) Q:'Y S Z=+$S($D(^DGPM(Y,0)):$P(^(0),"^",18),1:0) S:$D(LRC(Z)) LRK=1 Q
22 ;
23B W !,LRAC,?15,LRY Q
24H I $D(LR("F")),IOST?1"C".E D M^LRU Q:LR("Q")
25 D F^LRU W !,LRO(68)," (",LRABV,") DATA REVIEW (",LRSTR,"-",LRLST,")"
26 W !?34,"|DIAGNOSTIC",?54,"| CLINICAL DIAGNOSIS",! W "|----------",$S(LRB:"In-patient",1:"--Total---"),"-------------" W ?34,"|DISAGREEMENT",?54,"| CLARIFIED"
27 I $D(LRF) W !,"# Deaths",?10,"# Autopsies",?25,"Autopsy%",?34,"|#Yes",?45,"#No",?54,"| #Yes",?63,"#No"
28 E W !,"Autopsy",?10,"Autopsy date",?34,"| Yes",?46,"No",?54,"| Yes",?64,"No"
29 W ?70,"Verified",!,LR("%") Q
30 ;
31END D V^LRU Q
Note: See TracBrowser for help on using the repository browser.