YTSMIOSB ;SLC/KCM - Score MIOS+B-IPF ; 10/14/18 2:02pm
Source file <YTSMIOSB.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  | 
|
| SUM(QSTN,LIST) | ; return sum for questions in LIST
 | 
|
| BIPF(QSTN,LIST) | ; return the B-IPF score from questions in LIST
 ; expects YSDATA  | 
|
| REPORT(SCORES,CHKTXT) | ; build the scoring display for the report
 ; expects ^TMP($J,"YSCOR",...) and ^TMP($J,"YSG") from DLLSTR ; YSDATA from DLLSTR ; YSDATA(2+n)=questionId^sequence^choiceId or text response  |