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

RAXREF.m

Go to the documentation of this file.
RAXREF ;HISC/DAD-EXECUTE SET AND KILL XREF'S ;8/22/96  15:02
 ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
 ; REQUIRED VARIABLES
 ;  RADICT = DATA DICTIONARY NUMBER
 ;  RAFLD  = FIELD NUMBER IN THE ABOVE DD
 ;  RAX    = FIELD VALUE TO BE CROSS REFERENCED
 ;  DA     = DA or DA array
ENKILL(RADICT,RAFLD,RAX,DA) ;
 ; *** Execute a field's cross reference kill logic
 D CHECK I RAEXIT D EXIT Q
 S RAXSAV=RAX
 F RAXREF=0:0 S RAXREF=$O(^DD(RADICT,RAFLD,1,RAXREF)) Q:RAXREF'>0  S X=RAXSAV X:$D(^DD(RADICT,RAFLD,1,RAXREF,2))#2 ^(2)
 D EXIT
 Q
ENSET(RADICT,RAFLD,RAX,DA) ;
 ; *** Execute a field's cross reference set logic
 D CHECK I RAEXIT D EXIT Q
 S RAXSAV=RAX
 F RAXREF=0:0 S RAXREF=$O(^DD(RADICT,RAFLD,1,RAXREF)) Q:RAXREF'>0  S X=RAXSAV X:$D(^DD(RADICT,RAFLD,1,RAXREF,1))#2 ^(1)
 D EXIT
 Q
EXIT ; Kill and quit
 K RAEXIT,RAXREF,RAXSAV
 Q
CHECK ; Check if parameters are valid
 S RAEXIT=$S($D(DA)[0:1,$D(RAX)[0:1,$D(RADICT)[0:1,$D(RAFLD)[0:1,RAX="":1,RADICT'>0:1,RAFLD'>0:1,1:0)
 Q