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

YSASCSC.m

Go to the documentation of this file.
  1. YSASCSC ;692/DCL-ASI MISSING COMPOSITE SCORES ;1/23/97 11:41
  1. ;;5.01;MENTAL HEALTH;**24**;Dec 30, 1994
  1. Q
  1. ;
  1. IF(YSASIEN,YSASFLD,YSASFLG) ;pass ien and field - return content
  1. Q:$G(YSASIEN)'>0 ""
  1. Q:$G(YSASFLD)'>0 ""
  1. N DIERR
  1. Q $$GET1^DIQ(604,YSASIEN_",",YSASFLD,$G(YSASFLG))
  1. ;
  1. C(X,Y,Z) ;return score/msg - pass data in X, Item # in Y and optional comment in Z.
  1. I $G(X)="" Q " Item "_Y_$J("",(4-$L(Y)))_" <missing data> "_$G(Z)
  1. Q " Item "_Y_$J("",(4-$L(Y)))_$J(X,6)_" ..ok "_$G(Z)
  1. ;
  1. EM(X) ;Error Message
  1. Q:$G(X)="" ""
  1. Q "No Composite Score"
  1. ;
  1. SM(X) ;Score Message
  1. Q:$G(X)="" ""
  1. Q "Composite Score: "
  1. ;
  1. EN ;Entry point continuation from YSASCSB
  1. D CSLS,CSFSR,CSPS
  1. Q
  1. CSLS ;Composite Score for Legal Status
  1. I $E(IOST)="P" W:$D(IOF) @IOF
  1. Q:$$FF
  1. D HDR
  1. W !!!,"Items for Legal Composite Scores"
  1. W !,"--------------------------------",!
  1. N YSASA,YSASB,YSASC,YSASD,YSASE
  1. S YSASA=$$IF(YSASDA,14.27,"I")
  1. W !,$$C(YSASA,"L24")
  1. S YSASB=$$IF(YSASDA,14.31)
  1. W !,$$C(YSASB,"L27")
  1. S YSASC=$$IF(YSASDA,14.32)
  1. W !,$$C(YSASC,"L28")
  1. S YSASD=$$IF(YSASDA,14.33)
  1. W !,$$C(YSASD,"L29")
  1. S YSASE=$$IF(YSASDA,9.25)
  1. W !,$$C(YSASE,"E17","<Item 17 from Employment Domain>")
  1. I YSASA=""!(YSASB="")!(YSASC="")!(YSASD="")!(YSASE="") W !!,$$EM("Legal") Q
  1. S:YSASE>0 YSASE=$$LN^XLFMTH(YSASE)
  1. S YSASA=YSASA/5,YSASB=YSASB/150,YSASC=YSASC/20,YSASD=YSASD/20
  1. S YSASE=YSASE/46
  1. W !!,$$SM("Legal"),$J(YSASA+YSASB+YSASC+YSASD+YSASE,6,4)
  1. Q
  1. ;
  1. CSFSR ;Composite Score for Family/Social Relationships
  1. Q:$$FF
  1. D:$E(IOST)="C" HDR
  1. W !!!,"Items for Family/Social Composite Scores"
  1. W !,"----------------------------------------",!
  1. N YSASA,YSASB,YSASC,YSASD,YSASR
  1. S YSASA=$$IF(YSASDA,17.04)
  1. S:YSASA]"" YSASA=$S(YSASA="YES":0,YSASA="NO":2,1:1)
  1. W !,$$C(YSASA,"F3")
  1. S YSASB=$$IF(YSASDA,18.23)
  1. W !,$$C(YSASB,"F30")
  1. S YSASC=$$IF(YSASDA,18.25)
  1. W !,$$C(YSASC,"F32")
  1. S YSASD=$$IF(YSASDA,18.27)
  1. W !,$$C(YSASD,"F34")
  1. D
  1. .N YSASI,YSASX
  1. .S YSASR=0
  1. .S YSASF=".01,.03,.05,.07,.09,.12,.15,.17,.185"
  1. .S YSASI="10,11,12,13,14,15,16,17,18"
  1. .F YSASC=1:1:9 D
  1. ..S YSASX=$$IF(YSASDA,18_$P(YSASF,",",YSASC),"I")
  1. ..W !,$$C(YSASX,"F"_(YSASC+17))
  1. ..S:YSASX="" YSASR=""
  1. ..Q:YSASR=""
  1. ..S YSASR=YSASR+YSASX
  1. ..Q
  1. .Q:YSASR=""
  1. .S YSASR=YSASR/9
  1. .Q
  1. I YSASA=""!(YSASB="")!(YSASC="")!(YSASD="")!(YSASR="") W !!,$$EM("Family/Social") Q
  1. S YSASA=YSASA/10,YSASB=YSASB/150,YSASC=YSASC/20,YSASD=YSASD/20
  1. S YSASR=YSASR/5
  1. W !!,$$SM("Family/Social"),$J(YSASA+YSASB+YSASC+YSASD+YSASR,6,4)
  1. Q
  1. ;
  1. CSPS ;Composite Score for Psychiatric Status
  1. Q:$$FF
  1. D:$E(IOST)="C" HDR
  1. W !!!,"Items for Psychiatric Composite Scores"
  1. W !,"--------------------------------------",!
  1. N YSASA,YSASB,YSASC,YSASD,YSASE,YSASF,YSASG,YSASH,YSASI,YSASJ,YSASK
  1. S YSASA=$$IF(YSASDA,19.04,"I")
  1. W !,$$C(YSASA,"P3")
  1. S YSASB=$$IF(YSASDA,19.06,"I")
  1. W !,$$C(YSASB,"P4")
  1. S YSASC=$$IF(YSASDA,19.08,"I")
  1. W !,$$C(YSASC,"P5")
  1. S YSASD=$$IF(YSASDA,19.11,"I")
  1. W !,$$C(YSASD,"P6")
  1. S YSASE=$$IF(YSASDA,19.14,"I")
  1. W !,$$C(YSASE,"P7")
  1. S YSASF=$$IF(YSASDA,19.16,"I")
  1. W !,$$C(YSASF,"P8")
  1. S YSASG=$$IF(YSASDA,19.18,"I")
  1. W !,$$C(YSASG,"P9")
  1. S YSASH=$$IF(YSASDA,19.21,"I")
  1. W !,$$C(YSASH,"P10")
  1. S YSASI=$$IF(YSASDA,19.23)
  1. W !,$$C(YSASI,"P11")
  1. S YSASJ=$$IF(YSASDA,19.24)
  1. W !,$$C(YSASJ,"P12")
  1. S YSASK=$$IF(YSASDA,19.25)
  1. W !,$$C(YSASK,"P13")
  1. I YSASA=""!(YSASB="")!(YSASC="")!(YSASD="")!(YSASE="")!(YSASF="")!(YSASG="")!(YSASH="")!(YSASI="")!(YSASJ="")!(YSASK="") W !!,$$EM("Paychiatric") Q
  1. S YSASA=YSASA/11,YSASB=YSASB/11,YSASC=YSASC/11,YSASD=YSASD/11
  1. S YSASE=YSASE/11,YSASF=YSASF/11,YSASG=YSASG/11,YSASH=YSASH/11
  1. S YSASI=YSASI/330,YSASJ=YSASJ/44,YSASK=YSASK/44
  1. W !!,$$SM("Psychiatric"),$J(YSASA+YSASB+YSASC+YSASD+YSASE+YSASF+YSASG+YSASH+YSASI+YSASJ+YSASK,6,4)
  1. Q
  1. ;
  1. FF() ;Form Feed
  1. I $E(IOST)'="C" Q 0
  1. I $G(YSASQUIT) Q 1
  1. N X
  1. W !!,"<press <cr> to continue>"
  1. R X:DTIME
  1. W:$D(IOF) @IOF
  1. I $E(X)="^" S YSASQUIT=1 Q 1
  1. Q 0
  1. ;
  1. HDR ;Header
  1. W !,$$IF(YSASDA,.02)," ASI date of interview: ",$$IF(YSASDA,.05)
  1. Q