CRHD3 ; CAIRO/CLC - Modules to support CAIRO Hand-off Tool ;03-Apr-2008 11:22;CLC ;;1.0;CRHD;****;Jan 28, 2008;Build 19 ;================================================================= GTEMPTXT(CRHDRTN,CRHDSTR) ; D GETTEXT(.CRHDRTN,.CRHDSTR,1) Q GETTEXT(CRHDRTN,CRHDSTR,DIWF) ; N CRHDFLD,CRHDUSER,CRHDDFN,CRHDVALS,CRHDTEAM,X,CRHDX1 N CRHDFLDN,CRHDTRG,CRHDTM,CRHDTSP,CRHDPN,CRHDFG,CRHDX N CRHDLEN,CRHDCT,CRHDWLED,CRHDTMP,CRHDATTN,CRHDDIV,CRHDEX,CRHDZ0,DIWL,DIWR N CRHDEXPD,CRHDFG2,CRHDLEDI,CRHDLL,CRHDLSTT,CRHDMN2,CRHDROOT,CRHDNAM K CRHDRTN S CRHDTRG="^CRHD(183.2)" S CRHDFLD=$P(CRHDSTR,"^",1) S:CRHDFLD'="" CRHDFLD=$$UP^XLFSTR(CRHDFLD) S CRHDUSER=$P(CRHDSTR,"^",2) S CRHDDFN=$P(CRHDSTR,"^",3) S CRHDLEN=$P(CRHDSTR,"^",4) I 'CRHDLEN S CRHDLEN=256 S CRHDDIV=$P(CRHDSTR,"^",5) S DIWF=$S(+$G(DIWF):"NR",1:"R") I CRHDDIV="" S CRHDDIV=+$$SITE^VASITE S CRHDATTN=+$G(^DPT(+CRHDDFN,.1041)) Q:CRHDFLD="" Q:'CRHDUSER Q:'CRHDDFN ;get expiration date for temp fields S CRHDEX=$$GET^XPAR("DIV.`"_CRHDDIV,"CRHD TEMP FLD EXPIRE",1,"I") S CRHDFLDN=$O(@CRHDTRG@("B",CRHDFLD,0)) Q:'CRHDFLDN S CRHDFG=$O(^CRHD(183.2,"C",+CRHDDFN,CRHDFLDN,0)) Q:'CRHDFG ;check expiration date here S CRHDZ0=$G(@CRHDTRG@(CRHDFLDN,1,CRHDFG,0)),CRHDLEDI=$P(CRHDZ0,"^",5),CRHDWLED=$P(CRHDZ0,"^",4) ;S CRHDEX=7 I 'CRHDEX S CRHDEX=7 ;if parameter not set default to 7 days I CRHDEX&(CRHDLEDI) S CRHDEXPD=$$FMADD^XLFDT(CRHDLEDI,CRHDEX) I $G(CRHDEXPD) I $G(CRHDEXPD)