70 lines
2.0 KiB
Mathematica
70 lines
2.0 KiB
Mathematica
TIUSUPN1 ;SLC/TT - SIGNED DOCUMENT WITH UNSIGNED STATUS; 11/23/04
|
|
;;1.0; TEXT INTEGRATION UTILITIES;**180**;Jun 20, 1997
|
|
;
|
|
Q
|
|
;
|
|
UPDTDOC ;update status
|
|
N TIULINE,TIUDA,TIUSEL,TIUC
|
|
D FULL^VALM1
|
|
S TIUSEL=""
|
|
F S TIUSEL=$O(^TMP("TIUSEL",$J,TIUSEL)) Q:'TIUSEL D
|
|
.S TIULINE=$P(^TMP("TIUSEL",$J,TIUSEL),U)
|
|
.S TIUC(TIULINE)=$O(@VALMAR@("IDX",TIULINE,""))
|
|
.S TIUDA=TIUC(TIULINE)
|
|
.Q:'TIUDA
|
|
.I $P(^TIU(8925,TIUDA,0),U,5)=7 Q
|
|
.I $$UPDATE^TIUSUPN1(TIUDA) D
|
|
..D FLDTEXT^VALM10(TIULINE,"STATUS",$$GET1^DIQ(8925,TIUDA,.05))
|
|
..D SELECT^VALM10(TIULINE,1)
|
|
K VALMY S VALMBCK="R"
|
|
Q
|
|
;
|
|
UPDATE(DA) ;
|
|
N TIUSTAT,DIE,DR,TIUCOS,TIUCOSDT,TIULFLAG,TIUPFLAG,TIUD15
|
|
S (TIULFLAG,TIUPFLAG)=0
|
|
I DA'>0 Q 0
|
|
S TIUD15=$G(^TIU(8925,DA,15))
|
|
S TIUCOS=+$P(TIUD15,U,6),TIUCOSDT=+$P(TIUD15,U,7)
|
|
I TIUCOS,TIUCOSDT'>0 S TIUSTAT="uncosigned"
|
|
E S TIUSTAT="completed"
|
|
L +^TIU(8925,DA):1 I '$T S TIULFLAG=1
|
|
I 'TIULFLAG S DIE=8925,DR=".05///^S X=TIUSTAT" D ^DIE S TIUPFLAG=1
|
|
E W !,DA," is being edited by another user."
|
|
L -^TIU(8925,DA)
|
|
Q TIUPFLAG
|
|
;
|
|
BROWSE ;browse documents
|
|
N TIULINE,TIUDA,TIUSEL,TIUC
|
|
D FULL^VALM1
|
|
S TIUSEL=""
|
|
F S TIUSEL=$O(^TMP("TIUSEL",$J,TIUSEL)) Q:'TIUSEL D
|
|
.S TIULINE=^TMP("TIUSEL",$J,TIUSEL)
|
|
.S TIUC(TIULINE)=$O(@VALMAR@("IDX",TIULINE,""))
|
|
.S TIUDA=TIUC(TIULINE)
|
|
.Q:'TIUDA
|
|
.D EN^VALM("TIU BROWSE FOR READ ONLY")
|
|
K ^TMP("TIUSEL",$J),VALMY S VALMBCK="R"
|
|
Q
|
|
;
|
|
DISP ; detailed display
|
|
N TIULINE,TIUDA,TIUSEL,TIUC,TIUVIEW,RSTRCTD
|
|
D FULL^VALM1
|
|
S TIUSEL=""
|
|
F S TIUSEL=$O(^TMP("TIUSEL",$J,TIUSEL)) Q:'TIUSEL D
|
|
.S TIULINE=^TMP("TIUSEL",$J,TIUSEL)
|
|
.S TIUC(TIULINE)=$O(@VALMAR@("IDX",TIULINE,""))
|
|
.S TIUDA=TIUC(TIULINE)
|
|
.Q:'TIUDA
|
|
.S TIUVIEW=$$CANDO^TIULP(TIUDA,"VIEW")
|
|
.I +TIUVIEW'>0 D Q
|
|
.. W !!,$C(7),$P(TIUVIEW,U,2),!
|
|
.. I $$READ^TIUU("EA","RETURN to continue...") ; pause
|
|
.S RSTRCTD=$$DOCRES^TIULRR(TIUDA)
|
|
.I RSTRCTD D Q
|
|
.. W !!,$C(7),"Ok, no harm done...",!
|
|
.. I $$READ^TIUU("EA","RETURN to continue...") ; pause
|
|
.D EN^TIUAUDIT
|
|
.I +$G(TIUQUIT) D FIXLSTNW^TIULM Q
|
|
K VALMY,^TMP("TIUSEL",$J) S VALMBCK="R"
|
|
Q
|