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

YSTUSE.m

Go to the documentation of this file.
YSTUSE ;ASF/ALB- PSYCHOLOGICAL TEST USEAGE REPORTING ; 9/1/04 11:02am
 ;;5.01;MENTAL HEALTH;**87**;Dec 30, 1994
 ;called as a server option from YS TEST USAGE
1 N YSB,YSY,DFN,YSTST,YSCOMP,N,N1,A
 K ^TMP($J,"YSTAT")
 S ^TMP($J,"YSTAT",1)=$$SITE^VASITE
 S XMA=1 X XMREC
 I XMRG="" S ^TMP($J,"YSTAT",12)="Dates can not be resolved" D SENDER Q  ;-->out
 S YSB=$P(XMRG,U),YSY=$P(XMRG,U,2)
 S ^TMP($J,"YSTAT",2)="From: "_YSB_" To: "_YSY
 S ^TMP($J,"YSTAT",3)=" "
TT ;test ck
 S N=20,DFN=0
 F  S DFN=$O(^YTD(601.2,DFN)) Q:DFN'>0  D TST
 S YSTST=0 F  S YSTST=$O(A(YSTST)) Q:YSTST'>0  D
 . S N=N+1
 . S ^TMP($J,"YSTAT",N)=$P($G(^YTT(601,YSTST,0)),U)_U_YSTST_U_A(YSTST)
SENDER S XMSUB="MH testing Statistics: "_XQSUB,XMY(XMFROM)="",XMTEXT="^TMP($J,""YSTAT"","
 S XMDUZ="MH automated testing REPLY"
 N XMFROM,XMZ,XMREC,XMCHAN D ^XMD
 Q
TST ;test check
 S YSTST=0 F  S YSTST=$O(^YTD(601.2,DFN,1,YSTST)) Q:YSTST'>0  D COMP
 Q
COMP ;date range
 S YSCOMP=YSB-.01 F  S YSCOMP=$O(^YTD(601.2,DFN,1,YSTST,1,YSCOMP)) Q:YSCOMP'>0!(YSCOMP>YSY)  S A(YSTST)=$G(A(YSTST))+1