TIU169D ; SLC/MAM - Data, etc for Option for TIU*1*169 ; 10/4/2004 ;;1.0;Text Integration Utilities;**169**;Jun 20, 1997 ; ADDITEM(NUM,TIUDA,PIEN) ; Add DDEF TIUDA to Parent; Return Item IEN N MENUTXT,TIUFPRIV,TIUFISCR N DIE,DR S TIUFPRIV=1 N DA,DIC,DLAYGO,X,Y N I,DIY S DA(1)=PIEN S DIC="^TIU(8925.1,"_DA(1)_",10,",DIC(0)="LX" S DLAYGO=8925.14 ; -- If TIUDA is say, x, and Parent has x as IFN in Item subfile, ; code finds item x under parent instead of creating a new item, ; so don't use "`"_TIUDA: S X=^TMP("TIU169",$J,"BASICS",NUM,"NAME") ; -- Make sure the DDEF it adds is TIUDA and not another w same name: S TIUFISCR=TIUDA ; activates item screen on fld 10, Subfld .01 in DD D ^DIC I Y'>0!($P(Y,U,3)'=1) S ^TMP("TIU169ERR",$J,NUM)="ADDITEM" Q Y ; FILEITEM(NUM,PIEN,ITEMDA) ; File Menu Text for DDEF item ITEMDA ;under parent N TIUFPRIV,MENUTXT,ITEMFDA K TIUIERR S TIUFPRIV=1,MENUTXT=$G(^TMP("TIU169",$J,"DATA",NUM,"MENUTXT")) S ITEMFDA(8925.14,ITEMDA_","_PIEN_",",4)=MENUTXT D FILE^DIE("TE","ITEMFDA","TIUIERR") I $D(TIUIERR) S ^TMP("TIU169ERR",$J,NUM)="FILEITEM" Q ; DELETE(TIUDA,PIEN,ITEMDA) ; Delete DDEF TIUDA; If parent PIEN and ;Item IEN ITEMDA sent, first delete item from parent N DA,DIK,X,Y,I I $G(PIEN),$G(ITEMDA) D . S DA(1)=PIEN,DA=ITEMDA,DIK="^TIU(8925.1,DA(1),10," D ^DIK N DA,DIK S DA=TIUDA,DIK="^TIU(8925.1," D ^DIK Q ; PRINT ; Print out results from message array ^TMP("TIU169MSG",$J N TIUCNT,TIUCONT I $D(ZTQUEUED) S ZTREQ="@" ; Tell TaskMan to delete Task log entry I $E(IOST)="C-" W @IOF,! S TIUCNT="",TIUCONT=1 F S TIUCNT=$O(^TMP("TIU169MSG",$J,TIUCNT)) Q:TIUCNT="" D Q:'TIUCONT . S TIUCONT=$$SETCONT Q:'TIUCONT . W ^TMP("TIU169MSG",$J,TIUCNT),! PRINTX Q ; STOP() ;on screen paging check ; quits TIUCONT=1 if cont. ELSE quits TIUCONT=0 N DIR,Y,TIUCONT S DIR(0)="E" D ^DIR S TIUCONT=Y I TIUCONT W @IOF,! Q TIUCONT ; SETCONT() ; D form feed, Set TIUCONT N TIUCONT S TIUCONT=1 I $E(IOST)="C-" G SETX:$Y+5