1 | DIQGDDU ;SFISC/DCL-DATA DICTIONARY UTILITIES ;1:16 PM 26 Sep 1996
|
---|
2 | ;;22.0;VA FileMan;;Mar 30, 1999
|
---|
3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
4 | Q
|
---|
5 | FL(DIQGFILE,DIQGFLD) ;Return field length
|
---|
6 | ;Short version of DIOS1
|
---|
7 | ;In:
|
---|
8 | ; DIQGFILE = file#
|
---|
9 | ; DIQGFLD = field#
|
---|
10 | ;
|
---|
11 | I $G(DIQGFILE)'>0 D ERR202("FILE NUMBER") Q ""
|
---|
12 | I $G(DIQGFLD)'>0 D ERR202("FIELD NUMBER") Q ""
|
---|
13 | ;
|
---|
14 | N DD,DIIT,DN,W
|
---|
15 | S DD=$G(^DD(DIQGFILE,DIQGFLD,0))
|
---|
16 | I DD?."^" D ERR1700("DD FOR FILE#"_DIQGFILE_", FIELD#"_DIQGFLD_" DOES NOT EXIST") Q ""
|
---|
17 | ;
|
---|
18 | S W=0,DN=$P(DD,"^",2),DIIT=$P(DD,"^",5,999)
|
---|
19 | ;
|
---|
20 | I DN S W=$$FL(+DN,.01)
|
---|
21 | E I DN["W" S W=""
|
---|
22 | E I DN["P" S W=$$FL(+$P(DN,"P",2),.01)
|
---|
23 | E I DN["J" S W=+$P(DN,"J",2)
|
---|
24 | ;
|
---|
25 | E I DN["S" D
|
---|
26 | . N C,C1,P
|
---|
27 | . S C=$P(DD,U,3)
|
---|
28 | . F P=1:1 S C1=$P(C,";",P) Q:C1="" S W=$$MAX(W,$L($P(C1,":",2)))
|
---|
29 | ;
|
---|
30 | E I DN["D" D
|
---|
31 | . N D
|
---|
32 | . S D=$P($P(DIIT,"S %DT=""",2,999),"""")
|
---|
33 | . S W=$S(D["S"&(D["T"):21,D["T":18,1:12)
|
---|
34 | ;
|
---|
35 | E I DN["V" D
|
---|
36 | . N N
|
---|
37 | . S N=0
|
---|
38 | . F S N=$O(^DD(DIQGFILE,DIQGFLD,"V",N)) Q:'N S:$G(^(N,0)) W=$$MAX(W,$$FL(+^(0),.01))
|
---|
39 | ;
|
---|
40 | E I DIIT["$L(X)>" S W=+$P(DIIT,"$L(X)>",2)
|
---|
41 | E S W=+$P($P($P($P(DD,"^",4),";",2),"E",2),",")
|
---|
42 | ;
|
---|
43 | S:W=0 W=30
|
---|
44 | Q W
|
---|
45 | ;
|
---|
46 | MAX(X,Y,Z) ;Return maximum of 2 or 3 numbers
|
---|
47 | N M
|
---|
48 | S M=$S(X>Y:+X,1:+Y),M=$S(M>$G(Z):M,1:+$G(Z))
|
---|
49 | Q M
|
---|
50 | ;
|
---|
51 | ERR202(DIQGERR) ;Error processing
|
---|
52 | N P S P(1)=DIQGERR
|
---|
53 | D BLD^DIALOG(202,.P)
|
---|
54 | Q
|
---|
55 | ERR1700(DIQGERR) ;Error processing
|
---|
56 | N P S P(1)=DIQGERR
|
---|
57 | D BLD^DIALOG(1700,.P)
|
---|
58 | Q
|
---|
59 | ;
|
---|
60 | RIF(DA,DR,DIQGETA) ;FUNCTION CALL FOR RI
|
---|
61 | RI ;REQUIRED IDENTIFIERS - CALLED BY EN3^DIQGDD
|
---|
62 | ;DA=FILENR,DR="REQUIRED IDENTIFIERS",DIQGETA=TARGET_ARRAY
|
---|
63 | N DIQGRIA,DIQGRI,DIQGR
|
---|
64 | D REQIDS^DICU(DA,"DIQGRIA")
|
---|
65 | S DIQGRIA="",DIQGRI=0
|
---|
66 | F S DIQGRIA=$O(DIQGRIA(DR,DIQGRIA)) Q:DIQGRIA="" D
|
---|
67 | .S DIQGRI=DIQGRI+1,@DIQGETA@(DR,DIQGRI,"FIELD")=DIQGRIA
|
---|
68 | .Q
|
---|
69 | Q $S(DIQGRI:$NA(@DIQGETA@(DR)),1:"")
|
---|