1 | IBCEFG5 ;ALB/TMP - OUTPUT FORMATTER MAINT -FLD SCREEN BLD UTILITIES ;22-JAN-96
|
---|
2 | ;;2.0;INTEGRATED BILLING;**52,51**;21-MAR-94
|
---|
3 | ;
|
---|
4 | INIT ; -- set up inital variables local form field list
|
---|
5 | S VALMCNT=0,VALMBG=1
|
---|
6 | D BLD
|
---|
7 | Q
|
---|
8 | ;
|
---|
9 | BLD ; -- build list of local form fields
|
---|
10 | N IBFLD,IBCNT,X,IB2,IBFORM,IBASSOC,IBPG,IBLN,IBCOL,IB0
|
---|
11 | K ^TMP("IBCEFLD",$J),^TMP("IBCEFLDDX",$J)
|
---|
12 | I '$D(IBCEXDA) D CHGFORM^IBCEFG4 G:'$G(IBCEXDA) BLDQ
|
---|
13 | S (IBCNT,VALMCNT)=0,IBPG=""
|
---|
14 | ;
|
---|
15 | ; -- find all form fields
|
---|
16 | S IBFORM=$S('$P($G(^IBE(353,IBCEXDA,2)),U,5):IBCEXDA,1:$P(^(2),U,5))
|
---|
17 | S IBASSOC=(IBFORM'=IBCEXDA)
|
---|
18 | F S IBPG=$O(^IBA(364.6,"ASEQ",IBFORM,IBPG)) Q:IBPG="" S IBLN="" F S IBLN=$O(^IBA(364.6,"ASEQ",IBFORM,IBPG,IBLN)) Q:IBLN="" D
|
---|
19 | .S IBCOL="" F S IBCOL=$O(^IBA(364.6,"ASEQ",IBFORM,IBPG,IBLN,IBCOL)) Q:IBCOL="" S IBFLD=0 F S IBFLD=$O(^IBA(364.6,"ASEQ",IBFORM,IBPG,IBLN,IBCOL,IBFLD)) Q:'IBFLD D
|
---|
20 | ..S IBOVRIDE=$O(^IBA(364.6,"APAR",IBCEXDA,IBFLD,""))
|
---|
21 | ..S Z=0 F S Z=$O(^IBA(364.7,"B",IBFLD,Z)) Q:'Z S IBCNT=IBCNT+1 D SET($$FLDS($G(^IBA(364.6,IBFLD,0)),$G(^IBA(364.7,Z,0)),1,IBCNT),IBFLD)
|
---|
22 | ..S IBOVRIDE=0 F S IBOVRIDE=$O(^IBA(364.6,"APAR",IBCEXDA,IBFLD,IBOVRIDE)) Q:'IBOVRIDE I IBFLD'=IBOVRIDE D
|
---|
23 | ...S Z=0 F S Z=$O(^IBA(364.7,"B",IBOVRIDE,Z)) Q:'Z S IBCNT=IBCNT+1 D SET($$FLDS($G(^IBA(364.6,IBOVRIDE,0)),$G(^IBA(364.7,Z,0)),0,IBCNT),IBOVRIDE)
|
---|
24 | I '$D(^TMP("IBCEFLD",$J)) S VALMCNT=2,IBCNT=2,^TMP("IBCEFLD",$J,1,0)=" ",^TMP("IBCEFLD",$J,2,0)=" No Fields Currently Defined For Form"
|
---|
25 | BLDQ Q
|
---|
26 | ;
|
---|
27 | FLDS(IB0,IBDEF,ORIG,IBCNT) ; Set up display fields
|
---|
28 | ; IB0 = the 0-node of the 364.6 entry
|
---|
29 | ; IBDEF = the 0-node of the defining 364.7 entry
|
---|
30 | ; ORIG = local flag - 1 if overridden by local field, 0 if not overridden
|
---|
31 | ; IBCNT = line counter for line being set
|
---|
32 | N X,Z
|
---|
33 | S X=""
|
---|
34 | S X=$$SETFLD^VALM1(IBCNT,X,"NUMBER")
|
---|
35 | S X=$$SETFLD^VALM1(IBPG,X,"PAGE")
|
---|
36 | S X=$$SETFLD^VALM1(IBLN,X,"LINE")
|
---|
37 | S X=$$SETFLD^VALM1(IBCOL,X,"COLUMN")
|
---|
38 | S X=$$SETFLD^VALM1($S(ORIG:"",1:"*")_$P(IB0,U,10),X,"DESCR")
|
---|
39 | S Z=$$EXTERNAL^DILFD(364.7,.06,"",$P(IBDEF,U,6)) S:Z="" Z="BOTH"
|
---|
40 | S X=$$SETFLD^VALM1(Z,X,"BTYPE")
|
---|
41 | S Z=$E($$EXTERNAL^DILFD(364.7,.05,"",$P(IBDEF,U,5)),1,25) S:Z="" Z="ALL"
|
---|
42 | S X=$$SETFLD^VALM1(Z,X,"INSCO")
|
---|
43 | S X=$$SETFLD^VALM1($P(IB0,U,9),X,"LENGTH")
|
---|
44 | S X=$$SETFLD^VALM1($P(IB0,U,6),X,"MAX")
|
---|
45 | S X=$$SETFLD^VALM1($S($P(IB0,U,11):"NO",1:"YES"),X,"OUTPUT")
|
---|
46 | Q X
|
---|
47 | ;
|
---|
48 | FNL ; Clean up local form fields list
|
---|
49 | K ^TMP("IBCEFLDDX",$J)
|
---|
50 | D CLEAN^VALM10
|
---|
51 | Q
|
---|
52 | ;
|
---|
53 | SET(X,FLD) ; -- set arrays for local form list
|
---|
54 | ; X = the display text for ien (FLD)
|
---|
55 | W "."
|
---|
56 | S VALMCNT=VALMCNT+1,^TMP("IBCEFLD",$J,VALMCNT,0)=X
|
---|
57 | S ^TMP("IBCEFLD",$J,"IDX",VALMCNT,IBCNT)=""
|
---|
58 | S ^TMP("IBCEFLDDX",$J,IBCNT)=VALMCNT_"^"_FLD
|
---|
59 | Q
|
---|
60 | ;
|
---|
61 | HDR ; Set up hdr
|
---|
62 | N IB2
|
---|
63 | Q:'$G(IBCEXDA)
|
---|
64 | S IB2=$G(^IBE(353,IBCEXDA,2))
|
---|
65 | S VALMHDR(1)=$E("Bill Form: "_$P($G(^IBE(353,IBCEXDA,0)),U)_$J("",33),1,33)
|
---|
66 | S VALMHDR(1)=VALMHDR(1)_$S($P(IB2,U,5)&($P(IB2,U,5)'=IBCEXDA):"Associated With Nat. Form: "_$P($G(^IBE(353,$P(IB2,U,5),0)),U),1:"Not Associated With A National Form")
|
---|
67 | Q
|
---|
68 | ;
|
---|