source: WorldVistAEHR/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XPARDD1.m@ 1111

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1XPARDD1 ;SLC/KCM - DD Logic for Parameter Definition (8989.51);03:31 PM 22 Apr 1998
2 ;;7.3;TOOLKIT;**26**;Apr 25, 1995
3 ;
4ALLOW(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 ;
9VALID01 ; -- 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
17AG ; -- 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 ;
24AGS ; 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
30AGK ; 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
36UPPER(X) ; function used by "C" x-ref in .02 field
37 Q $TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
Note: See TracBrowser for help on using the repository browser.