source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIULAPI.m@ 1361

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

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1TIULAPI ; SLC/JER - Extract selected documents from TIU ;6/7/06 11:14
2 ;;1.0;TEXT INTEGRATION UTILITIES;**211**;Jun 20, 1997;Build 26
3MAIN(DFN,TIUDOC,STATUS,TIME1,TIME2,OCCLIM,TEXT) ; Control branching
4 N TIUDA,TIUDT,TIUPRM0,TIUPRM1,TIUPRM3,COUNT,TIUSI,TIUS,TIUTI,TYPES
5 D SETPARM^TIULE
6 S:+$G(OCCLIM)'>0 OCCLIM=999
7 S:+$G(TIME1)'>0 TIME1=6666666
8 S:+$G(TIME2)'>0 TIME2=9999999
9 K ^TMP("TIU",$J)
10 I '$D(TIUPRM0) D SETPARM^TIULE
11 D DOCTYPE^TIUSRVL(.TYPES,TIUDOC)
12 I $D(STATUS)'>9 D STATUS^TIUSRVL(.STATUS,$S($G(STATUS)]"":STATUS,1:"ALL"))
13 S TIUTI=0 F S TIUTI=$O(TYPES(TIUTI)) Q:+TIUTI'>0 D
14 . S TIUDOC=+$G(TYPES(TIUTI))
15 . S TIUSI=0 F S TIUSI=$O(STATUS(TIUSI)) Q:+TIUSI'>0 D
16 . . S TIUS=+$G(STATUS(TIUSI)),TIUDT=TIME1
17 . . F S TIUDT=$O(^TIU(8925,"APT",DFN,TIUDOC,TIUS,TIUDT)) Q:+TIUDT'>0!(TIUDT>TIME2)!(+$G(COUNT)'<OCCLIM) D
18 . . . S TIUDA=0 F S TIUDA=$O(^TIU(8925,"APT",DFN,TIUDOC,TIUS,TIUDT,TIUDA)) Q:+TIUDA'>0 D
19 . . . . I +$$ISADDNDM^TIULC1(TIUDA),+TEXT Q
20 . . . . I +$$CANDO^TIULP(TIUDA,"VIEW")'>0 Q
21 . . . . S COUNT=+$G(COUNT)+1
22 . . . . D EXTRACT^TIULQ(TIUDA,"^TMP(""TIU"",$J,"_COUNT_")",.TIUERR,".01;.05;.07;.08;1202;1203;1205;1208;1209;1301;1307;1402;1501:1505;1507:1513;1701;89261","",1)
23 Q
Note: See TracBrowser for help on using the repository browser.