[613] | 1 | XPARDD1 ;SLC/KCM - DD Logic for Parameter Definition (8989.51);03:31 PM 22 Apr 1998
|
---|
| 2 | ;;7.3;TOOLKIT;**26**;Apr 25, 1995
|
---|
| 3 | ;
|
---|
| 4 | ALLOW(FN) ; Screens allowable entities to variable ptrs in 8989.5,.01
|
---|
| 5 | ; ** VPDD ** see which files 8989.5 can point to
|
---|
| 6 | Q:'FN 0
|
---|
| 7 | Q $D(^DD(8989.5,.01,"V","B",FN))>0
|
---|
| 8 | ;
|
---|
| 9 | VALID01 ; -- Input transform for NAME (8989.51,.01), prevent duplicate names
|
---|
| 10 | ; ( Need to figure out how to check for duplicates and have verify
|
---|
| 11 | ; fields still work )
|
---|
| 12 | I $L(X)>30!($L(X)<3)!'(X'?1P.E) K X Q ; Length 3-30
|
---|
| 13 | I X'?2A.E K X Q ; Must begin with namespace
|
---|
| 14 | I $D(^XTV(8989.51,"B",X)) D Q ; No duplicates
|
---|
| 15 | . K X D EN^DDIOL("Duplicate parameter names not allowed.")
|
---|
| 16 | Q
|
---|
| 17 | AG ; -- AG cross reference, called from 8989.513,.01
|
---|
| 18 | ;
|
---|
| 19 | ; ^XTV(8989.51,PARAMETER,30,"AG",GLOBAL REFERENCE,DA)=""
|
---|
| 20 | ;
|
---|
| 21 | ; GLOBAL REFERENCE is the variable pointer reference to the file
|
---|
| 22 | ; PARAMETER is the internal entry number of the parameter
|
---|
| 23 | ;
|
---|
| 24 | AGS ; Set the AG cross-reference for the PARAMETER DEFINITION file
|
---|
| 25 | N GREF
|
---|
| 26 | D FILE^DID(X,"","GLOBAL NAME","GREF")
|
---|
| 27 | S GREF=$P($G(GREF("GLOBAL NAME")),"^",2)
|
---|
| 28 | I $L(GREF) S ^XTV(8989.51,DA(1),30,"AG",GREF,DA)=""
|
---|
| 29 | Q
|
---|
| 30 | AGK ; Kill the AG cross-referenece for the PARAMETER DEFINITION file
|
---|
| 31 | N GREF
|
---|
| 32 | D FILE^DID(X,"","GLOBAL NAME","GREF")
|
---|
| 33 | S GREF=$P($G(GREF("GLOBAL NAME")),"^",2)
|
---|
| 34 | I $L(GREF) K ^XTV(8989.51,DA(1),30,"AG",GREF,DA)
|
---|
| 35 | Q
|
---|
| 36 | UPPER(X) ; function used by "C" x-ref in .02 field
|
---|
| 37 | Q $TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
---|