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

LR7OSAP4.m

Go to the documentation of this file.
  1. LR7OSAP4 ;va/slc/dcm - Silent AP API ;3/22/2007
  1. ;;5.2;LAB SERVICE;**1030**;NOV 01, 1997
  1. ;;5.2;LAB SERVICE;**365**;Sep 27, 1994;Build 11
  1. ;
  1. EN(LRX,LRDFN,LRSS,LRI,GIOM) ;Get Anatomic Path results from either TIU or Lab files
  1. ; LRX is the global where the output is placed. Calling package is responsible for cleaning this up
  1. ; LRDFN = Lab Patient ID
  1. ; LRSS = Lab Subscript
  1. ; LRI = Inverse Date/Time from ^LR(LRDFN,LRSS,LRIDT)
  1. Q:'LRDFN Q:$G(LRSS)="" Q:'LRI Q:'$D(^LR(+LRDFN,LRSS,LRI))&(LRSS'="AU")
  1. N LRAA,FST,GCNT,B
  1. K ^TMP("LRC",$J)
  1. D:LRSS="CY" CY D:LRSS="SP" SPA D:LRSS="EM" EM
  1. S FST=0,GCNT=0,GIOM=$G(GIOM,96),B=$G(^LR(LRDFN,LRSS,LRI,0))
  1. D:LRSS="AU" AU
  1. I LRSS'="AU" D W^LR7OSAP
  1. M @LRX=^TMP("LRC",$J)
  1. Q
  1. ;
  1. CY S LRSS="CY",LRAA(1)="CYTOPATHOLOGY",LRAA=+$O(^LRO(68,"B",LRAA(1),0)) S:'LRAA LRAA=$$FIND(LRSS)
  1. Q
  1. ;
  1. SPA S LRSS="SP",LRAA(1)="SURGICAL PATHOLOGY",LRAA=+$O(^LRO(68,"B",LRAA(1),0)) S:'LRAA LRAA=$$FIND(LRSS)
  1. Q
  1. ;
  1. EM S LRSS="EM",LRAA(1)="ELECTRON MICROSCOPY",LRAA=+$O(^LRO(68,"B","EM",0)) S:'LRAA LRAA=$$FIND(LRSS)
  1. Q
  1. ;
  1. AU D EN^LR7OSAP2(LRDFN)
  1. Q
  1. ;
  1. FIND(SS) ;Find a valid entry in 68
  1. ;SS=LRSS value to look for
  1. N I,Y
  1. S I=0,Y="" F S I=$O(^LRO(68,I)) Q:I<1 I $P($G(^LRO(68,I,0)),"^",2)=SS S Y=I Q
  1. Q Y