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

YTSSWEM.m

Go to the documentation of this file.
  1. YTSSWEM ;SLC/BLD- MHAX ANSWERS SPECIAL HANDLING FOR SWEMWBS
  1. ;;5.01;MENTAL HEALTH;**150,172**;DEC 30,1994;Build 10
  1. ;
  1. ;Public, Supported ICRs
  1. ; #2056 - Fileman API - $$GET1^DIQ
  1. ;
  1. Q
  1. ;
  1. DLLSTR(YSDATA,YS,YSTRNG) ;
  1. ; YSTRNG = 1 Score Instrument
  1. ; YSTRNG = 2 get Report Answers and Text
  1. N DATA,DES,LEG,NODE,YSQN,YSSCALIEN,TOTSCORE,QUES,BASIS,TOTSCR
  1. N YSCDA,YSSCNAM,YSINSNAM,STRING,STRING1,TOTSCORE,METARRAY
  1. ;
  1. ; Basis-24 Psychosis returns a scale score which is calculated and stored, no special text in report
  1. I YSTRNG=1 D METRIC(.METARRAY),SCORESV Q
  1. I YSTRNG=2 Q ;D
  1. ;
  1. Q
  1. ;
  1. STRING ;
  1. Q
  1. ;
  1. DATA1 ;
  1. ;
  1. N I,II
  1. S TOTSCORE=0,II=1
  1. F I=3:1:9 S TOTSCORE(II)=$$GET1^DIQ(601.75,$P(YSDATA(I),"^",3)_",",4,"I"),II=II+1
  1. F I=1:1 S TOTSCORE=$G(TOTSCORE)+$G(TOTSCORE(I)) Q:'$D(TOTSCORE(I))
  1. Q
  1. ;
  1. SCORESV ;
  1. N YSSCGROUP,II,J
  1. D DATA1
  1. I $D(^TMP($J,"YSG",1)),^TMP($J,"YSG",1)="[ERROR]" D Q ;-->out
  1. .K ^TMP($J,"YSCOR")
  1. .S ^TMP($J,"YSCOR",1)="[ERROR]"
  1. .S ^TMP($J,"YSCOR",2)=$G(YSINSNAM)_" Scale not found"
  1. ;
  1. K ^TMP($J,"YSCOR")
  1. ;
  1. S ^TMP($J,"YSCOR",1)="[DATA]"
  1. S II=1,J=1
  1. F I=3:1:9 D
  1. .S YSSCALIEN=$P($P(^TMP($J,"YSG",I),"^",1),"=",2)
  1. .S J=J+1,^TMP($J,"YSCOR",J)=$$GET1^DIQ(601.87,YSSCALIEN_",",3,"I")_"="_$FN(TOTSCORE(II),"",2),II=II+1
  1. S YSSCALIEN=$P($P(^TMP($J,"YSG",10),"^",1),"=",2)
  1. S J=J+1,^TMP($J,"YSCOR",J)=$$GET1^DIQ(601.87,YSSCALIEN_",",3,"I")_"="_$FN(METARRAY(TOTSCORE),"",2)
  1. Q
  1. ;
  1. METRIC(METARRAY) ;
  1. ;
  1. S METARRAY(7)="7.00"
  1. S METARRAY(8)=9.51
  1. S METARRAY(9)=11.25
  1. S METARRAY(10)=12.40
  1. S METARRAY(11)=13.33
  1. S METARRAY(12)=14.08
  1. S METARRAY(13)=14.75
  1. S METARRAY(14)=15.32
  1. S METARRAY(15)=15.84
  1. S METARRAY(16)=16.36
  1. S METARRAY(17)=16.88
  1. S METARRAY(18)=17.43
  1. S METARRAY(19)=17.98
  1. S METARRAY(20)=18.59
  1. S METARRAY(21)=19.25
  1. S METARRAY(22)=19.98
  1. S METARRAY(23)=20.73
  1. S METARRAY(24)=21.54
  1. S METARRAY(25)=22.35
  1. S METARRAY(26)=23.21
  1. S METARRAY(27)=24.11
  1. S METARRAY(28)=25.03
  1. S METARRAY(29)=26.02
  1. S METARRAY(30)=27.03
  1. S METARRAY(31)=28.13
  1. S METARRAY(32)=29.31
  1. S METARRAY(33)=30.70
  1. S METARRAY(34)=32.55
  1. S METARRAY(35)="35.00"
  1. Q
  1. ;