PXRMVPTR ; SLC/PKR - Routines for dealing with variable pointers. ;10-Apr-2015 08:02;du
;;2.0;CLINICAL REMINDERS;**6,1004**;Feb 04, 2005;Build 9
;
;==================================================
BLDALIST(FILE,FIELD,LIST) ;Build a list of variable pointer information
;indexed by the abbreviation.
N ABBR,FN,IND,ROOT,TEMP
S IND=0
F S IND=$O(^DD(FILE,FIELD,"V",IND)) Q:+IND=0 D
. S TEMP=^DD(FILE,FIELD,"V",IND,0)
. S FN=$P(TEMP,U,1)
. S ROOT=$$ROOT^DILFD(FN)
. Q:ROOT=""
. S ROOT=$P(ROOT,"^",2)
. S ABBR=$P(TEMP,U,4)
. S LIST(ABBR)=TEMP
Q
;
;==================================================
BLDNLIST(FILE,FIELD,LIST) ;Build a list of variable pointer information
;indexed by the file number.
N FN,IND,ROOT,TEMP
;DBIA #2991
S IND=0
F S IND=$O(^DD(FILE,FIELD,"V",IND)) Q:+IND=0 D
. S TEMP=^DD(FILE,FIELD,"V",IND,0)
. S FN=$P(TEMP,U,1)
. S ROOT=$$ROOT^DILFD(FN)
. Q:ROOT=""
. S ROOT=$P(ROOT,"^",2)
. S LIST(FN)=TEMP
Q
;
;==================================================
BLDRLIST(FILE,FIELD,LIST) ;Build a list of variable pointer information
;indexed by the root.
N FN,IND,ROOT,TEMP
S IND=0
F S IND=$O(^DD(FILE,FIELD,"V",IND)) Q:+IND=0 D
. S TEMP=^DD(FILE,FIELD,"V",IND,0)
. S FN=$P(TEMP,U,1)
. S ROOT=$$ROOT^DILFD(FN)
. Q:ROOT=""
. S ROOT=$P(ROOT,"^",2)
. S LIST(ROOT)=TEMP
Q
;
PXRMVPTR ; SLC/PKR - Routines for dealing with variable pointers. ;10-Apr-2015 08:02;du
+1 ;;2.0;CLINICAL REMINDERS;**6,1004**;Feb 04, 2005;Build 9
+2 ;
+3 ;==================================================
BLDALIST(FILE,FIELD,LIST) ;Build a list of variable pointer information
+1 ;indexed by the abbreviation.
+2 NEW ABBR,FN,IND,ROOT,TEMP
+3 SET IND=0
+4 FOR
SET IND=$ORDER(^DD(FILE,FIELD,"V",IND))
IF +IND=0
QUIT
Begin DoDot:1
+5 SET TEMP=^DD(FILE,FIELD,"V",IND,0)
+6 SET FN=$PIECE(TEMP,U,1)
+7 SET ROOT=$$ROOT^DILFD(FN)
+8 IF ROOT=""
QUIT
+9 SET ROOT=$PIECE(ROOT,"^",2)
+10 SET ABBR=$PIECE(TEMP,U,4)
+11 SET LIST(ABBR)=TEMP
End DoDot:1
+12 QUIT
+13 ;
+14 ;==================================================
BLDNLIST(FILE,FIELD,LIST) ;Build a list of variable pointer information
+1 ;indexed by the file number.
+2 NEW FN,IND,ROOT,TEMP
+3 ;DBIA #2991
+4 SET IND=0
+5 FOR
SET IND=$ORDER(^DD(FILE,FIELD,"V",IND))
IF +IND=0
QUIT
Begin DoDot:1
+6 SET TEMP=^DD(FILE,FIELD,"V",IND,0)
+7 SET FN=$PIECE(TEMP,U,1)
+8 SET ROOT=$$ROOT^DILFD(FN)
+9 IF ROOT=""
QUIT
+10 SET ROOT=$PIECE(ROOT,"^",2)
+11 SET LIST(FN)=TEMP
End DoDot:1
+12 QUIT
+13 ;
+14 ;==================================================
BLDRLIST(FILE,FIELD,LIST) ;Build a list of variable pointer information
+1 ;indexed by the root.
+2 NEW FN,IND,ROOT,TEMP
+3 SET IND=0
+4 FOR
SET IND=$ORDER(^DD(FILE,FIELD,"V",IND))
IF +IND=0
QUIT
Begin DoDot:1
+5 SET TEMP=^DD(FILE,FIELD,"V",IND,0)
+6 SET FN=$PIECE(TEMP,U,1)
+7 SET ROOT=$$ROOT^DILFD(FN)
+8 IF ROOT=""
QUIT
+9 SET ROOT=$PIECE(ROOT,"^",2)
+10 SET LIST(ROOT)=TEMP
End DoDot:1
+11 QUIT
+12 ;