source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSASU1.m@ 1163

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1YSASU1 ;ASF/ALB- ASI MANAGEMENT UTILITITIES CONT ;2/4/98 10:02
2 ;;5.01;MENTAL HEALTH;**38**;Dec 30, 1994
3PTLST ;patient list
4 S YSASN=YSASN+1,^TMP("YSASU",$J,"M",YSASN)=" "
5 S YSASN=YSASN+1,^TMP("YSASU",$J,"M",YSASN)="Name"_$E(YSASS,1,17)_"SSN Interview Class Special Transmitted Queued"
6 S YSFL="" F S YSFL=$O(^TMP("YSASU",$J,"A",YSFL)) Q:YSFL="" D
7 . S YSASN=YSASN+1,^TMP("YSASU",$J,"M",YSASN)=$E(YSFL_YSASS,1,20)
8 . S YSIFN=0,J=0 F S YSIFN=$O(^TMP("YSASU",$J,"A",YSFL,YSIFN)) Q:YSIFN'>0 S J=J+1 D
9 .. S G=^TMP("YSASU",$J,YSIFN)
10 .. I J=1 S DFN=$P(G,U,2),VA("BID")=" " D:DFN DEM^VADPT S ^TMP("YSASU",$J,"M",YSASN)=^TMP("YSASU",$J,"M",YSASN)_" "_$E(VA("BID")_" ",1,6)
11 .. I J>1 S YSASN=YSASN+1,^TMP("YSASU",$J,"M",YSASN)=$E(YSASS,1,27)
12 .. S Y=+G,^TMP("YSASU",$J,"M",YSASN)=^TMP("YSASU",$J,"M",YSASN)_$E(Y,4,5)_"/"_$E(Y,6,7)_$S(Y>2999999:"/20",1:"/19")_$E(Y,2,3)
13 .. S ^TMP("YSASU",$J,"M",YSASN)=^TMP("YSASU",$J,"M",YSASN)_" "_$S($P(G,U,3)=1:"Full",$P(G,U,3)=2:"Lite",$P(G,U,3)=3:"F-up",1:" ")
14 .. S ^TMP("YSASU",$J,"M",YSASN)=^TMP("YSASU",$J,"M",YSASN)_" "_$S($P(G,U,4)="":" ",1:$P(G,U,4))
15 .. S ^TMP("YSASU",$J,"M",YSASN)=^TMP("YSASU",$J,"M",YSASN)_" "_$S($P(G,U,6)=1:" signed",1:"unsigned")
16 .. S Y=$P(G,U,9),^TMP("YSASU",$J,"M",YSASN)=^TMP("YSASU",$J,"M",YSASN)_" "_$S(Y>1:$E(Y,4,5)_"/"_$E(Y,6,7)_$S(Y>2999999:"/20",1:"/19")_$E(Y,2,3),1:" ")
17 .. S ^TMP("YSASU",$J,"M",YSASN)=^TMP("YSASU",$J,"M",YSASN)_" "_$S($P(G,U,8)=1:"queued",1:"")
18 Q
19MAIL2 ; SEND MAILMAN
20 S YSASMCNT=0,YSASMTC=(YSASN\1000)+1
21 S YSASCNT=0,YSASCNT2=0 F S YSASCNT=$O(^TMP("YSASU",$J,"M",YSASCNT)) Q:(YSASCNT'>0) D
22 .S YSASCNT2=YSASCNT2+1,^TMP("YSASM",$J,YSASCNT)=^TMP("YSASU",$J,"M",YSASCNT)
23 .I (YSASCNT2=1000)!(YSASCNT=YSASN) D
24 ..S YSASMCNT=YSASMCNT+1
25 ..S DTIME=600
26 .. S XMSUB="ASI Stats "_YSASITE_" ("_YSASMCNT_" OF "_YSASMTC_")"
27 ..S XMTEXT="^TMP(""YSASM"",$J,"
28 ..S XMY("G.ASI PERFORMANCE MEASURES")=""
29 ..S XMY(DUZ)=""
30 ..S XMDUZ="AUTOMATED MESSAGE"
31 ..D ^XMD
32 ..S YSASCNT2=0
33 ..K ^TMP("YSASM",$J)
34 Q
Note: See TracBrowser for help on using the repository browser.