source: WorldVistAEHR/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAXREF.m@ 1147

Last change on this file since 1147 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 982 bytes
Line 
1RAXREF ;HISC/DAD-EXECUTE SET AND KILL XREF'S ;8/22/96 15:02
2 ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3 ; REQUIRED VARIABLES
4 ; RADICT = DATA DICTIONARY NUMBER
5 ; RAFLD = FIELD NUMBER IN THE ABOVE DD
6 ; RAX = FIELD VALUE TO BE CROSS REFERENCED
7 ; DA = DA or DA array
8ENKILL(RADICT,RAFLD,RAX,DA) ;
9 ; *** Execute a field's cross reference kill logic
10 D CHECK I RAEXIT D EXIT Q
11 S RAXSAV=RAX
12 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)
13 D EXIT
14 Q
15ENSET(RADICT,RAFLD,RAX,DA) ;
16 ; *** Execute a field's cross reference set logic
17 D CHECK I RAEXIT D EXIT Q
18 S RAXSAV=RAX
19 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)
20 D EXIT
21 Q
22EXIT ; Kill and quit
23 K RAEXIT,RAXREF,RAXSAV
24 Q
25CHECK ; Check if parameters are valid
26 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)
27 Q
Note: See TracBrowser for help on using the repository browser.