source: FOIAVistA/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDF5.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1IBDF5 ;ALB/CJM - ENCOUNTER FORM (edit a form);NOV 16,1992
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
3 ;displays the form for editing using the list processor
4 ;
5 ;these variables should always be defined while editing a form
6 ;IBFORM - contains the form description
7INIT ;
8 ;
9 Q:'$$FORMDSCR^IBDFU1C(.IBFORM)
10 D IDXFORM^IBDF5A()
11 Q
12EXIT ;
13 K @VALMAR
14 Q
15HDR ;the screen header, a ruler
16 S VALMHDR(1)=$$PADRIGHT^IBDFU("",4) ;VALMHDR(2)=VALMHDR(2)_0
17 F I=1:1:16 S VALMHDR(1)=VALMHDR(1)_$J(I,10)
18 Q
19DELETE ;allows user to select a block for deletion
20 N IBBLK,IBVALMBG,TOP,BOT
21 S VALMBCK="R",IBVALMBG=$G(VALMBG)
22 S VALMBG=IBVALMBG
23 D FULL^VALM1
24 S IBBLK=$$SLCTBLK^IBDFU8(IBFORM,IOSL)
25 Q:'IBBLK
26 Q:'$$RUSURE^IBDFU5($P($G(^IBE(357.1,IBBLK,0)),"^"))
27 D TOPNBOT^IBDFU5(IBBLK,.TOP,.BOT)
28 D DLTBLK^IBDFU3(IBBLK,IBFORM,357.1)
29 S VALMBCK="R"
30 D IDXFORM^IBDF5A(TOP,BOT)
31 Q
32 ;
33MOVE ;allows the user to select a block and move it
34 N IBBLK,NODE0,BLKWIDTH,BLKHT,STARTCOL,STARTROW,TOP1,BOT1,TOP2,BOT2
35 S VALMBCK="R"
36 ;D FULL^VALM1
37 S IBBLK=$$SLCTBLK^IBDFU8(IBFORM,5)
38 I IBBLK D
39 .S NODE0=$G(^IBE(357.1,IBBLK,0))
40 .S BLKWIDTH=+$P(NODE0,"^",6),BLKHT=+$P(NODE0,"^",7),STARTCOL=+$P(NODE0,"^",5),STARTROW=+$P(NODE0,"^",4)
41 .S TOP1=STARTROW,BOT1=(TOP1+BLKHT)-1
42 .I STARTROW!(IBFORM("HT")>BLKHT) K DIR S DIR(0)="NA^1:"_(IBFORM("HT")-BLKHT+1)_":0",DIR("A")="Move the TOP MARGIN of the block to which row?: ",DIR("B")=STARTROW+1 D ^DIR K DIR Q:$D(DIRUT) S STARTROW=X-1
43 .I STARTCOL!(IBFORM("WIDTH")>BLKWIDTH) K DIR S DIR(0)="NA^1:"_(IBFORM("WIDTH")-BLKWIDTH+1)_":0",DIR("A")="Move the LEFT MARGIN of the block to which column?: ",DIR("B")=STARTCOL+1 D ^DIR K DIR Q:$D(DIRUT) S STARTCOL=X-1
44 .K DIE,DA S DIE=357.1,DA=IBBLK,DR=".04////^S X=STARTROW;.05////^S X=STARTCOL" D ^DIE K DIE,DA,DR
45 .S VALMBCK="R"
46 .D TOPNBOT^IBDFU5(IBBLK,.TOP2,.BOT2) S TOP1=$S(TOP1<TOP2:TOP1,1:TOP2) S BOT1=$S(BOT1>BOT2:BOT1,1:BOT2)
47 .D IDXFORM^IBDF5A(TOP1,BOT1)
48 .S VALMBG=STARTROW-7 S:VALMBG<1 VALMBG=1
49 Q
50RESIZE ;allows user to select a block & re-size it
51 N IBBLK,BLKWIDTH,BLKHT,STARTCOL,STARTROW,TOP1,TOP2,BOT1,BOT2
52 S IBBLK=$$SLCTBLK^IBDFU8(IBFORM,5)
53 I IBBLK D
54 .D NOWSIZE S TOP1=STARTROW,BOT1=(TOP1+BLKHT)-1
55 .D NEWSIZE
56 .D TOPNBOT^IBDFU5(IBBLK,.TOP2,.BOT2) S TOP1=$S(TOP1<TOP2:TOP1,1:TOP2) S BOT1=$S(BOT1>BOT2:BOT1,1:BOT2)
57 .D IDXFORM^IBDF5A(TOP1,BOT1)
58 S VALMBCK="R"
59 Q
60NOWSIZE ;what size is the block, and where does it start? returns BLKWIDTH,BLKHT,STARTROW,STARTCOL
61 N NODE0
62 S NODE0=$G(^IBE(357.1,IBBLK,0))
63 S BLKWIDTH=+$P(NODE0,"^",6),BLKHT=+$P(NODE0,"^",7),STARTCOL=+$P(NODE0,"^",5),STARTROW=+$P(NODE0,"^",4)
64 Q
65NEWSIZE ;allows user to change the size of a block
66 K DIR S DIR(0)="NA^"_(STARTROW+1)_":"_(IBFORM("HT"))_":0",DIR("A")="Move the BOTTOM MARGIN of the block to which row?: ",DIR("B")=(STARTROW+BLKHT) D ^DIR K DIR Q:$D(DIRUT) S BLKHT=(X-STARTROW)
67 K DIR S DIR(0)="NA^"_(STARTCOL+1)_":"_IBFORM("WIDTH")_":0",DIR("A")="Move the RIGHT MARGIN of the block to which column?: ",DIR("B")=(STARTCOL+BLKWIDTH) D ^DIR K DIR Q:$D(DIRUT) S BLKWIDTH=(X-STARTCOL)
68 K DIE,DA S DIE=357.1,DA=IBBLK,DR=".06////^S X=BLKWIDTH;.07////^S X=BLKHT" D ^DIE K DIE,DA,DR
69 D UNCMPBLK^IBDF19(IBBLK)
70 Q
71SHIFT ;allows the user to shift a group of blocks within a rectangular region on the form
72 D SHIFT^IBDF10("B")
73 D IDXFORM^IBDF5A()
74 S VALMBCK="R"
75 Q
Note: See TracBrowser for help on using the repository browser.