source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUPS163.m@ 1259

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1TIUPS163 ; SLC/JER,AJB - More Review Screen Actions ;14-MAY-2004 [10/18/04 11:47am]
2 ;;1.0;TEXT INTEGRATION UTILITIES;**163**;Jun 20, 1997
3MAIN ;controls branching
4 D REINDEX,NEWXREF
5 Q
6NEWXREF ;creates new xref "VS" on field 1207
7 N TIUD0,TIUARR,TIURES
8 S TIUD0=0
9 S TIUD0=$O(^TIU(8925,"VS",TIUD0))
10 I 'TIUD0 D
11 . S TIUARR("FILE")=8925
12 . S TIUARR("NAME")="VS"
13 . S TIUARR("USE")="LS"
14 . S TIUARR("TYPE")="R"
15 . S TIUARR("SHORT DESCR")="REGULAR XREF ON FIELD 1207"
16 . S TIUARR("DESCR",1)="THIS XREF CONTAINS AS A SUBSCRIPT"
17 . S TIUARR("DESCR",2)="THE VALUE OF FIELD 1207 OF FILE #8925"
18 . S TIUARR("VAL",1)=1207
19 . S TIUARR("VAL",1,"SUBSCRIPT")=1
20 . D CREIXN^DDMOD(.TIUARR,"W",.TIURES,"OUT")
21 D QUE
22 Q
23QUE ;queue the indexing of the VS xref
24 N TIUD0
25 S TIUD0=0
26 S TIUD0=$O(^TIU(8925,"VS",TIUD0))
27 I 'TIUD0 D
28 . N ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK,DIR,TIUQUIT
29 . S ZTRTN="INDEXVS^TIUPS163",ZTIO="",ZTSAVE("DUZ")=""
30 . S ZTDESC="Index the new VS XRef on file 8925"
31 . D ^%ZTLOAD
32 . I $G(ZTSK) D
33 . . K ^XTMP("TIUPS163")
34 . . N X,X1,X2 S X1=DT,X2=30
35 . . D C^%DTC
36 . . S ^XTMP("TIUPS163",0)=X_"^"_DT_"^"
37 . . S ^XTMP("TIUPS163","COUNT")=0
38 . . W !!,"A task has been queued in the background."
39 . . W !," The task number is "_$G(ZTSK)_"."
40 . . W !," To check on the status of the task, in programmer mode "
41 . . W !," type D STATUS^TIUPS163"
42 Q
43REINDEX ;reindex the ACL xref on 8925.1
44 N DIK
45 S DIK="^TIU(8925.1,",DIK(1)=".01^ACL"
46 D BMES^XPDUTL("REBUILDING NEW ""ACL"" CROSS-REFERENCE ON FILE 8925.1")
47 K ^TIU(8925.1,"ACL") ; Remove the existing ACL x-ref
48 D ENALL^DIK
49 D BMES^XPDUTL("DONE")
50 Q
51INDEXVS ;index the VS xref on 8925
52 N TIUDA,TIUCNT,%,%H,%I,X
53 D NOW^%DTC
54 S ^XTMP("TIUPS163","STARTDT")=%
55 S TIUDA=0,TIUCNT=0
56 F S TIUDA=$O(^TIU(8925,TIUDA)) Q:'TIUDA S TIUCNT=TIUCNT+1 S ^XTMP("TIUPS163","COUNT")=TIUCNT I $P($G(^TIU(8925,TIUDA,12)),U,7) S ^TIU(8925,"VS",$P($G(^TIU(8925,TIUDA,12)),U,7),TIUDA)=""
57 D NOW^%DTC
58 S ^XTMP("TIUPS163","ENDDT")=%
59 Q
60STATUS ;check on status of VS xref indexing
61 I $G(^XTMP("TIUPS163","ENDDT")) D
62 . N START,END,X,Y
63 . W !,"Indexing completed!"
64 . S Y=$G(^XTMP("TIUPS163","STARTDT")) D DD^%DT
65 . W !,"Task started: "_Y
66 . S Y=$G(^XTMP("TIUPS163","ENDDT")) D DD^%DT
67 . W !,"Task ended: "_Y
68 I '$G(^XTMP("TIUPS163","ENDDT")) D
69 . W "Still working on the index."
70 . W !,$G(^XTMP("TIUPS163","COUNT"))_" of "_$P($G(^TIU(8925,0)),U,4)
71 . W " completed"
72 . I $G(^XTMP("TIUPS163","COUNT"))=0 W !,"You must have tasked it!"
73 Q
Note: See TracBrowser for help on using the repository browser.