source: FOIAVistA/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDF7.m@ 635

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1IBDF7 ;ALB/CJM - ENCOUNTER FORM - BUILD FORM(ADDING TOOLKIT BLKS) ; 08-JAN-1993
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
3 ;
4ADD ;create a new block by copying a toolkit block
5 N BLKLIST,OLDBLOCK,NEWBLOCK,TOP,BOT,IBBG,IBLFT
6 S VALMBCK="R",IBBG=+$G(VALMBG),OLDBLOCK="",IBLFT=+$G(VALMLFT)
7 D EN^VALM("IBDF TOOL KIT BLOCK LIST") ;list processor displays list of tool kit blocks
8 I '$G(IBFASTXT) D
9 .S VALMBG=IBBG S:VALMBG<1 VALMBG=1
10 .Q:OLDBLOCK="" ;selected tool kit block stored in OLDBLOCK
11 .S NEWBLOCK=$$COPYBLK^IBDFU2(OLDBLOCK,IBFORM,357.1,357.1,IBBG-1,IBLFT-5,0,"",1)
12 .D RE^VALM4,POS^IBDFU4(NEWBLOCK)
13 .S VALMBCK="R"
14 .D TOPNBOT^IBDFU5(NEWBLOCK,.TOP,.BOT)
15 .D IDXFORM^IBDF5A(TOP,BOT)
16 Q
17 ;
18INIT ;entry code to list
19 S BLKLIST="^TMP(""IBDF"",$J,""TOOL KIT BLOCK LIST"")"
20 D IDXBLKS
21 Q
22HELP ; -- help code
23 S X="?" D DISP^XQORM1 W !
24 Q
25 ;
26EXIT ; -- exit code
27 K @BLKLIST
28 Q
29 ;
30IDXBLKS ; sets up list of toolkit blocks for list processor
31 N BLOCK,TK
32 K @BLKLIST
33 S VALMCNT=0
34 S TK=0,BLOCK="" F S TK=$O(^IBE(357.1,"D",TK)) Q:'TK F S BLOCK=$O(^IBE(357.1,"D",TK,BLOCK)) Q:'BLOCK D
35 .Q:'$P($G(^IBE(357.1,BLOCK,0)),"^",14)
36 .S VALMCNT=VALMCNT+1
37 .S @BLKLIST@(VALMCNT,0)=$$DISPLAY(BLOCK,VALMCNT,TK),@BLKLIST@("IDX",VALMCNT,VALMCNT)=BLOCK
38 .D FLDCTRL^VALM10(VALMCNT,"ID") ;set video for ID column
39 Q
40 ;
41DISPLAY(BLOCK,ID,TKORDER) ;adds one toolkit block to the list array
42 N NODE,NAME,DESCR,RET
43 ;** note: IBTKBLK=1 only if editing the tool kit blocks - display the tool kit order in that case
44 S RET=$J(ID,3)_$$PADRIGHT^IBDFU("",2)
45 S NODE=$G(^IBE(357.1,BLOCK,0))
46 S NAME=$P(NODE,"^",1),DESCR=$P(NODE,"^",13)
47 S RET=RET_$$PADRIGHT^IBDFU(NAME,30)_" "
48 I $G(IBTKBLK) S RET=RET_$E($J(TKORDER,4),1,4)_" "
49 S RET=RET_$E(DESCR,1,80)
50 Q RET
51SELECT ;
52 N CHOICE
53 D EN^VALM2($G(XQORNOD(0)),"S")
54 S CHOICE=$O(VALMY("")) Q:'CHOICE S OLDBLOCK=$G(@VALMAR@("IDX",CHOICE,CHOICE))
55 Q
Note: See TracBrowser for help on using the repository browser.