YTSPHI ;SLC/KCM - Score PHI and format report ; 01/08/2016
Source file <YTSPHI.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
DATA1 | ; Loop YSDATA and map questions to choice values
; expects YTRESP from DLLSTR |
|
MAPCHC(YTCHC) | ; Map score to choice
; expects YSTRNG from DLLSTR |
|
SCORESV | ; Save the scores (only used for graphing for PHI)
; expects YTRESP from DLLSTR |
|
REPORT(REFLECT,CARE) | ; Set the special text for the report
; expects YTRESP from DLLSTR |
|
SPACED(QSTN) | ; Return answer text with aligned spacing
|
|
WRAPPED(TX,MAX) | ; Wrap the response using "|" delimiters
|
|
ADDOUT(S) | ; add string to out array (expects OUT)
|
|
DLLSTR(YSDATA,YS,YSTRNG) | ;
; input ; YSDATA(2)=adminId^patientDFN^instrumentName^dateGiven^complete? ; 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 |