Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables  | All
Print Page as PDF
Routine: YTSCOREX

Package: Mental Health

Routine: YTSCOREX


Information

YTSCOREX ;SLC/KCM - Score tests without admins ; 1/25/2017

Source Information

Source file <YTSCOREX.m>

Call Graph

Call Graph

Call Graph Total: 2

Package Total Call Graph
Mental Health 2 SCALEG^YTQAPI3  LEGCR^YTQAPI9  

Caller Graph

Legends:

Legend of Colors

Package Component Superscript legend

action A extended action Ea event driver Ed subscriber Su protocol O limited protocol LP run routine RR broker B edit E server Se print P screenman SM inquire I

Caller Graph

Caller Graph Total: 3

Package Total Caller Graph
Mental Health 3 YTQRCDB  YTQRCRD  YTSCORE  

Entry Points

Name Comments DBIA/ICR reference
CALC(TEST,ANSWERS,SCORES) ; Calculate and return .SCORES given ANSWERS
; TEST=name or IEN of instrument
; .ANSWERS(n,"id")=questionId
; .ANSWERS(n,"value")=choiceId or integerValue
; .SCORES(n,"name")=scaleName
; .SCORES(n,"id")=scaleId
; .SCORES(n,"raw")=rawScore
; .SCORES(n,"tscore")=tScore
; .SCORES("error")=error message if defined
SUMKEY(TEST,ANSWERS,SCORES) ; score by summing scoring keys
; expects ^TMP($J,"YSG",n) to contain scale id's
BYQSTN(ANSWERS,QALIST) ; return QALIST(questionId)=choiceText or value
BYKEY(SCALE,QALIST) ; returns score based on scoring keys for SCALE
; .QALIST(questionId)=choiceId (with "q" and "c" removed)
COMPLEX(TEST,ANSWERS,SCORES) ; score by calling routine
; expects: ^TMP($J,"YSG",n) to contain scale id's
; expects: YS and YSDATA from CALC
MKYSDATA(TEST,ANSWERS,YSDATA) ; Convert "tree" array of answers to YSDATA format
NSCALES(NMLIST) ; build scale NMLIST(name)=sequence^scaleId
; expects: ^TMP($J,"YSG",n) from CALC
SPLITWP(IN,OUT) ; split WP into 240 char segments and use | as newline
ADDSEGS(LINE,OUT) ; add 240 char segment to OUT array
; See ADDSEGS^YTQRQAD2 for similar code. This is a bit more general.
LEGACY(TESTNM,ADFN,AUSER,ANSWERS,SCORES) ; return .SCORES for legacy test
; .ANSWERS(n,"id")=questionId
; .ANSWERS(n,"value")=choiceId or integerValue
FULLANS(ANSWERS,QADISP) ; List out display values of questions/answers
; expects .ANSWERS(sequence,"id")="q1234"
; .ANSWERS(sequence,"value")="c567"
; returns .QADISP(sequence,"qText")=questionText
; .QADISP(sequence,"aText")=answerText
PARTANS(TEST,ANSWERS,QADISP) ; List out display values for designator/legacyValue
; expects .ANSWERS(sequence,"id")="q1234"
; .ANSWERS(sequence,"value")="c567"
; returns .QADISP(sequence,"qText")=designator
; .QADISP(sequence,"aText")=legacyValue
CPRSSTR(TEST,ANSWERS,SCORES) ; build string for CPRS DLL

External References

Name Field # of Occurrence
SCALEG^YTQAPI3 CALC+15
LEGCR^YTQAPI9 LEGACY+23

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^TMP($J CALC+11!, SUMKEY+4, SUMKEY+5, SUMKEY+6, SUMKEY+7, COMPLEX+8, COMPLEX+11, COMPLEX+12, NSCALES+3, NSCALES+4
^YTT(601.71 - [#601.71] CALC+12, CALC+14, CALC+16, COMPLEX+5, MKYSDATA+2, CPRSSTR+2, CPRSSTR+4
^YTT(601.72 - [#601.72] BYQSTN+6, MKYSDATA+9, LEGACY+8, FULLANS+10, FULLANS+14, PARTANS+11
^YTT(601.75 - [#601.75] BYKEY+8, LEGACY+11, FULLANS+15, PARTANS+16
^YTT(601.76 - [#601.76] MKYSDATA+7, MKYSDATA+8, FULLANS+11, FULLANS+12, PARTANS+9, PARTANS+10
^YTT(601.91 - [#601.91] BYKEY+4, BYKEY+5

Label References

Name Line Occurrences
$$BYKEY SUMKEY+8
@( COMPLEX+7
ADDSEGS SPLITWP+2, SPLITWP+3
BYQSTN SUMKEY+3
COMPLEX CALC+17
FULLANS CPRSSTR+4
MKYSDATA COMPLEX+4
NSCALES COMPLEX+10
PARTANS CPRSSTR+5
SPLITWP MKYSDATA+20
SUMKEY CALC+18

Naked Globals

Name Field # of Occurrence
^( FULLANS+10

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
ADFN LEGACY~, LEGACY+4
ALIST NSCALES+2~
ALIST( NSCALES+9*, NSCALES+10, NSCALES+12
ANSWERS CALC~, CALC+17, CALC+18, SUMKEY~, SUMKEY+3, BYQSTN~, COMPLEX~, COMPLEX+4, MKYSDATA~, LEGACY~
, FULLANS~, PARTANS~, CPRSSTR~, CPRSSTR+4, CPRSSTR+5
ANSWERS( BYQSTN+2, BYQSTN+3, BYQSTN+7, MKYSDATA+4, MKYSDATA+5, MKYSDATA+10, MKYSDATA+13, MKYSDATA+17, MKYSDATA+19, MKYSDATA+24
, LEGACY+5, LEGACY+6, LEGACY+9, LEGACY+10, LEGACY+12, FULLANS+6, FULLANS+7, FULLANS+15, FULLANS+16, PARTANS+6
, PARTANS+7, PARTANS+14
ATXT FULLANS+5~, FULLANS+9*, FULLANS+15*, FULLANS+16*, FULLANS+17, PARTANS+5~, PARTANS+12*, PARTANS+15*, PARTANS+16*, PARTANS+17
AUSER LEGACY~, LEGACY+4
CHOICE BYKEY+2~, BYKEY+6*, BYKEY+8, MKYSDATA+1~, MKYSDATA+13*, MKYSDATA+14*, MKYSDATA+15, LEGACY+3~, LEGACY+10*, LEGACY+11
CID PARTANS+14~*, PARTANS+15, PARTANS+16
CNT LEGACY+22~, CPRSSTR+1~, CPRSSTR+6*
CTNT MKYSDATA+1~, MKYSDATA+7*, MKYSDATA+8
CTXT FULLANS+5~, FULLANS+11*, FULLANS+12, PARTANS+5~, PARTANS+9*, PARTANS+10
DELIM FULLANS+5~, FULLANS+12*, FULLANS+13
DT LEGACY+4
END ADDSEGS+2~, ADDSEGS+4*
FIRST ADDSEGS+2~, ADDSEGS+5*, ADDSEGS+6
GSEQ NSCALES+2~, NSCALES+5*, NSCALES+7
I SUMKEY+2~, SUMKEY+4*, SUMKEY+5, SUMKEY+6, SUMKEY+7, BYQSTN+1~, BYQSTN+2*, BYQSTN+3, BYQSTN+7, COMPLEX+9~
, COMPLEX+11*, COMPLEX+12, MKYSDATA+1~, MKYSDATA+4*, MKYSDATA+5, MKYSDATA+10, MKYSDATA+13, MKYSDATA+17, MKYSDATA+19, MKYSDATA+24
, NSCALES+2~, NSCALES+3*, NSCALES+4, NSCALES+5, NSCALES+7, NSCALES+10*, NSCALES+12, SPLITWP+1~, SPLITWP+3*, ADDSEGS+2~
, ADDSEGS+4*, ADDSEGS+5, LEGACY+3~, LEGACY+5*, LEGACY+6, LEGACY+9, LEGACY+10, LEGACY+12, LEGACY+26*, LEGACY+27
, LEGACY+29, LEGACY+30, LEGACY+31, LEGACY+32, FULLANS+5~, FULLANS+6*, FULLANS+7, FULLANS+15, FULLANS+16, PARTANS+5~
, PARTANS+6*, PARTANS+7, PARTANS+14, CPRSSTR+1~, CPRSSTR+7*, CPRSSTR+8, CPRSSTR+9, CPRSSTR+10*, CPRSSTR+11
ID COMPLEX+9~, COMPLEX+14*, COMPLEX+15, NSCALES+2~, NSCALES+8*, NSCALES+9
IN SPLITWP~, SPLITWP+2
IN("\" SPLITWP+3
INC LEGACY+22~
ISCALE SUMKEY+2~, SUMKEY+6*, SUMKEY+8, SUMKEY+9
J SUMKEY+2~, SUMKEY+4*, SUMKEY+9*, MKYSDATA+18~, MKYSDATA+21*, MKYSDATA+22, ADDSEGS+2~, ADDSEGS+3*, ADDSEGS+7*, LEGACY+3~
, LEGACY+26*, LEGACY+28*, LEGACY+29, LEGACY+30, LEGACY+31, LEGACY+32, FULLANS+5~, FULLANS+10*
KEY BYKEY+2~, BYKEY+4*, BYKEY+5
LAST ADDSEGS+2~, ADDSEGS+4*, ADDSEGS+5*, ADDSEGS+6
LINE ADDSEGS~, ADDSEGS+4, ADDSEGS+6
N MKYSDATA+1~, MKYSDATA+3*, MKYSDATA+15*, MKYSDATA+22*, MKYSDATA+24*, NSCALES+2~, NSCALES+5*, NSCALES+7*, FULLANS+5~, FULLANS+6*
, FULLANS+17*, FULLANS+18, PARTANS+5~, PARTANS+6*, PARTANS+17*, PARTANS+18
NAME SUMKEY+2~, SUMKEY+7*, SUMKEY+9
NM NSCALES+2~, NSCALES+8*, NSCALES+9
NMLIST COMPLEX+9~, COMPLEX+10, NSCALES~
NMLIST( COMPLEX+14, NSCALES+12*
OUT SPLITWP~, SPLITWP+2, SPLITWP+3, ADDSEGS~
OUT( ADDSEGS+7*
OUT("" ADDSEGS+3
QADISP FULLANS~, PARTANS~, CPRSSTR+1~, CPRSSTR+4, CPRSSTR+5
QADISP( FULLANS+17*, PARTANS+17*, CPRSSTR+10, CPRSSTR+11
QADISP("qCnt" FULLANS+18*, PARTANS+18*, CPRSSTR+12
QALIST SUMKEY+2~, SUMKEY+3, SUMKEY+8, BYQSTN~, BYKEY~
QALIST( BYQSTN+10*, BYKEY+6
QSEQ MKYSDATA+1~, MKYSDATA+8*, MKYSDATA+15, MKYSDATA+22, MKYSDATA+24
QSTN BYQSTN+1~, BYQSTN+3*, BYQSTN+4*, BYQSTN+5, BYQSTN+6, BYQSTN+10, BYKEY+2~, BYKEY+6*, MKYSDATA+1~, MKYSDATA+5*
, MKYSDATA+6*, MKYSDATA+7, MKYSDATA+9, MKYSDATA+15, MKYSDATA+22, MKYSDATA+24, LEGACY+3~, LEGACY+6*, LEGACY+7*, LEGACY+8
, FULLANS+5~, FULLANS+7*, FULLANS+8*, FULLANS+10, FULLANS+11, FULLANS+14, PARTANS+5~, PARTANS+7*, PARTANS+8*, PARTANS+9
, PARTANS+11
QTXT FULLANS+5~, FULLANS+9*, FULLANS+10*, FULLANS+13*, FULLANS+17, PARTANS+5~, PARTANS+10*, PARTANS+17, CPRSSTR+1~, CPRSSTR+6*
, CPRSSTR+11*, CPRSSTR+12
RAW SUMKEY+2~, SUMKEY+8*, SUMKEY+9, COMPLEX+9~, COMPLEX+13*, COMPLEX+15
RTYP BYQSTN+1~, BYQSTN+6*, BYQSTN+8, BYQSTN+9, MKYSDATA+1~, MKYSDATA+9*, MKYSDATA+10*, MKYSDATA+12, LEGACY+3~, LEGACY+8*
, LEGACY+9, FULLANS+5~, FULLANS+14*, FULLANS+15, PARTANS+5~, PARTANS+11*, PARTANS+13
SCALE BYKEY~, BYKEY+4
SCORES CALC~, CALC+17, CALC+18, SUMKEY~, COMPLEX~, LEGACY~, CPRSSTR~
SCORES( SUMKEY+9*, COMPLEX+15*, COMPLEX+16*, LEGACY+29*, LEGACY+30*, LEGACY+31*, LEGACY+32*, CPRSSTR+7, CPRSSTR+8, CPRSSTR+9
SCORES("error" CALC+13*, COMPLEX+8*
SEQ COMPLEX+9~, COMPLEX+14*, COMPLEX+15, COMPLEX+16, NSCALES+2~, NSCALES+7*, NSCALES+9, NSCALES+10*, NSCALES+11*, NSCALES+12
SNAME COMPLEX+9~, COMPLEX+13*, COMPLEX+14, COMPLEX+15
SSEQ MKYSDATA+1~, MKYSDATA+21*, MKYSDATA+22*
STXT CPRSSTR+1~, CPRSSTR+6*, CPRSSTR+8*, CPRSSTR+9*, CPRSSTR+12
SUM BYKEY+2~, BYKEY+3*, BYKEY+9*, BYKEY+10
TARGET BYKEY+2~, BYKEY+7*, BYKEY+9
TEST CALC~, CALC+12*, CALC+13, CALC+14, CALC+16, CALC+17, CALC+18, SUMKEY~, COMPLEX~, COMPLEX+4
, COMPLEX+5, MKYSDATA~, MKYSDATA+2, FULLANS+11, PARTANS~, PARTANS+9, CPRSSTR~, CPRSSTR+2, CPRSSTR+4, CPRSSTR+5
TESTNM LEGACY~, LEGACY+4, CPRSSTR+1~, CPRSSTR+2*, CPRSSTR+12
TEXT BYKEY+2~, BYKEY+8*, BYKEY+9
TSCORE COMPLEX+9~, COMPLEX+13*, COMPLEX+16
U CALC+14, CALC+16, SUMKEY+6, SUMKEY+7, BYQSTN+6, BYKEY+6, BYKEY+7, COMPLEX+5, COMPLEX+13, COMPLEX+14
, MKYSDATA+2, MKYSDATA+8, MKYSDATA+9, MKYSDATA+15, MKYSDATA+22, MKYSDATA+24, NSCALES+5, NSCALES+7, NSCALES+8, NSCALES+9
, NSCALES+12, LEGACY+8, LEGACY+11, LEGACY+29, LEGACY+30, LEGACY+31, LEGACY+32, FULLANS+12, FULLANS+14, PARTANS+10
, PARTANS+11, PARTANS+16, CPRSSTR+2, CPRSSTR+4, CPRSSTR+12
VAL MKYSDATA+1~, MKYSDATA+10*
VALSTR LEGACY+3~, LEGACY+5*, LEGACY+13*, LEGACY+14, LEGACY+15, LEGACY+16
VALUE BYQSTN+1~, BYQSTN+7*, BYQSTN+8*, BYQSTN+9*, BYQSTN+10, BYKEY+2~, BYKEY+7*, BYKEY+9, LEGACY+3~, LEGACY+11*
, LEGACY+12*, LEGACY+13
WPIN MKYSDATA+18~, MKYSDATA+19*, MKYSDATA+20
WPOUT MKYSDATA+18~, MKYSDATA+20
WPOUT( MKYSDATA+21, MKYSDATA+22
X CALC+10~, CALC+16*, CALC+17, COMPLEX+9~, COMPLEX+12*, COMPLEX+13, NSCALES+2~, NSCALES+4*, NSCALES+5, NSCALES+6
, NSCALES+7, NSCALES+8, ADDSEGS+2~, ADDSEGS+6*, ADDSEGS+7, LEGACY+22~
X0 BYKEY+2~, BYKEY+5*, BYKEY+6, BYKEY+7
YS CALC+10~, CALC+15, LEGACY+3~, LEGACY+23
YS("ADATE" LEGACY+4*
YS("CODE" CALC+14*, LEGACY+4*
YS("DFN" LEGACY+4*
YS("R1" LEGACY+14*
YS("R2" LEGACY+15*
YS("R3" LEGACY+16*
YS("STAFF" LEGACY+4*
YSCODEN LEGACY+22~
YSDATA CALC+10~, CALC+15, COMPLEX+4, MKYSDATA~, LEGACY+3~, LEGACY+23
YSDATA( MKYSDATA+15*, MKYSDATA+22*, MKYSDATA+24*, LEGACY+26, LEGACY+27, LEGACY+29, LEGACY+30, LEGACY+31, LEGACY+32
YSDATA(1 MKYSDATA+2*
YSDATA(2 MKYSDATA+2*
YSET LEGACY+22~
YSRTN COMPLEX+3~, COMPLEX+5*, COMPLEX+6*, COMPLEX+7
ZTREQ LEGACY+22~
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables  | All