source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEFG3.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 4.8 KB
Line 
1IBCEFG3 ; ALB/TMP - OUTPUT FORMATTER MAINT - SCREEN BLD UTILITIES ; 22-JAN-96
2 ;;2.0; INTEGRATED BILLING ;**52,88**; 21-MAR-94
3 ;
4EN ; Main entry point LOCAL FORM maintenance
5 D DT^DICRW
6 K XQORS,VALMEVL,IBFASTXT
7 D EN^VALM("IBCE LOCAL FORMS LIST")
8 K IBFASTXT
9 Q
10 ;
11INIT ; -- set up inital variables local form list
12 S U="^",VALMCNT=0,VALMBG=1
13 K ^TMP("IBCEFORM",$J),^TMP("IBCEFORMDX",$J)
14 D BLD
15 Q
16 ;
17BLD ; -- build list of local forms
18 K ^TMP("IBCEFORM",$J),^TMP("IBCEFORMDX",$J)
19 N IBCFORM,IBCNT,X,IB2
20 S (IBCNT,VALMCNT)=0
21 ;
22 ; -- find all local forms
23 S IBCFORM=0 F S IBCFORM=$O(^IBE(353,IBCFORM)) Q:'IBCFORM S IB2=$G(^(IBCFORM,2)) I $P(IB2,U,4)=0 D
24 .; -- add to list
25 .S IBCNT=IBCNT+1,X="" W "."
26 .S X=$$SETFLD^VALM1(IBCNT,X,"NUMBER")
27 .I $D(^IBE(353,IBCFORM,0)) S X=$$SETFLD^VALM1($P(^(0),"^"),X,"FNAME")
28 .S X=$$SETFLD^VALM1($J(IBCFORM,6),X,"FENTRY")
29 .S X=$$SETFLD^VALM1($J($P(IB2,U,2),3),X,"TYPE")
30 .S X=$$SETFLD^VALM1($P(IB2,U,6),X,"DESCR")
31 .D SET(X)
32 I '$D(^TMP("IBCEFORM",$J)) S VALMCNT=2,IBCNT=2,^TMP("IBCEFORM",$J,1,0)=" ",^TMP("IBCEFORM",$J,2,0)=" No Local Forms Currently On File",^TMP("IBCEFORM",$J,"IDX",1,1)="",^TMP("IBCEFORM",$J,"IDX",2,2)=""
33 Q
34 ;
35FNL ; -- Clean up local form list
36 K ^TMP("IBCEFORMDX",$J)
37 D CLEAN^VALM10
38 K IBFASTXT
39 Q
40 ;
41SET(X) ; -- set arrays for local form list
42 S VALMCNT=VALMCNT+1,^TMP("IBCEFORM",$J,VALMCNT,0)=X
43 S ^TMP("IBCEFORM",$J,"IDX",VALMCNT,IBCNT)=""
44 S ^TMP("IBCEFORMDX",$J,IBCNT)=VALMCNT_"^"_IBCFORM
45 Q
46 ;
47BLDX ; -- build display of expanded local form
48 N IB2,IBPAR,Z,Z0
49 Q:'$G(IBCEXDA) ;Form ien in file 353
50 S VALMBG=1,IB2=$G(^IBE(353,IBCEXDA,2)),IBPAR=+$P(IB2,U,5)
51 K ^TMP("IBCEX",$J)
52 D SET^VALM10(1,"Form Number: "_IBCEXDA),SET^VALM10(2,"Base File : "_$P($G(^DIC(+IB2,0)),U))
53 D SET^VALM10(3,"Format Type: "_$$EXPAND^IBTRE(353,2.02,$P(IB2,U,2)))
54 D SET^VALM10(4," ")
55 D SET^VALM10(5,"Description: "_$P(IB2,U,6))
56 S VALMCNT=5
57 I $P(IB2,U,2)="P" D SET^VALM10(VALMCNT+1,"Form Length: "_$P(IB2,U,3)) S VALMCNT=VALMCNT+1
58 I $P(IB2,U,2)="T" S Z=$S(IBPAR:$P($G(^IBE(353,IBPAR,2)),U,7),1:$P(IB2,U,7)) S:Z="" Z="^" D SET^VALM10(VALMCNT+1," Delimiter: "_Z) S VALMCNT=VALMCNT+1
59 I IBPAR D SET^VALM10(VALMCNT+1," ") D SET^VALM10(VALMCNT+2,"Associated With National Form: "_$P($G(^IBE(353,IBPAR,0)),U)) S VALMCNT=VALMCNT+2
60 S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT," ")
61 I $P(IB2,U,2)'="S" D
62 . K Z
63 . S VALMCNT=VALMCNT+1,Z0=$G(^IBE(353,IBPAR,"PRE")),Z=$G(^IBE(353,IBCEXDA,"PRE"))
64 . I $L(Z)>57 D SPLITZ(.Z)
65 . D SET^VALM10(VALMCNT,"Entry Pre-processor : "_$S(Z'="":Z,Z0="":"",1:Z0_" (defined for associated 'parent' form)"))
66 . I $D(Z(0)) D
67 .. N CT
68 .. F CT=0:1:$O(Z(""),-1) S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT,Z(CT))
69 .. K Z
70 . S VALMCNT=VALMCNT+1,Z0=$G(^IBE(353,IBPAR,"POST")),Z=$G(^IBE(353,IBCEXDA,"POST"))
71 . I $L(Z)>57 D SPLITZ(.Z)
72 . D SET^VALM10(VALMCNT,"Entry Post-processor: "_$S(Z'="":Z,Z0="":"",1:Z0_" (defined for associated 'parent' form)"))
73 . I $D(Z(0)) D
74 .. N CT
75 .. F CT=0:1:$O(Z(""),-1) S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT,Z(CT))
76 .. K Z
77 S VALMCNT=VALMCNT+1,Z0=$G(^IBE(353,IBPAR,"FPRE")),Z=$G(^IBE(353,IBCEXDA,"FPRE"))
78 I $L(Z)>57 D SPLITZ(.Z)
79 D SET^VALM10(VALMCNT,"Form Pre-processor : "_$S(Z'="":Z,Z0="":"",1:Z0_" (defined for associated 'parent' form)"))
80 I $D(Z(0)) D
81 . N CT
82 . F CT=0:1:$O(Z(""),-1) S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT,Z(CT))
83 . K Z
84 S VALMCNT=VALMCNT+1,Z0=$G(^IBE(353,IBPAR,"FPOST")),Z=$G(^IBE(353,IBCEXDA,"FPOST"))
85 I $L(Z)>57 D SPLITZ(.Z)
86 D SET^VALM10(VALMCNT,"Form Post-processor : "_$S(Z'="":Z,Z0="":"",1:Z0_" (defined for associated 'parent' form)"))
87 I $D(Z(0)) D
88 . N CT
89 . F CT=0:1:$O(Z(""),-1) S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT,Z(CT))
90 . K Z
91 I $P(IB2,U,2)'="S" D
92 . S VALMCNT=VALMCNT+1,Z0=$G(^IBE(353,IBPAR,"OUT")),Z=$G(^IBE(353,IBCEXDA,"OUT"))
93 . I $L(Z)>57 D SPLITZ(.Z)
94 . D SET^VALM10(VALMCNT,"Output Logic : "_$S(Z'="":Z,Z0="":"(Use formatter default)",1:Z0_" (defined for associated 'parent' form)"))
95 . I $D(Z(0)) D
96 .. N CT
97 .. F CT=0:1:$O(Z(""),-1) S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT,Z(CT))
98 .. K Z
99 . S VALMCNT=VALMCNT+1,Z0=$G(^IBE(353,IBPAR,"EXT")),Z=$G(^IBE(353,IBCEXDA,"EXT"))
100 . I $L(Z)>57 D SPLITZ(.Z)
101 . D SET^VALM10(VALMCNT,"Extract Logic : "_$S(Z'="":Z,Z0="":"",1:Z0_" (defined for associated 'parent' form)"))
102 . I $D(Z(0)) D
103 .. N CT
104 .. F CT=0:1:$O(Z(""),-1) S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT,Z(CT))
105 .. K Z
106 Q
107 ;
108SELX ; -- Select the form to process
109 D EN^VALM2($G(XQORNOD(0)),"S")
110 S IBCEXDA=$P($G(^TMP("IBCEFORMDX",$J,+$O(VALMY("")))),U,2)
111 Q
112 ;
113FNLX ; Clean up after form view/edit action
114 K IBCEXDA
115 D CLEAN^VALM10
116 S VALMBCK="R"
117 Q
118 ;
119HDRX ; -- Hdr for form view/edit action
120 S VALMHDR(1)=" "
121 S VALMHDR(2)="LOCAL FORM: "_$P($G(^IBE(353,+$G(IBCEXDA),0)),U)
122 Q
123 ;
124SPLITZ(Z) ;Splits code into chunks the display can handle
125 N A,CT,Q,ST
126 S A=Z,CT=0,ST=57
127 S Z=$E(A,1,ST)
128 F CT=0:1 S Q=$E(A,ST+1,ST+57) Q:Q="" S Z(CT)=$J("",22)_Q,ST=ST+57
129 Q
130 ;
Note: See TracBrowser for help on using the repository browser.