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

BNIGVL1.m

Go to the documentation of this file.
BNIGVL1 ; IHS/CMI/LAB - process record list ;
 ;;1.0;BNI CPHD ACTIVITY DATASYSTEM;;DEC 20, 2006
 ;
 ;
 ;
START ;
 S (BNIGBT,BNIGBTH)=$H,BNIGJOB=$J,BNIGRCNT=0
 D XTMP^BNIGVLU("BNIGVL","CPHAD GENERAL RETRIEVAL")
 D @BNIGTYPE,END
 Q
 ;
RS ; Run by visit date
 S X1=BNIGBD,X2=-1 D C^%DTC S BNIGSD=X
 S BNIGODAT=BNIGSD_".9999" F  S BNIGODAT=$O(^BNIREC("B",BNIGODAT)) Q:BNIGODAT=""!($E(BNIGODAT,1,5)>$E(BNIGED,1,5))  D V1
 Q
 ;
 ;
END ;
 S BNIGET=$H
 Q
V1 ;
 S BNIGVIEN="" F  S BNIGVIEN=$O(^BNIREC("B",BNIGODAT,BNIGVIEN)) Q:BNIGVIEN'=+BNIGVIEN  I $D(^BNIREC(BNIGVIEN,0)) D PROC
 Q
PROC ;
 K BNIGSPEC,BNIGVREC,BNIGPREC,DFN
 I BNIGPTVS="R" S BNIGVREC=^BNIREC(BNIGVIEN,0)
 D SCREENS
 Q:$D(BNIGSKIP)
 K BNIGSRT,BNIGPRNT S BNIGCRIT=BNIGSORT,BNIGX=0
 X:$D(^BNIGRI(BNIGSORT,4)) ^BNIGRI(BNIGSORT,4) I '$D(BNIGPRNT) D
 . I BNIGPTVS="R" S Y=$P($P(BNIGVREC,U),".") S BNIGPRNT=Y Q
 .Q
 S BNIGSRT=BNIGPRNT
 S ^XTMP("BNIGVL",BNIGJOB,BNIGBTH,"DATA HITS",BNIGSRT,BNIGVIEN)="",BNIGRCNT=BNIGRCNT+1
 Q
SCREENS ;
 K BNIGSKIP
 S BNIGI=0 F  S BNIGI=$O(^BNIRTMP(BNIGRPT,11,BNIGI)) Q:B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