source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUSRVLP.m@ 1670

Last change on this file since 1670 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.2 KB
RevLine 
[613]1TIUSRVLP ;BAY PINES/ELR - Server fns - Cont of TIUSRVLO ;20-NOV-2001 08:51:07
2 ;;1.0;TEXT INTEGRATION UTILITIES;**194**;Jun 20, 1997
3 ;VMP OIFO BAY PINES;ELR;TIU*1.0*194 FORCED TO BREAK UP TIUSRVLO DUE TO SIZE
4APTCL(TIUY,CLASS,TIUAUTH,DFN,TIME1,TIME2,SEQUENCE) ; Signed, by author
5 N DATTIM,DA,ROOT,TIUI,TIUS12,TIUS15
6 S ROOT=$NA(^TIU(8925,"APTCL",DFN,CLASS))
7 S DATTIM=TIME1-.0000001
8 F S DATTIM=$O(@ROOT@(DATTIM)) Q:DATTIM'>0!(DATTIM>TIME2) D
9 . S DA=0 F S DA=$O(@ROOT@(DATTIM,DA)) Q:DA'>0 D
10 . . I +$G(^TIU(8925,+DA,0))'>0 K @ROOT@(DA) Q
11 . . S TIUI=$S(SEQUENCE="D":+$G(TIUI)+1,1:+$G(TIUI)-1)
12 . . Q:+$D(@TIUY@("INDX",DA))
13 . . ; Selectively filter DELETED or RETRACTED records
14 . . I +$P($G(^TIU(8925,DA,0)),U,5)>13,'+$$CANDO^TIULP(DA,"VIEW",DUZ) Q
15 . . S TIUS12=$G(^TIU(8925,DA,12))
16 . . Q:+$P(TIUS12,U,2)'=TIUAUTH ;See if this is the authors note
17 . . S TIUS15=$G(^TIU(8925,DA,15))
18 . . Q:+$P(TIUS15,U,2)'>0 ;See if signed
19 . . S @TIUY@(TIUI)=DA_U_$$RESOLVE^TIUSRVLO(DA)
20 . . S @TIUY@("INDX",DA,TIUI)=""
21 . . Q:+$G(SHOWADD)=0
22 . . I +$$HASDAD^TIUSRVLI(DA) D SETDAD^TIUSRVLI(.TIUY,DA,.TIUI)
23 . . I +$$HASKIDS^TIUSRVLI(DA) D SETKIDS^TIUSRVLI(.TIUY,DA,.TIUI)
24 Q
Note: See TracBrowser for help on using the repository browser.