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

TIUSRVLP.m

Go to the documentation of this file.
TIUSRVLP ;BAY PINES/ELR - Server fns - Cont of TIUSRVLO ;20-NOV-2001 08:51:07
 ;;1.0;TEXT INTEGRATION UTILITIES;**194,268**;Jun 20, 1997;Build 60
 ;
 ;
 ;
 ;VMP OIFO BAY PINES;ELR;TIU*1.0*194 FORCED TO BREAK UP TIUSRVLO DUE TO SIZE
APTCL(TIUY,CLASS,TIUAUTH,DFN,TIME1,TIME2,SEQUENCE) ; Signed, by author
 N DATTIM,DA,ROOT,TIUI,TIUS12,TIUS15
 S ROOT=$NA(^TIU(8925,"APTCL",DFN,CLASS))
 S DATTIM=TIME1-.0000001
 F  S DATTIM=$O(@ROOT@(DATTIM)) Q:DATTIM'>0!(DATTIM>TIME2)  D
 . S DA=0 F  S DA=$O(@ROOT@(DATTIM,DA)) Q:DA'>0  D
 . . I +$G(^TIU(8925,+DA,0))'>0 K @ROOT@(DA) Q
 . . S TIUI=$S(SEQUENCE="D":+$G(TIUI)+1,1:+$G(TIUI)-1)
 . . Q:+$D(@TIUY@("INDX",DA))
 . . ; Selectively filter DELETED or RETRACTED records 
 . . I +$P($G(^TIU(8925,DA,0)),U,5)>13,'+$$CANDO^TIULP(DA,"VIEW",DUZ) Q
 . . S TIUS12=$G(^TIU(8925,DA,12))
 . . Q:+$P(TIUS12,U,2)'=TIUAUTH         ;See if this is the authors note
 . . S TIUS15=$G(^TIU(8925,DA,15))
 . . Q:+$P(TIUS15,U,2)'>0                 ;See if signed
 . . S @TIUY@(TIUI)=DA_U_$$RESOLVE^TIUSRVLO(DA)
 . . S @TIUY@("INDX",DA,TIUI)=""
 . . Q:+$G(SHOWADD)=0
 . . S TIUP=+$$HASDAD^TIUSRVLI(DA) I TIUP D  D SETDAD^TIUSRVLI(.TIUY,DA,.TIUI)
 . . . N TIUPT
 . . . S TIUPT=$P($G(^TIU(8925,+DA,0)),"^",6)
 . . . I TIUPT]"",'$D(^TIU(8925,"DAD",TIUPT,DA)) S ^TIU(8925,"DAD",TIUPT,DA)=""
 . . . I TIUPT="" S TIUPT=$G(^TIU(8925,+DA,21))
 . . . I '$D(^TIU(8925,TIUPT,0)) S $P(@TIUY@(TIUI),"^",16)=1,$P(@TIUY@(TIUI),"^",14)=4 Q
 . . I +$$HASKIDS^TIUSRVLI(DA) D SETKIDS^TIUSRVLI(.TIUY,DA,.TIUI)
 Q