1 | RAXREF ;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
|
---|
8 | ENKILL(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
|
---|
15 | ENSET(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
|
---|
22 | EXIT ; Kill and quit
|
---|
23 | K RAEXIT,RAXREF,RAXSAV
|
---|
24 | Q
|
---|
25 | CHECK ; 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
|
---|