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

IBDF12.m

Go to the documentation of this file.
IBDF12 ;ALB/CJM - ENCOUNTER FORM - ENTRY FOR EDITING TOOLKIT FORMS ;JUN 16,1992
 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
 ;
 ;*** NOTE:
 ;IBTKFORM=1 while editing a tk form
 ;IBTKBLK=0 while editing blocks on a tk form - because they are not tk blocks 
FORMLIST ;
 N IBTKFORM,IBTKBLK,IBDEVICE,IBAPI
 S IBTKFORM=1,IBTKBLK=0
 N IBFASTXT ;set to 1 for fast exit from system
 S IBFASTXT=0
 S IBAPI("INDEX")="D IDXFORMS^IBDF12"
 S IBAPI("SELECT")="D SELECT^IBDF12"
 D DEVICE^IBDFUA(1,.IBDEVICE)
 K XQORS,VALMEVL
 S IBCLINIC=""
 D EN^VALM("IBDF TOOL KIT FORMS")
 Q
ONENTRY ;
 D IDXFORMS
 Q
ONEXIT ;
 D KILL^%ZISS
 K ^TMP("IB",$J),^TMP("IBDF",$J),IBCLINIC,VALMY,IBQUIT,VALMBCK,X,Y,I,DA,D0
 Q
 ;
IDXFORMS ;build an array of toolkit forms
 N FORM,NODE
 K @VALMAR
 S VALMCNT=0
 S FORM=0 F  S FORM=$O(^IBE(357,"C",1,FORM)) Q:'FORM  S NODE=$G(^IBE(357,FORM,0)) I +$P(NODE,"^",7),$P(NODE,"^")'="TOOL KIT",$P(NODE,"^")'="WORKCOPY" D ENTRY
 Q
ENTRY ;adds an entry to the array
 S VALMCNT=VALMCNT+1,@VALMAR@(VALMCNT,0)=$J(VALMCNT,3)_"  "_$$PADRIGHT^IBDFU($P(NODE,"^",1),30)_"  "_$E($P(NODE,"^",3),1,80)
 S @VALMAR@("IDX",VALMCNT,VALMCNT)=FORM D FLDCTRL^VALM10(VALMCNT) ;set video for ID column
 S @VALMAR@("IDX",VALMCNT,VALMCNT)=FORM_"^"
 Q
HDR ;
 S VALMHDR(1)="TOOLKIT FORMS"
 Q
DELFORM ;allows user to select a form, then deletes it
 N SEL,FORM
 D EN^VALM2($G(XQORNOD(0)),"S")
 S SEL=$O(VALMY("")),FORM=""
 I SEL S FORM=+$G(@VALMAR@("IDX",SEL,SEL))
 I FORM D DELETE^IBDFU2C(FORM,357,1)
 S VALMBCK="R"
 D IDXFORMS
 Q
 ;
SELECT ;
 N SEL
 S IBFORM=""
 D EN^VALM2($G(XQORNOD(0)),"S")
 S SEL=$O(VALMY(""))
 I SEL S IBFORM=+$G(@VALMAR@("IDX",SEL,SEL))
 Q