source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXXFI6.m@ 1361

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1LEXXFI6 ; ISL/KER - File Info - DD Information ; 07/28/2004
2 ;;2.0;LEXICON UTILITY;**32**;Sep 23, 1996;Build 1
3 Q
4 ;
5 ; Global Variables
6 ; ^TMP("LEXI",$J SACC 2.3.2.5.1
7 ;
8 ; External References
9 ; DBIA 10022 %XY^%RCR
10 ;
11DDI(X,LEX) ; Data Dictionary Information
12 N %X,%Y,LEXFI,LEXFLD,LEXLOC,LEXND,LEXNDD,LEXNM,LEXSF
13 K ^TMP("LEXI",$J) S LEXFI=+($G(X)) Q:+LEXFI'>0
14 S %X="^DD("_LEXFI_",",%Y="^TMP(""LEXI"",$J,"_LEXFI_"," D %XY^%RCR
15 S LEX("DD",LEXFI,0)=$G(^TMP("LEXI",$J,LEXFI,0))
16 S LEXNM=$O(^TMP("LEXI",$J,LEXFI,0,"NM",""))
17 S:$L(LEXNM) LEX("DD",LEXFI,0,"NM",LEXNM)=""
18 S LEXFLD=0 F S LEXFLD=$O(^TMP("LEXI",$J,LEXFI,LEXFLD)) Q:+LEXFLD=0 D
19 . S LEXLOC=$G(^TMP("LEXI",$J,LEXFI,LEXFLD,0))
20 . Q:+($P($P(LEXLOC,"^",4),";",2))>0
21 . S LEX("DD",LEXFI,LEXFLD,0)=$G(^TMP("LEXI",$J,LEXFI,LEXFLD,0))
22 S LEXND="" F S LEXND=$O(^TMP("LEXI",$J,LEXFI,"GL",LEXND)) Q:LEXND="" D
23 . S LEXLOC="" F S LEXLOC=$O(^TMP("LEXI",$J,LEXFI,"GL",LEXND,LEXLOC)) Q:LEXLOC="" D
24 . . Q:+LEXLOC>0 S LEXFLD=0
25 . . F S LEXFLD=$O(^TMP("LEXI",$J,LEXFI,"GL",LEXND,LEXLOC,LEXFLD)) Q:+LEXFLD=0 D
26 . . . S LEXNDD=$G(^TMP("LEXI",$J,LEXFI,LEXFLD,0))
27 . . . S LEXSF=+($P(LEXNDD,"^",2)) Q:+LEXSF=0
28 . . . S LEX("DD",LEXFI,"GL",LEXND,LEXLOC,LEXFLD)=""
29 . . . S:+LEXSF>0 LEX("DD",LEXFI,"GL",LEXND,LEXLOC,LEXFLD)=+LEXSF
30 S LEXSF=0 F S LEXSF=$O(^TMP("LEXI",$J,LEXFI,"SB",LEXSF)) Q:+LEXSF=0 D
31 . S LEXFLD=0 F S LEXFLD=$O(^TMP("LEXI",$J,LEXFI,"SB",LEXSF,LEXFLD)) Q:+LEXFLD=0 D
32 . . S LEX("DD",LEXFI,"SB",LEXSF,LEXFLD)=""
33 I $L($G(^TMP("LEXI",$J,LEXFI,0,"UP"))) D
34 . S LEX("DD",LEXFI,0,"UP")=$G(^TMP("LEXI",$J,LEXFI,0,"UP"))
35 K ^TMP("LEXI",$J,LEXFI)
36 S %X="^DIC("_LEXFI_",",%Y="^TMP(""LEXI"",$J,"_LEXFI_"," D %XY^%RCR
37 I $D(^TMP("LEXI",$J,LEXFI,0)) D
38 . S LEX("DIC",LEXFI,0)=$G(^TMP("LEXI",$J,LEXFI,0))
39 I $D(^TMP("LEXI",$J,LEXFI,0,"GL")) D
40 . S LEX("DIC",LEXFI,0,"GL")=$G(^TMP("LEXI",$J,LEXFI,0,"GL"))
41 K ^TMP("LEXI",$J,LEXFI)
42 S LEXSF=0 F S LEXSF=$O(LEX("DD",LEXFI,"SB",LEXSF)) Q:+LEXSF'>0 D DDI2
43 I $D(LEX("DD",LEXFI,0,"UP")) D DDI3
44 Q
45DDI2 ; Sub-Files
46 Q:+($G(LEXSF))'>0 Q:$D(LEX("DD",LEXSF))
47 N LEXTSF,LEXTFI S LEXTSF=LEXSF,LEXTFI=LEXFI
48 N LEXFI S LEXFI=+LEXTSF K ^TMP("LEXI",$J,LEXTFI)
49 D DDI(LEXFI,.LEX)
50 Q
51DDI3 ; Parent Files
52 Q:'$D(LEX("DD",LEXFI,0,"UP"))
53 N LEXUP,LEXTFI
54 S LEXUP=+($G(LEX("DD",LEXFI,0,"UP"))) Q:$D(LEX("DD",LEXUP))
55 S LEXTFI=LEXFI N LEXFI S LEXFI=+LEXUP
56 D DDI(LEXFI,.LEX)
57 Q
Note: See TracBrowser for help on using the repository browser.