source: FOIAVistA/trunk/r/HEALTH_SUMMARY-GMTS/GMTSSOWZ.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1GMTSSOWZ ;SLC/SBW - Social Work extract comp. in HS namespace ;21/OCT/94
2 ;;2.7;Health Summary;;Oct 20, 1995
3SOWKHSUM ; B'ham ISC/DMA - health summary ; 19 Jul 94 / 8:30 AM
4 ;;3.0; Social Work ;;27 Apr 93
5 ;;
6 ;Called with DFN - assumed to be valid
7 ;returns parts V. VII. and VIII. of the assessment
8 ;in ^TMP("SOWK",$J,line number)
9 ;
10 N LINE,SP15,MS,SP,J,C,Y,X,SO,SP10,SZ,D,DIWL,DIWF
11 K ^TMP("SOWK",$J) Q:'$D(^SOWK(655.2,DFN,0)) S LINE=6,$P(SP15," ",15)="",SP10=$E(SP15,1,10)
12 S MS=$P($G(^DIC(11,+$P(^DPT(DFN,0),"^",5),0)),"^")
13 S ^TMP("SOWK",$J,1)="Source of Referral: "_$P(^SOWK(655.2,DFN,0),"^",21)
14 S ^TMP("SOWK",$J,2)="Source of Information: "_$S($D(^SOWK(655.2,DFN,18)):$P(^(18),"^"),1:"UNSPECIFIED")
15 S ^TMP("SOWK",$J,3)="Social/Family Relationship:",^(4)=" 1. Marital status: "_MS,^(5)=" 2. Spouse:"
16 S SP=$G(^SOWK(655.2,DFN,6))
17 F J=1:1:4 I $P(SP,"^",J)]"" S ^TMP("SOWK",$J,LINE)=SP15_$P(SP,"^",J),LINE=LINE+1
18 I $P(SP,"^",5)]"" S SZ=$P(^DIC(5,+$P(SP,"^",5),0),"^")_" "_$P(SP,"^",6),^(LINE-1)=^TMP("SOWK",$J,LINE-1)_", "_SZ
19 S ^TMP("SOWK",$J,LINE)=" 3. Children:",LINE=LINE+1
20 F J=0:0 S J=$O(^SOWK(655.2,DFN,7,J)) Q:'J S X=^(J,0),D=$P(X,"^",2),^TMP("SOWK",$J,LINE)=$$LJ^XLFSTR(SP15_$P(X,"^"),50," ")_"Age: "_($E(DT,1,3)-$E(D,1,3)-($E(D,4,7)>$E(DT,4,7))),LINE=LINE+1
21 S ^TMP("SOWK",$J,LINE)=" 4. Describe Social Support System:",LINE=LINE+1
22 K ^UTILITY($J,"W") S DIWL=0,DIWF="C60" F J=0:0 S J=$O(^SOWK(655.2,DFN,13,J)) Q:'J S X=^(J,0) D ^DIWP
23 F J=0:0 S J=$O(^UTILITY($J,"W",0,J)) Q:'J S X=^(J,0),^TMP("SOWK",$J,LINE)=SP10_X,LINE=LINE+1
24 S ^TMP("SOWK",$J,LINE)=" 5. Present Use of Community Resources:",LINE=LINE+1
25 K ^UTILITY($J,"W") F J=0:0 S J=$O(^SOWK(655.2,DFN,14,J)) Q:'J S X=^(J,0) D ^DIWP
26 F J=0:0 S J=$O(^UTILITY($J,"W",0,J)) Q:'J S X=^(J,0),^TMP("SOWK",$J,LINE)=SP10_X,LINE=LINE+1
27 S Y=$P(^SOWK(655.2,DFN,0),"^",15),C=$P(^DD(655.2,15,0),"^",2) D Y^DIQ S:Y="" Y="UNSPECIFIED"
28 S ^TMP("SOWK",$J,LINE)=" 6. Current Living Arrangements: "_Y,LINE=LINE+1
29 S ^TMP("SOWK",$J,LINE)=" 7. Social/Family Assessment:",LINE=LINE+1
30 K ^UTILITY($J,"W") F J=0:0 S J=$O(^SOWK(655.2,DFN,16,J)) Q:'J S X=^(J,0) D ^DIWP
31 F J=0:0 S J=$O(^UTILITY($J,"W",0,J)) Q:'J S X=^(J,0),^TMP("SOWK",$J,LINE)=SP10_X,LINE=LINE+1
32 S ^TMP("SOWK",$J,LINE)="",LINE=LINE+1
33 S SO=$P(^SOWK(655.2,DFN,0),"^",25),SO=$S(SO=1:"YES",SO=2:"NO",1:"UNKNOWN"),^TMP("SOWK",$J,LINE)="Current Substance Problems: "_SO,LINE=LINE+1
34 S ^TMP("SOWK",$J,LINE)="",LINE=LINE+1
35 S ^TMP("SOWK",$J,LINE)=" Comments on Substance Abuse :",LINE=LINE+1
36 K ^UTILITY($J,"W") F J=0:0 S J=$O(^SOWK(655.2,DFN,8,J)) Q:'J S X=^(J,0) D ^DIWP
37 F J=0:0 S J=$O(^UTILITY($J,"W",0,J)) Q:'J S X=^(J,0),^TMP("SOWK",$J,LINE)=SP10_X,LINE=LINE+1
38 S ^TMP("SOWK",$J,LINE)="",LINE=LINE+1
39 S ^TMP("SOWK",$J,LINE)="Psycho-Social Assessment:",LINE=LINE+1
40 K ^UTILITY($J,"W") F J=0:0 S J=$O(^SOWK(655.2,DFN,19,J)) Q:'J S X=^(J,0) D ^DIWP
41 F J=0:0 S J=$O(^UTILITY($J,"W",0,J)) Q:'J S X=^(J,0),^TMP("SOWK",$J,LINE)=SP10_X,LINE=LINE+1
Note: See TracBrowser for help on using the repository browser.