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

IBDFQSL.m

Go to the documentation of this file.
IBDFQSL ;ALB/CJM/AAS/MAF - ENCOUNTER FORM - Quick selection edit ;06/12/95
 ;;3.0;AUTOMATED INFO COLLECTION SYS;**63**;APR 24, 1997;Build 80
 ;
 ;
 ;allows user to select a form, then displays it for edit
 N IBFORM,ARY,DFN,IBAPPT,RTNLIST,IBPRINT
 S ARY="^TMP(""IBDF"",$J,""TEMPORARY CLINIC LIST"")"
 ;
 K @ARY
 S VALMBCK=""
 I $G(IBAPI("SELECT"))'="" X IBAPI("SELECT")
 K ARY
 I IBFORM,'$$LOCKFRM2^IBDFU7(IBFORM) D LOCKMSG2^IBDFU7(IBFORM) S IBFORM=""
 I IBFORM D PRNTPRMS^IBDFU1C(.IBPRINT,0,1,0,1),UNCMPL^IBDF19(IBFORM,0)
 Q:'$$FORMDSCR^IBDFU1C(.IBFORM)
EDITBLK ;allows the user to edit everything about the block
 ;allows user to discard or save changes to the block
 ;
 ;If IBBLK and IBBLK2 are used to point to two copies, one copy for editing and the other in case 'undo' is needed
 ; 
 N IBBLK,IBVALMBG,TOP1,TOP2,BOT1,BOT2,IBBLK2,IBTKODR,IBJUNK,IFSAVE
 ;
 S IBVALMBG=VALMBG
 D FULL^VALM1
 S IBBLK=$$SLCTBLK^IBDFU8(IBFORM,IOSL,"HEADER") ;select the block
 I IBBLK S IBLIST=$O(^IBE(357.2,"C",IBBLK,0)) D
 .I 'IBLIST W !!,"Block does not contain a list!  Try Again.",! D PAUSE^IBDFU5 Q
 .D KILL^IBDFUA
 .Q:$$BLKDESCR^IBDFU1B(.IBBLK)
 .S (IBBLK2,IBTKODR,IBJUNK)=""
 .D COPYBLK^IBDF5B(IBBLK,.IBBLK2,.IBBLK,.IBTKODR,.IBJUNK) I 'IBBLK S IBBLK=IBBLK2,IBBLK2="" Q  ;sets IBBLK to the work copy, IBBLK2 to the copy actually on the form
 .D TOPNBOT^IBDFU5(IBBLK,.TOP1,.BOT1)
 .D EN^IBDFQSL1
 .I IBBLK,IBBLK2 D
 ..S IFSAVE=$$ASKSAVE^IBDF5B
 ..I IFSAVE D SAVECOPY^IBDF5B(.IBBLK,.IBBLK2,IBTKODR) S IBBLK=IBBLK2,IBBLK2="" D BLKCHNG^IBDF19(IBFORM,IBBLK)
 ..I 'IFSAVE D DLTCOPY^IBDF5B(IBBLK) S IBBLK=IBBLK2,IBBLK2=""
 ..L -^IBE(357.1,IBBLK):1
 .I '$G(IBFASTXT) D
 ..S VALMBG=IBVALMBG
 ..D TOPNBOT^IBDFU5(IBBLK,.TOP2,.BOT2)
 ..S TOP1=$S(TOP1<TOP2:TOP1,1:TOP2),BOT1=$S(BOT1>BOT2:BOT1,1:BOT2)
 K ^TMP("IBDF DELETE SELECTION OPTION",$J),^TMP("IBDF DELETED ALL SELECTIONS",$J),^TMP("IBDF ADDSLCTN",$J)
 S VALMBCK="R"
 Q
 ;