source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSASO1.m@ 1352

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1YSASO1 ;692/DCL-ASI OUTPUT SEVERITY- COMPOSITE SCORES ;5/22/97 10:59
2 ;;5.01;MENTAL HEALTH;**24,30**;Dec 30, 1994
3 Q
4OUT1(YSASIEN) ;Entry Point pass IEN from file 604
5 Q:$G(YSASIEN)'>0
6 N YSASNA,YSASY,YSASSR,YSASCS,YSASN,YSASAGE,X,Y,C1,C2,C3
7 S YSASIEN=YSASIEN_",",C1=4,C2=20,C3=35
8 S YSASSR="^8.12^9.34^11.18^11.185^14.34^18.29^19.33"
9 S YSASN=$$F("NAME"),YSASAGE=$$F("NAME:AGE"),YSASNA=YSASN_" ("_YSASAGE_")"
10 W:$D(IOF) @IOF
11 W !,YSASNA,!,$TR($J("",$L(YSASNA))," ","-"),!
12 W !," Admission Date: ",$$F(1)
13 W !," Interview Date: ",$$F(.05)
14 W !," Time Begun: ",$$F(.051)
15 W !," Time Ended: ",$$F(.052)
16 W !," Interviewer: ",$$F(.09)
17 W !
18 W !?C2,"Severity",?C3,"Composite"
19 W !?C2,"Ratings",?C3,"Scores"
20 W !?C2,"--------",?C3,"---------"
21 W !?C1," MEDICAL",?C2,$J($$F(8.12),4),?C3,$J($$F(.61),8,4)
22 W !?C1," EMPLOYMENT",?C2,$J($$F(9.34),4),?C3,$J($$F(.62),8,4)
23 W !?C1," ALCOHOL",?C2,$J($$F(11.18),4),?C3,$J($$F(.63),8,4)
24 W !?C1," DRUG",?C2,$J($$F(11.185),4),?C3,$J($$F(.635),8,4)
25 W !?C1," LEGAL",?C2,$J($$F(14.34),4),?C3,$J($$F(.64),8,4)
26 W !?C1," FAMILY",?C2,$J($$F(18.29),4),?C3,$J($$F(.65),8,4)
27 W !?C1,"PSYCHIATRIC",?C2,$J($$F(19.33),4),?C3,$J($$F(.66),8,4)
28 W !! K DIR S DIR(0)="E" D ^DIR ;,"<press any key to continue>" R X#1:DTIME
29 Q
30 ;
31F(YSASFLD) ;Pass field name - IEN is expected to be in YSASIEN
32 N DIERR
33 Q:$G(YSASFLD)=""
34 Q $$GET1^DIQ(604,YSASIEN,YSASFLD)
35 ;
36ENI ;Entry point for INTAKE
37 N YSASDA
38 D DICI^YSASO(.YSASDA)
39 D:$G(YSASDA)>0 OUT1(YSASDA)
40 Q
41 ;
42ENF ;Entry Point for FOLLOW-UP
43 N YSASDA
44 D DICF^YSASO(.YSASDA)
45 D:$G(YSASDA)>0 OUT1(YSASDA)
46 Q
47 ;
48OUT2(YSASIEN,YSASOK) ;Entry Point pass IEN from file 604
49 ;also pass an OK flag by reference - set to 1 all severity ratings and composite scores are > 0. (optional)
50 Q:$G(YSASIEN)'>0
51 N YSASY,YSASSR,YSASCS,YSASN,YSASAGE,X,Y,C1,C2,C3,YSASS,YSASC,YSASMSG
52 S YSASIEN=YSASIEN_",",C1=24,C2=40,C3=55,YSASOK=1,YSASMSG=""
53 ;YSASOK = severity ratings and composite scores are not null.
54 S YSASSR="^8.12^9.34^11.18^11.185^14.34^18.29^19.33"
55 S YSASN=$$F("NAME"),YSASAGE=$$F("NAME:AGE"),YSASNA=YSASN_" ("_YSASAGE_")"
56 W:$D(IOF) @IOF
57 W !,YSASNA,?C2,"Severity",?C3,"Composite"
58 W !,$TR($J("",$L(YSASNA))," ","-"),?C2,"Ratings",?C3,"Scores"
59 W !," Adm: ",$$F(1),?C2,"--------",?C3,"---------"
60 S YSASS=$$F(8.12),YSASC=$$F(.61)
61 W !," Int: ",$$F(.05),?C1," MEDICAL",?C2,$J(YSASS,4),?C3,$S(YSASC="":" ----",1:YSASC)
62 S YSASS=$$F(9.34),YSASC=$$F(.62)
63 S X=$$F(.09)
64 W !," By: ",$S(X]"":$P(X,","),1:"<INCOMPLETE>"),?C1," EMPLOYMENT",?C2,$J(YSASS,4),?C3,$S(YSASC="":" ----",1:YSASC)
65 S YSASS=$$F(11.18),YSASC=$$F(.63)
66 W !?C1," ALCOHOL",?C2,$J(YSASS,4),?C3,$S(YSASC="":" ----",1:YSASC)
67 S YSASS=$$F(11.185),YSASC=$$F(.635)
68 W !?C1," DRUG",?C2,$J(YSASS,4),?C3,$S(YSASC="":" ----",1:YSASC)
69 S YSASS=$$F(14.34),YSASC=$$F(.64)
70 W !?C1," LEGAL",?C2,$J(YSASS,4),?C3,$S(YSASC="":" ----",1:YSASC)
71 S YSASS=$$F(18.29),YSASC=$$F(.65)
72 W !?C1," FAMILY",?C2,$J(YSASS,4),?C3,$S(YSASC="":" ----",1:YSASC)
73 S YSASS=$$F(19.33),YSASC=$$F(.66)
74 W !?C1,"PSYCHIATRIC",?C2,$J(YSASS,4),?C3,$S(YSASC="":" ----",1:YSASC)
75 Q
76 ;
77CS(X) ;Composite Scores
78 I X=.61 Q $$CSMS^YSASCSA(+YSASIEN) ;MEDICAL
79 I X=.62 Q $$CSES^YSASCSA(+YSASIEN) ;EMPLOYMENT
80 I X=.63 Q $$CSA^YSASCSA(+YSASIEN) ;ALCOHOL
81 I X=.635 Q $$CSD^YSASCSA(+YSASIEN) ;DRUG
82 I X=.64 Q $$CSLS^YSASCSA(+YSASIEN) ;LEGAL
83 I X=.65 Q $$CSFSR^YSASCSA(+YSASIEN) ;FAMILY/SOCIAL
84 I X=.66 Q $$CSPS^YSASCSA(+YSASIEN) ;PSYCHIATRIC
85 Q ""
Note: See TracBrowser for help on using the repository browser.