source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DIOQ.m@ 1046

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

initial load of WorldVistAEHR

File size: 1006 bytes
RevLine 
[613]1DIOQ ;SFISC/GS,TKW-QUERY OPTIMIZER ;4/5/95 14:02
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4SER(F,DIOQGET,DIOQCHEK,C,X,%,W) ; COMPUTE SEARCH EFFICIENCY RATING
5 ; F=FILE#, DIOQGET=GET CODE, DIOQCHEK=EVALUATION CODE,
6 ; C=USEABLE INDEX? (1=YES, 0=NO)
7 ; X=EFFICIENCY RATING, %=PREVALANCE OF HITS (PROBABILITY)
8 ; W=WRITE PROGRESS MSG.TO USER
9 N Z S (X,%)=0,W=$G(W),Z=$G(^DIC(+$G(F),0,"GL")) Q:Z=""
10 N I,N,T,D0,DA,DITRUE,DIFIRST S DIFIRST=1
11 I W S W=$P($H,",",2)+.1
12 S (T,N)=0,I=$P(@(Z_"0)"),U,4)\100
13 F D0=0:I S D0=$O(@(Z_D0_")")) Q:'D0 Q:N>100 S DA=D0,N=N+1 D TEST I DITRUE S T=T+1
14 S %=$S(N=0:1,T=0:0,1:T/N),(X,%)=1-% I C S:%=1 X=100 S:%'=1 X=%/(1-%)
15 S X=$J(X,1,4),%=$J(%,1,4) Q
16 ;
17TEST ; GET VALUE AND EVALUATE IT
18 N I,L,N,T,Z,DIOQSVD0 S DIOQSVD0=D0 D S D0=DIOQSVD0
19 . N F,C,W,DIFIRST
20 . X DIOQGET,DIOQCHEK S DITRUE=$T Q
21 Q:'W Q:($P($H,",",2)-W)'>3 S W=$P($H,",",2)+.1
22 I DIFIRST S DIFIRST=0 W !,"Computing search efficiency..." Q
23 W "." Q
Note: See TracBrowser for help on using the repository browser.