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

BLRALBD.m

Go to the documentation of this file.
  1. BLRALBD ;DAOU/ALA-Build data for a selected accession [ 11/18/2002 1:32 PM ]
  1. ;;5.2;LR;**1013,1015**;NOV 18, 2002
  1. ;
  1. ;**Program Description**
  1. ; This program will build the lab result data for a
  1. ; selected accession.
  1. ;
  1. ; Input Parameters
  1. ; LRDFN = Lab Patient IEN
  1. ; LRIDT = Lab Result Reverse Date
  1. ; LRSS = Lab Result Type ('CH', 'MI', etc.)
  1. ;
  1. CH ;EP
  1. ; Clinical Chemistry
  1. K ^TMP("LR",$J,"TP"),LRTP,^TMP($J,"BLRA"),LRORD
  1. ;
  1. ; Set patient data which needs LRDFN
  1. D PT^LRX
  1. ; returns variables needed for header in HDR^BLRALBA
  1. ;D HDR^BLRALBA
  1. ;
  1. S:'$D(LRTSCRN) LRTSCRN=0
  1. S LRLAB=$S($D(LRLABKY):1,1:0),LRHF=1,LRFOOT=0,LRCW=8
  1. S LR0=$G(^LR(LRDFN,"CH",LRIDT,0)) Q:'$P(LR0,U,3)
  1. S LRCDT=+LR0,LRSS="CH",LROC=$P(LR0,U,11),LRAA=""
  1. S LRAAO=1,LRTC=0,LRSPEC=$P(LR0,U,5),LRDN=1
  1. ;
  1. ; Loop through and setup lab tests
  1. F S LRDN=$O(^LR(LRDFN,"CH",LRIDT,LRDN)) Q:LRDN<1 D
  1. . S LRTSTS=$O(^LAB(60,"C","CH;"_LRDN_";1",0)) D SETUP^LRRP
  1. ;
  1. ; Setup comments
  1. D CMNT^LRRP
  1. ;
  1. ; Builds ^TMP($J,"BLRA",#,0) for display
  1. D ^BLRALBA
  1. ; returns the total number of lines = BLRADSP
  1. Q
  1. ;
  1. MI ;EP
  1. ; Microbiology
  1. S BLRADSP=0,$P(BLRABLKS," ",80)=""
  1. K ^TMP($J,"BLRA")
  1. ;
  1. ; Builds ^TMP($J,"BLRA",#,0) for display
  1. D ^BLRALBM
  1. ; returns the total number of lines = BLRADSP
  1. Q