Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBDF9

IBDF9.m

Go to the documentation of this file.
  1. IBDF9 ;ALB/CJM - ENCOUNTER FORM - BUILD FORM(display single form block for edit) ; 08-JAN-1993
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
  1. ;
  1. INIT ;
  1. D IDXBLOCK^IBDFU4
  1. Q
  1. EXIT ;
  1. K @VALMAR
  1. Q
  1. HDR ;
  1. S VALMHDR(1)=$$PADRIGHT^IBDFU("",4)
  1. F I=1:1:16 S VALMHDR(1)=VALMHDR(1)_$J(I,10)
  1. Q
  1. RESIZE ;resize the block
  1. N IBW,IBH
  1. S VALMBCK="R"
  1. K DIR S DIR(0)="NA^1:"_IBFORM("WIDTH")_":0",DIR("A")="Move the RIGHT MARGIN of the block to which column?: ",DIR("B")=IBBLK("W") D ^DIR K DIR Q:$D(DIRUT) S IBW=X
  1. S DIR(0)="NA^1:"_IBFORM("HT")_":0",DIR("A")="Move the BOTTOM MARGIN of the block to which row?: ",DIR("B")=IBBLK("H") D ^DIR K DIR Q:$D(DIRUT) S IBH=X
  1. K DR,DIE,DA S DIE=357.1,DA=IBBLK,DR=".06////^S X=IBW;.07////^S X=IBH" D ^DIE K DIE,DR,DA
  1. S VALMBCK="R"
  1. D UNCMPBLK^IBDF19(IBBLK),IDXBLOCK^IBDFU4
  1. Q
  1. EDITBLK ;edit the name,brief description, header and outline
  1. ;automatically shifts contents and changes size of block if changes in header or outline call for that
  1. N HDR1,HDR2 ;flags set to indicate existance of hdr before and after editing
  1. N NODE,IBNAME,QUIT
  1. S QUIT=0,VALMBCK="R"
  1. D FULL^VALM1
  1. S NODE=$G(^IBE(357.1,IBBLK,0))
  1. S HDR1=$P(NODE,"^",11) S:HDR1'="" HDR1=1
  1. K DIR S DIR(0)="357.1,.01",DIR("B")=$P($G(^IBE(357.1,IBBLK,0)),"^") D ^DIR K DIR D Q:QUIT
  1. .I (Y=-1)!$D(DIRUT) S QUIT=1 Q
  1. .S IBNAME=Y
  1. .K DA,DR,DIE S DIE=357.1,DA=IBBLK,DR="[IBDF EDIT HEADER&OUTLINE]" D ^DIE K DIE,DR,DA
  1. S NODE=$G(^IBE(357.1,IBBLK,0))
  1. S HDR2=$P(NODE,"^",11) S HDR2=$S(HDR2="":0,1:1)
  1. ;shift contents and resize if there has been a change to existance of the header
  1. I HDR1'=HDR2 D
  1. .N TOP,BOTTOM,LEFT,RIGHT,WAY,AMOUNT
  1. .S TOP=0,BOTTOM=IBBLK("H"),LEFT=0,RIGHT=IBBLK("W"),AMOUNT=1
  1. .I HDR2 S WAY="D" D E^IBDF10 S $P(NODE,"^",7)=$P(NODE,"^",7)+1,^IBE(357.1,IBBLK,0)=NODE
  1. .I HDR1 S WAY="U" D E^IBDF10 S $P(NODE,"^",7)=$P(NODE,"^",7)-1,^IBE(357.1,IBBLK,0)=NODE
  1. D UNCMPBLK^IBDF19(IBBLK),IDXBLOCK^IBDFU4
  1. Q