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

BLRLNKU2.m

Go to the documentation of this file.
BLRLNKU2 ;IHS/OIT/MKK - IHS LABORATORY PCC Utilities 2; 03-Oct-2016 10:42 ; MKK
 ;;5.2;IHS LABORATORY;**1039**;NOV 01, 1997;Build 38
 ;
ADDORDL(BLRLOGDA,APCDALVR) ; EP - Add ORDERING LOCATION to APCDALVR array if missing
 NEW (APCDALVR,BLRLOGDA,DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
 S ORDLOC=$$GET1^DIQ(9009022,BLRLOGDA,1106,"I")
 Q:ORDLOC
 ;
 S LRAS=$$GET1^DIQ(9009022,BLRLOGDA,1202)
 Q:$L(LRAS)<1
 ;
 Q:$$GETACCCP^BLRUTIL3(LRAS,.LRAA,.LRAD,.LRAN)<1
 Q:LRAA<1!(LRAD<1)!(LRAN<1)
 ;
 S ORDLOC=$$GET1^DIQ(68.02,LRAN_","_LRAD_","_LRAA,94,"I")
 Q:ORDLOC<1
 ;
 S APCDALVR("APCDTCOL")="`"_ORDLOC
 ;
 S FDA(9009022,BLRLOGDA_",",1106)=ORDLOC
 D UPDATE^DIE("","FDA",,"ERRS")
 Q
 ;
 ;
RDINF63(BLRLOGDA,LRAS,F60IEN,COMPDATE) ; EP - Determine if Result Date is in File 63
 ;      LRAS = Accession
 ;      F60IEN = File 60 IEN
 ;      COMPDATE is date returned, if possible.  Passed by reference.
 ;
 NEW (BLRLOGDA,COMPDATE,DILOCKTM,DISYS,DT,DTIME,DUZ,F60IEN,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,LRAS,U,XPARSYS,XQXFLG)
 ; 
 Q:+$G(F60IEN)<1 0                ; Skip if no File 60 IEN
 Q:$$ISPANEL^BLRPOC(F60IEN) 0     ; Skip if Cosmic Test
 ;
 S LRSB=+$$GET1^DIQ(60,F60IEN,400,"I")
 Q:LRSB<1 0                       ; Skip if no DataName
 ;
 ; Skip if cannot break down Accession Number
 Q:$$GETACCCP^BLRUTIL3(LRAS,.LRAA,.LRAD,.LRAN)<1 0
 ;
 S LRAAIEN=LRAN_","_LRAD_","_LRAA
 S LRDFN=$$GET1^DIQ(68.02,LRAAIEN,.01,"I")
 S LRIDT=$$GET1^DIQ(68.02,LRAAIEN,13.5,"I")
 S LRSS=$$GET1^DIQ(68,LRAA,.02,"I")
 S LRSBSTR=$G(^LR(LRDFN,LRSS,LRIDT,LRSB))
 Q:$L(LRSBSTR)<1 0      ; Skip if no data in Lab Data file
 ;
 S RESULTDT=$P(LRSBSTR,U,6)
 Q:+RESULTDT<1 0     ; Skip if no LEDI IV Result Date
 ;
 S COMPDATE=RESULTDT
 ;
 Q:$$GET1^DIQ(9009022,BLRLOGDA,1309,"I")
 ;
 ; Complete Date not in ^BLRTXLOG, set it
 K FDA,ERRS
 S FDA(9009022,BLRLOGDA_",",1309)=RESULTDT
 D UPDATE^DIE("","FDA",,"ERRS")
 Q 1