YTSCAT ;SLC/KCM - CAT Scoring and Reporting ; 6/30/2021
Source file <YTSCAT.m>
| Name | Comments | DBIA/ICR reference | 
|---|---|---|
| DLLSTR(YSDATA,YS,YSMODE) | ; main tag for both scores and report text
 | 
|
| SCORE(YSDATA) | ; iterate through answers and calculate score
 ; looks like this is in every scoring routine... ; SCOREINS^YTSCORE sets up ^TMP($J,"YSG") with scales ; if no scales are defined, we can't score instrument  | 
|
| REPORT(YSDATA,YS) | ; add textual scores to report
 ; at this point YTQRRPT has already called GETSCORE^YTQAPI8 so ; ^TMP($J,"YSCOR") is defined and we're in the middle of ALLANS^YTQAPI2 ; YSDATA(2+n)=questionId^sequence^choiceId or text response  | 
|
| QA4TEST(ITEST) | ; add Questions & Answers for 1 Test
 ; expects: TREE,SCORTXT,LN from REPORT  | 
|
| QA4QID(QID) | ; return question & response text from answers
 | 
|
| TM4TEST(SEQ) | ; return a block of text with the completion time
 | 
|
| QA4ALL | ; add Questions & Answers for all tests together
 ; expects: TREE,SCORTXT,LN from REPORT  | 
|
| TM4ALL | ; add elapsed time for all questions
 | 
|
| ADDSCORE(SEQ,WHICH) | ; return a block of text with the appropriate scores
 ; expects TREE,SCORTXT from REPORT  | 
|
| ADDPTSD | ; add interpretive text for CAD-PTSD-DX
 ; expects SCORTXT  | 
|
| ADDLN(TXT) | ; add a line of text
 ; expects SCORTXT from REPORT>ADDSCORE  | 
|
| FULLNAME(TTYP) | ; return full name for a CAT Test Type
 | 
|
| INSNAME(TTYP) | ; return full name for a CAT Test Type
 | 
|
| PAD(LEN,STR) | ; return spaces until X is LEN
 | 
|
| TMSTR(ATIME) | ; return a readable elapsed time
 | 
|
| WP2JSON(YSDATA,TREE) | ; put YSDATA answer into M-subscript format
 | 
|
| WRAP(IN,MAX,PRE) | ; Return with | and spacing in correct place
 | 
|
| TXTPTSD | ; Interpretive text for CAD-PTSD-DX
 |