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

DICFIX1.m

Go to the documentation of this file.
  1. DICFIX1 ;SEA/TOAD,SF/TKW-FileMan: Finder, Search Compound Indexes (cont.) ;2/20/98 09:53
  1. ;;22.0;VA FileMan;;Mar 30, 1999;
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. NXTNAM(DIVAL,DIPART,DINDEX,DISKIP,DIDONE) ;
  1. ; limited comma piece lookup, skip nonmatching names in index
  1. I $P(DIVAL,",")=DIPART S DIVAL=DIPART_",~",DISKIP=1 Q
  1. N DIPREC,DIPOSTC,DIPPOSTC
  1. S DIPREC=$P(DIVAL,","),DIPOSTC=$P(DIVAL,",",2)
  1. S DIPPOSTC=DINDEX(DISUB,DITRXNO,"c")
  1. I $$PREFIX(DIPOSTC,DIPPOSTC) Q
  1. I $$PREFIX(DIPPOSTC,DIPOSTC) Q
  1. D SKIP(.DISKIP,.DIVAL,DIPREC,DIPOSTC,DIPART,DIPPOSTC,.DINDEX)
  1. Q
  1. ;
  1. PREFIX(DISTRING,DIPREFIX) ;
  1. Q $E(DISTRING,1,$L(DIPREFIX))=DIPREFIX
  1. ;
  1. SKIP(DISKIP,DIVAL,DIPREC,DIPOSTC,DIPART,DIPPOSTC,DINDEX) ;
  1. ; Skip forward within index based on limited comma piecing
  1. I DIPPOSTC]DIPOSTC D Q
  1. . ; Current first name before starting first name, skip to starting first name
  1. . S DIVAL=DIPREC_","_DIPPOSTC
  1. . I '$D(@DINDEX(DISUB,"ROOT")@(DIVAL)) S DISKIP=1
  1. . Q
  1. ; Else, skip the rest of the first names within current last name.
  1. S DIVAL=DIPREC_",~",DISKIP=1 Q
  1. ;
  1. ;