YTSC19Y ;SLC/KCM - Score Modified C19-YRS ; 3/25/22 2:02pm
Source file <YTSC19Y.m>
| Name | Comments | DBIA/ICR reference | 
|---|---|---|
| DLLSTR(YSDATA,YS,YSTRNG) | ; compute scores or report text based on YSTRNG
 ; input ; YSDATA(2)=adminId^patientDFN^instrumentName^dateGiven^isComplete ; YSDATA(2+n)=questionId^sequence^choiceId ; YS("AD")=adminId ; YSTRNG=1 for score, 2 for report ; output if YSTRNG=1: ^TMP($J,"YSCOR",n)=scaleId=score ; output if YSTRNG=2: append special "answers" to YSDATA  | 
|
| SCORESV | ; calculate the score
 ; expects YSDATA from DLLSTR (YSDATA from LOADANSW^YTSCORE,SCALEG^YTQAPI3)  | 
|
| HIGHEST(QSTN,LIST) | ; return highest value in LIST
 | 
|
| SUM(QSTN,LIST) | ; return sum for questions in LIST
 | 
|
| CHKCNT(QID,VAL) | ; return the number of items checked for question
 | 
|
| BLDCHKS(CLST,QID) | ; build list of checklist items for QID into .CLST
 | 
|
| BLDQSTN(QSTN) | ; build list of questions and response values in .QSTN
 ; expects YSDATA,YSTRNG from DLLSTR  | 
|
| REPORT(SCORES,QANDA) | ; build the scoring display for the report
 ; expects ^TMP($J,"YSCOR",...) and ^TMP($J,"YSG") from DLLSTR ; YSDATA from DLLSTR  | 
|
| BLDSCR() | ; build the scoring block
 ; expects ^TMP($J,"YSCOR") from DLLSTR  | 
|
| SCRTXT(NOW,PRE) | ; return score string
 | 
|
| BLDQA() | ; Build questions & answers
 ; expects QSTN, BLANKS from REPORT  | 
|
| ANSTXT(QID) | ; return text for answer to question
 ; expects QSTN from REPORT > BLDQA  | 
|
| WRAP(IN,MAX,PRE) | ; Return with | and spacing in correct place
 | 
|
| RPTQA | ; Questions & Answers for Report
 | 
|
| TESTSCR(YSAD) | ; Test scoring routine
 |