Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LRAUS

LRAUS.m

Go to the documentation of this file.
LRAUS ; IHS/DIR/FJE - PRINT ICD SEARCH ; 17-Oct-2014 09:22 ; MKK
 ;;5.2;LR;**1001,1034**;NOV 01, 1997;Build 88
 ;
 S LRND=^TMP($J,0),T(0)=$P(LRND,"^",3),LRFLD=$P(LRND,"^",4) D L^LRU,H S LR("F")=1
 F Y=0:0 S Y=$O(^TMP($J,Y)) Q:'Y!(LR("Q"))  D N
 ; I $D(LRSS),LRSS="AU" W !!,"NUMBER OF AUTOPSIES SEARCHED WITH ",$P(^TMP($J,0,1)," ",1)," CODING: ",LRPAT1
 ;
 ; ----- BEGIN IHS/MSC/MKK - LR*5.2*1034
 I $D(LRSS),LRSS="AU" D
 . NEW SRCHWITH
 . S SRCHWITH=$P(^TMP($J,0,1)," ",1)
 . S:SRCHWITH["ICD9" SRCHWITH=$TR(SRCHWITH,"9")
 . W !!,"NUMBER OF AUTOPSIES SEARCHED WITH ",SRCHWITH," CODING: ",LRPAT1
 ; ----- END IHS/MSC/MKK - LR*5.2*1034
 ;
 K T(0),LRFLD,LRND Q
N F N=0:0 S N=$O(^TMP($J,Y,N)) Q:'N!(LR("Q"))  S LRND=^(N) D:$Y>(IOSL-6) H Q:LR("Q")  W !,$P(LRND,"^"),?9,$E($P(LRND,"^",4),1,18),?28,$P(LRND,"^",5),?34,$P(LRND,"^",3),?38,$P(LRND,"^",2),?41,$J($P(LRND,"^",6),5) D T
 Q
T S T=0 F A=0:1 S T=$O(^TMP($J,Y,N,T)) Q:'T!(LR("Q"))  W:A>0 ! W ?47,$E(^(T),1,16) D D
 Q
D S M=0 F B=0:1 S M=$O(^TMP($J,Y,N,T,M)) Q:'M!(LR("Q"))  W:B>0 ! W ?65,$E(^(M),1,15)
 Q
H I $D(LR("F")),IOST?1"C".E D M^LRU Q:LR("Q")
 ; D F^LRU W !,T(0)," SEARCH (",LRSTR,"=>",LRLST,")",!,^TMP($J,0,1)
 ;
 ; ----- BEGIN IHS/MSC/MKK - LR*5.2*1034
 NEW SRCHWITH
 S SRCHWITH=$P(^TMP($J,0,1)," ",1)
 S:SRCHWITH["ICD9" SRCHWITH=$TR(SRCHWITH,"9")
 D F^LRU W !,T(0)," SEARCH (",LRSTR,"=>",LRLST,")",!,SRCHWITH
 ; ----- END IHS/MSC/MKK - LR*5.2*1034
 ;
 W !,"ACC NUM",?9,"NAME",?28,"ID",?33,"SEX",?37,"AGE",?41,"MO/DA",!,LR("%") Q