YTSC19Y ;SLC/KCM - Score Modified C19-YRS ; 3/25/22 2:02pm
Source file <YTSC19Y.m>
action | A | extended action | Ea | event driver | Ed | subscriber | Su | protocol | O | limited protocol | LP | run routine | RR | broker | B | edit | E | server | Se | P | screenman | SM | inquire | I |
Package | Total | Caller Graph |
---|---|---|
Mental Health | 1 | ^YTT(601.71 |
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
|
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^TMP($J | SCORESV+34!, SCORESV+35, SCORESV+36*, SCORESV+37*, SCORESV+40*, SCORESV+41, SCORESV+42, SCORESV+43, SCORESV+45*, SCORESV+46* , SCORESV+47*, SCORESV+48*, SCORESV+49*, SCORESV+50*, SCORESV+51*, BLDSCR+3, BLDSCR+4, BLDSCR+5 |
^YTT(601.72 - [#601.72] | BLDCHKS+3, BLDQSTN+7 |
^YTT(601.75 - [#601.75] | BLDCHKS+6, BLDQSTN+9 |
^YTT(601.751 - [#601.751] | BLDCHKS+4, BLDCHKS+5 |
Name | Line Occurrences |
---|---|
$$ANSTXT | BLDQA+23, BLDQA+24 |
$$BLDQA | REPORT+7 |
$$BLDSCR | REPORT+6 |
$$CHKCNT | SCORESV+29 |
$$HIGHEST | SCORESV+4, SCORESV+5, SCORESV+6, SCORESV+7, SCORESV+10, SCORESV+11, SCORESV+12, SCORESV+13, SCORESV+14, SCORESV+15 , SCORESV+16, SCORESV+17, SCORESV+20, SCORESV+21 |
$$SCRTXT | BLDSCR+16, BLDSCR+17, BLDSCR+18, BLDSCR+19 |
$$SUM | SCORESV+26, SCORESV+27 |
$$WRAP | BLDQA+15, BLDQA+18 |
BLDCHKS | CHKCNT+2, BLDQA+13 |
BLDQSTN | SCORESV+3, REPORT+4 |
DLLSTR | TESTSCR+5 |
REPORT | DLLSTR+13 |
SCORESV | DLLSTR+9 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
ALLNOW | SCORESV+2~, SCORESV+30*, SCORESV+49, BLDSCR+2~, BLDSCR+11*, BLDSCR+19 |
ALLPRE | SCORESV+2~, SCORESV+31*, SCORESV+50, BLDSCR+2~, BLDSCR+12*, BLDSCR+19 |
BLANKS | REPORT+3~, REPORT+5*, BLDQA+15, BLDQA+18, BLDQA+22, BLDQA+23 |
CID | BLDCHKS+1~, BLDCHKS+5*, BLDCHKS+6, BLDQSTN+2~, BLDQSTN+4*, BLDQSTN+5, BLDQSTN+6, BLDQSTN+9 |
CLST | CHKCNT+1~, CHKCNT+2, BLDCHKS~, BLDCHKS+2!, BLDQA+12~, BLDQA+13 |
CLST( | CHKCNT+3, BLDCHKS+6*, BLDQA+14, BLDQA+15 |
CNT | CHKCNT+1~, CHKCNT+3*, CHKCNT+4 |
CTYP | BLDCHKS+1~, BLDCHKS+3*, BLDCHKS+4, BLDCHKS+5 |
DISNOW | SCORESV+2~, SCORESV+26*, SCORESV+47, BLDSCR+2~, BLDSCR+8*, BLDSCR+17 |
DISPRE | SCORESV+2~, SCORESV+27*, SCORESV+48, BLDSCR+2~, BLDSCR+9*, BLDSCR+17 |
HIGH | HIGHEST+1~, HIGHEST+2*, HIGHEST+5*, HIGHEST+6 |
I | SCORESV+24*, SCORESV+25*, SCORESV+39~, SCORESV+41*, SCORESV+42, SCORESV+43, HIGHEST+1~, HIGHEST+3*, SUM+1~, SUM+2* , CHKCNT+1~, CHKCNT+3*, BLDQSTN+2~, BLDQSTN+3*, BLDQSTN+4, BLDQSTN+8, BLDSCR+2~, BLDSCR+3*, BLDSCR+4, BLDSCR+5 , BLDQA+2~, BLDQA+6*, WRAP+1~, WRAP+3* |
IN | WRAP~, WRAP+3 |
J | SCORESV+39~, SCORESV+41*, SCORESV+44*, SCORESV+45, SCORESV+46, SCORESV+47, SCORESV+48, SCORESV+49, SCORESV+50, SCORESV+51 , BLDQA+12~, BLDQA+14*, BLDQA+15, WRAP+1~, WRAP+5* |
L | WRAP+1~, WRAP+2*, WRAP+4*, WRAP+6, WRAP+7*, WRAP+8* |
LIST | HIGHEST~, HIGHEST+3, SUM~, SUM+2 |
MAX | WRAP~, WRAP+6 |
N | DLLSTR+11~, DLLSTR+14*, DLLSTR+15, DLLSTR+16 |
NAME | BLDSCR+2~, BLDSCR+4*, BLDSCR+6, BLDSCR+7, BLDSCR+8, BLDSCR+9, BLDSCR+10, BLDSCR+11, BLDSCR+12 |
NOW | SCRTXT~, SCRTXT+1, BLDQA+20*, BLDQA+21, BLDQA+23 |
OTHSYM | SCORESV+2~, SCORESV+28*, SCORESV+29*, SCORESV+51, BLDSCR+2~, BLDSCR+10*, BLDSCR+18 |
OUT | WRAP+1~, WRAP+2* |
OUT( | WRAP+4*, WRAP+6*, WRAP+7*, WRAP+8 |
PAR | WRAP+1~, WRAP+3*, WRAP+4, WRAP+5 |
PRE | SCRTXT~, SCRTXT+1, BLDQA+20*, BLDQA+21, BLDQA+24, WRAP~, WRAP+4, WRAP+7 |
QANDA | DLLSTR+11~, DLLSTR+13, DLLSTR+16, REPORT~, REPORT+7* |
QID | HIGHEST+1~, HIGHEST+3*, HIGHEST+4, HIGHEST+5, SUM+1~, SUM+2*, SUM+3, CHKCNT~, CHKCNT+2, BLDCHKS~ , BLDCHKS+3, BLDQSTN+2~, BLDQSTN+4*, BLDQSTN+7, BLDQSTN+8, BLDQSTN+9, ANSTXT~, ANSTXT+2, ANSTXT+3, ANSTXT+4 , ANSTXT+5, ANSTXT+6, ANSTXT+7, ANSTXT+8, ANSTXT+9, ANSTXT+10 |
QSTN | SCORESV+2~, SCORESV+3, SCORESV+4, SCORESV+5, SCORESV+6, SCORESV+7, SCORESV+10, SCORESV+11, SCORESV+12, SCORESV+13 , SCORESV+14, SCORESV+15, SCORESV+16, SCORESV+17, SCORESV+20, SCORESV+21, SCORESV+26, SCORESV+27, HIGHEST~, SUM~ , BLDQSTN~, REPORT+3~, REPORT+4 |
QSTN( | HIGHEST+4, HIGHEST+5, SUM+3, BLDQSTN+8*, BLDQSTN+9*, BLDQA+9, BLDQA+11, BLDQA+14, BLDQA+17, BLDQA+18 , ANSTXT+3, ANSTXT+4, ANSTXT+5, ANSTXT+6, ANSTXT+7, ANSTXT+8, ANSTXT+9, ANSTXT+10 |
QSTN(8991 | SCORESV+8 |
QSTN(8992 | SCORESV+9 |
QSTN(9017 | SCORESV+18 |
QSTN(9018 | SCORESV+19 |
QSTN(9029 | SCORESV+22 |
QSTN(9030 | SCORESV+23 |
QSTN(9041 | SCORESV+28, SCORESV+29 |
QSTN(9043 | SCORESV+30 |
QSTN(9044 | SCORESV+31 |
SCLID | SCORESV+39~, SCORESV+42*, SCORESV+45, SCORESV+46, SCORESV+47, SCORESV+48, SCORESV+49, SCORESV+50, SCORESV+51 |
SCLNM | SCORESV+39~, SCORESV+43*, SCORESV+45, SCORESV+46, SCORESV+47, SCORESV+48, SCORESV+49, SCORESV+50, SCORESV+51 |
SCORES | DLLSTR+11~, DLLSTR+13, DLLSTR+15, REPORT~, REPORT+6* |
SEQ | BLDCHKS+1~, BLDCHKS+4*, BLDCHKS+5, BLDCHKS+6 |
SKIPS | HIGHEST+1~, HIGHEST+2*, HIGHEST+4* |
SUM | SUM+1~, SUM+2*, SUM+3*, SUM+4 |
SYMNOW | SCORESV+2~, SCORESV+24*, SCORESV+45, BLDSCR+2~, BLDSCR+6*, BLDSCR+16 |
SYMNOW( | SCORESV+24 |
SYMNOW(1 | SCORESV+4* |
SYMNOW(10 | SCORESV+22* |
SYMNOW(2 | SCORESV+6* |
SYMNOW(3 | SCORESV+8* |
SYMNOW(4 | SCORESV+10* |
SYMNOW(5 | SCORESV+12* |
SYMNOW(6 | SCORESV+14* |
SYMNOW(7 | SCORESV+16* |
SYMNOW(8 | SCORESV+18* |
SYMNOW(9 | SCORESV+20* |
SYMPRE | SCORESV+2~, SCORESV+25*, SCORESV+46, BLDSCR+2~, BLDSCR+7*, BLDSCR+16 |
SYMPRE( | SCORESV+25 |
SYMPRE(1 | SCORESV+5* |
SYMPRE(10 | SCORESV+23* |
SYMPRE(2 | SCORESV+7* |
SYMPRE(3 | SCORESV+9* |
SYMPRE(4 | SCORESV+11* |
SYMPRE(5 | SCORESV+13* |
SYMPRE(6 | SCORESV+15* |
SYMPRE(7 | SCORESV+17* |
SYMPRE(8 | SCORESV+19* |
SYMPRE(9 | SCORESV+21* |
TEXT | BLDQA+2~, BLDQA+6*, BLDQA+9*, BLDQA+11*, BLDQA+15*, BLDQA+17*, BLDQA+18*, BLDQA+21*, BLDQA+22*, BLDQA+23* , BLDQA+24*, BLDQA+25 |
TXT | WRAP+1~, WRAP+2*, WRAP+8*, WRAP+9 |
U | SCORESV+43, BLDCHKS+3, BLDQSTN+4, BLDQSTN+7, BLDQSTN+8, BLDQSTN+9, BLDQA+20, BLDQA+21, BLDQA+22 |
VAL | CHKCNT~, CHKCNT+3 |
VALUE | BLDSCR+2~, BLDSCR+5*, BLDSCR+6, BLDSCR+7, BLDSCR+8, BLDSCR+9, BLDSCR+10, BLDSCR+11, BLDSCR+12 |
WINDENT | BLDQA+2~, BLDQA+3*, BLDQA+15, BLDQA+18 |
WNOW | BLDQA+2~, BLDQA+4*, BLDQA+23 |
WORD | WRAP+1~, WRAP+5*, WRAP+6, WRAP+7 |
WPRE | BLDQA+2~, BLDQA+5* |
WTEXT | BLDQA+2~, BLDQA+3*, BLDQA+22 |
X | BLDCHKS+1~, BLDCHKS+6*, BLDSCR+2~, BLDSCR+13*, BLDSCR+14*, BLDSCR+15*, BLDSCR+16*, BLDSCR+17*, BLDSCR+18*, BLDSCR+19* , BLDSCR+20, BLDQA+2~, BLDQA+6*, BLDQA+8, BLDQA+9, BLDQA+10, BLDQA+11, BLDQA+13, BLDQA+14, BLDQA+16 , BLDQA+17, BLDQA+18, BLDQA+20, BLDQA+21, BLDQA+22 |
XC | BLDQA+2~ |
YS | DLLSTR~, DLLSTR+12, TESTSCR+1~, TESTSCR+3, TESTSCR+4, TESTSCR+5 |
YS("AD" | TESTSCR+2* |
YS("CODE" | TESTSCR+2* |
YSAD | TESTSCR~, TESTSCR+2 |
YSDATA | DLLSTR~, DLLSTR+12, TESTSCR+1~, TESTSCR+3, TESTSCR+4, TESTSCR+5 |
YSDATA( | DLLSTR+15*, DLLSTR+16*, BLDQSTN+3, BLDQSTN+4, BLDQSTN+8 |
YSDATA("" | DLLSTR+14 |
YSTRNG | DLLSTR~, DLLSTR+9, DLLSTR+10, BLDQSTN+6 |
Name | Field # of Occurrence |
---|---|
$T(RPTQA+I | BLDQA+6 |