YTQRQAD6 ;SLC/LLB - Determine High Risk Flagging ; 07/15/2020
Source file <YTQRQAD6.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 |
---|---|---|
FLAG(DFN,INST,HRR,PR) | ; ROUTINE to calculate Positive response and High Risk flagging
; ICR #4290 READ OF CLINICAL REMINDER INDEX (PXRMINDX) ; DFN: IEN to Patient file (#2) ; INST: Instrument name in MH TESTS AND SURVEYS file (#601.71) ; INSTIEN: IEN to instrument in MH TESTS AND SURVEYS file (#601.71) ; HRR: High Risk Requirement ; # score greater than # ; A# any question with a score ># ; I9 Positive I9 question ; Y1,2,3,n. Comma delimited list of question numbers. A yes to any is HR ; YA Yes to any question ; G3^0,5^1,q^n. Comma delimited list of question#^Value for question response Greater Than Value ; T#p Can be added to any HRR parameter where # is a positive integer and ; p is the time period M months, W weeks, D day. This will be treated as ; the most recent administration of the instrument but only if the ; Ex: "Y,1,2,3,T6M" indicates Yes to Q 1,2, or 3 within the last 6 ; months. ; Ex: "Y,1,2,3,T6M-I9" is the same as the previous example except that ; a positive I9, without regard to time frame, triggers High Risk. ; HRR parameters can be combined by adding "-" between them indicating an "or" ; such as "Y,3,4,5,8-I9" ; PR: Positive Response threshold, Score greater than number passed in PR. ; Based solely on total score. Ex: 8 indicating any score greater than 8. ; YSFLAG: Will be 0 for no risk ; 1 for Positive Response ; 2 for High Risk ; 3 for Both Positive response & High Risk ; The field SUICIDE RISK (#16) in the MH ADMINISTRATION file (#601.84) will be ; populated with the result. |
|
FLAG2 | ;
|
|
QUEST(ADMID,INST) | ; Create core code to look at questions and answers
; Requires Administration ID (ADMID) and Instrument name (INST) as an pre-existing value. |
|
SCORES | ;
|
|
TIME(TPAR) | ;
|
|
HRSCR | ;
|
|
YTAG | ; Yes to any of specific list of questions.
|
|
YATAG | ; If Yes to any question is High Risk
|
|
ATAG | ; any question with a score > that passed in with the A# parameter.
|
|
I9TAG | ;
|
|
GTTAG | ; specific question with a score > that passed in with the GT# parameter.
; If any of the comma delimited question#>value, then YSFLAG=2 for HIGH RISK |
|
SETFLAG | ; Set YSFLAG into the MH ADMISISTRATION file (#601.84)
|
|
BHS | ; BHS
; High Risk: Score of > 8 ; Positive Response: None |
|
BSS | ; BSS
; High Risk: Score > 0 to any question ; Positive Response: None |
|
PHQ2I9 | ; PHQ-2+I9
; High Risk: I9 > 0 ; Positive Response: Score >2 |
|
PSS3 | ; PSS-3
; High Risk: Yes to any of Q1,2,3 within the last 6 months ; Positive Response: None |
|
PSS32ND | ; PSS-3 2ND
; High Risk: Yes to any of the questions ; Positive Response: None |
|
CSSRS | ; C-SSRS
; High Risk: Yes to any of Q3,4,5,8 ; Positive Response: None |
|
I9CSSRS | ; I9+C-SSRS
; High Risk: Yes to any of Q3,4,5,8 or I9 > 0 ; Positive Response: None |
|
PHQ9 | ; PHQ9 Instrument
; High Risk: I9 > 0 ; Positive Response: Score > 9 |
|
PTSD5I9 | ; PC-PTSD-5+19
; High Risk: I9 > 0 ; Positive Response: None |
|
BDI2 | ; BDI2 Instrument
; High Risk: Question 9 > 0 |
|
CCSA | ; CCSA-DSM5 Instrument
; High Risk: Question 9 > 0 |
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Routine Call |
|
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^PXRMINDX(601.84 | FLAG+34, FLAG+37, FLAG2+2 |
^TMP("YSQA" | FLAG2+32!, QUEST+3!, QUEST+16*, YTAG+5, YTAG+7, YATAG+3, YATAG+4, I9TAG+3, I9TAG+4, GTTAG+13 |
^TMP($J | SCORES+7!, SCORES+9 |
^YTT(601.71 - [#601.71] | FLAG+34 |
^YTT(601.72 - [#601.72] | QUEST+9, QUEST+11 |
^YTT(601.75 - [#601.75] | QUEST+13, ATAG+7 |
^YTT(601.84 - [#601.84] | FLAG2+5, FLAG2+10 |
^YTT(601.85 - [#601.85] | QUEST+5, QUEST+6, QUEST+7, ATAG+4, ATAG+5 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
ADMID | FLAG+29~, FLAG2+2*, FLAG2+5, FLAG2+10, FLAG2+11, QUEST~, QUEST+5, QUEST+6, SCORES+3, ATAG+4 , SETFLAG+2, SETFLAG+4 |
AGE | FLAG2+1~ |
AID | ATAG+1~, ATAG+3*, ATAG+4*, ATAG+5, GTTAG+2~, GTTAG+8*, GTTAG+9, GTTAG+11*, GTTAG+12*, GTTAG+13 , GTTAG+15 |
ANSID | QUEST+2~, QUEST+6*, QUEST+7 |
CHOICE | QUEST+2~, QUEST+12*, QUEST+13*, QUEST+14*, QUEST+16, YTAG+1~, YTAG+7*, YTAG+8*, YTAG+9, YATAG+1~ , YATAG+4*, YATAG+5*, YATAG+6 |
CHOICEID | ATAG+1~, ATAG+6*, ATAG+7, GTTAG+2~ |
CNT | QUEST+2~, QUEST+4*, QUEST+8*, QUEST+16, YTAG+1~, YTAG+4*, YTAG+5*, YTAG+6, YTAG+7, YATAG+1~ , YATAG+2*, YATAG+3*, YATAG+4, I9TAG+1~, I9TAG+2*, I9TAG+3*, I9TAG+4 |
CURFLG | FLAG2+1~, FLAG2+5*, FLAG2+6 |
DATE | FLAG+29~, FLAG+35*, FLAG+37*, FLAG2+2, FLAG2+8, FLAG2+20, SCORES+5 |
DAYS | TIME+1~, TIME+5*, TIME+6*, TIME+7*, TIME+8 |
DFN | FLAG~, FLAG+31, FLAG+34, FLAG+37, FLAG2+2, SCORES+6, BHS+7, BSS+7, PHQ2I9+7, PSS3+7 , PSS32ND+7, CSSRS+7, I9CSSRS+7, PHQ9+7, PTSD5I9+7, BDI2+6, CCSA+6 |
HRR | FLAG~, FLAG2+15, FLAG2+18, BHS+3~, BHS+5*, BHS+7, BSS+3~, BSS+5*, BSS+7, PHQ2I9+3~ , PHQ2I9+5*, PHQ2I9+7, PSS3+3~, PSS3+5*, PSS3+7, PSS32ND+3~, PSS32ND+5*, PSS32ND+7, CSSRS+3~, CSSRS+5* , CSSRS+7, I9CSSRS+3~, I9CSSRS+5*, I9CSSRS+7, PHQ9+3~, PHQ9+5*, PHQ9+7, PTSD5I9+3~, PTSD5I9+5*, PTSD5I9+7 , BDI2+2~, BDI2+4*, BDI2+6, CCSA+2~, CCSA+4*, CCSA+6 |
I | QUEST+2~, QUEST+8*, QUEST+9*, QUEST+11, GTTAG+3~, GTTAG+6*, GTTAG+7 |
INC | TIME+1~, TIME+3*, TIME+5, TIME+6, TIME+7 |
INST | FLAG~, FLAG+32, FLAG+34, FLAG2+11, QUEST~, QUEST+16, SCORES+4, YTAG+5, YTAG+7, YATAG+3 , YATAG+4, I9TAG+3, I9TAG+4, GTTAG+13, BHS+3~, BHS+4*, BHS+7, BSS+3~, BSS+4*, BSS+7 , PHQ2I9+3~, PHQ2I9+4*, PHQ2I9+7, PSS3+3~, PSS3+4*, PSS3+7, PSS32ND+3~, PSS32ND+4*, PSS32ND+7, CSSRS+3~ , CSSRS+4*, CSSRS+7, I9CSSRS+3~, I9CSSRS+4*, I9CSSRS+7, PHQ9+3~, PHQ9+4*, PHQ9+7, PTSD5I9+3~, PTSD5I9+4* , PTSD5I9+7, BDI2+2~, BDI2+3*, BDI2+6, CCSA+2~, CCSA+3*, CCSA+6 |
INSTIEN | FLAG+29~, FLAG+34*, FLAG+37, FLAG2+2 |
LEG | QUEST+2~, QUEST+12*, QUEST+13*, QUEST+15*, QUEST+16, ATAG+1~, ATAG+7*, ATAG+8, GTTAG+2~, GTTAG+14* , GTTAG+15 |
MIN | ATAG+1~, ATAG+2*, ATAG+8, GTTAG+2~, GTTAG+10* |
MULT | FLAG+29~, FLAG2+15*, FLAG2+16 |
PERIOD | TIME+1~, TIME+4*, TIME+5, TIME+6, TIME+7 |
PR | FLAG~, FLAG2+14, GTTAG+3~, GTTAG+7*, GTTAG+8, GTTAG+9, BHS+3~, BHS+6*, BHS+7, BSS+3~ , BSS+6*, BSS+7, PHQ2I9+3~, PHQ2I9+6*, PHQ2I9+7, PSS3+3~, PSS3+6*, PSS3+7, PSS32ND+3~, PSS32ND+6* , PSS32ND+7, CSSRS+3~, CSSRS+6*, CSSRS+7, I9CSSRS+3~, I9CSSRS+6*, I9CSSRS+7, PHQ9+3~, PHQ9+6*, PHQ9+7 , PTSD5I9+3~, PTSD5I9+6*, PTSD5I9+7, BDI2+2~, BDI2+5*, BDI2+6, CCSA+2~, CCSA+5*, CCSA+6 |
QARR | GTTAG+3~ |
QARR( | GTTAG+9*, GTTAG+12, GTTAG+15 |
QID | ATAG+1~, ATAG+6*, GTTAG+2~ |
QNUM | QUEST+2~, QUEST+4*, QUEST+5*, QUEST+6 |
QST | QUEST+2~, QUEST+8*, QUEST+10*, QUEST+11*, QUEST+16 |
SI | FLAG+29~, FLAG+30*, FLAG2+21*, HRSCR+1, HRSCR+2 |
TEMP | QUEST+2~, QUEST+7*, QUEST+9, QUEST+11, QUEST+12, QUEST+13, TIME+2*, TIME+3, TIME+4, YTAG+1~ , YTAG+2*, YTAG+3*, YTAG+6, ATAG+1~, ATAG+5*, ATAG+6, I9TAG+1~, I9TAG+4*, I9TAG+5, I9TAG+6 , GTTAG+2~, GTTAG+5*, GTTAG+6, GTTAG+7, GTTAG+13*, GTTAG+14 |
TEST | I9TAG+1~, I9TAG+2*, I9TAG+5 |
TPAR | TIME~, TIME+2 |
U | FLAG2+5, FLAG2+10, QUEST+9, QUEST+11, QUEST+12, QUEST+13, QUEST+16, YTAG+7, YATAG+4, ATAG+6 , ATAG+7, I9TAG+5, I9TAG+6, GTTAG+8, GTTAG+9, GTTAG+14 |
X | FLAG2+1~, FLAG2+16*, FLAG2+18 |
XXX | SETFLAG+1~, SETFLAG+2*, SETFLAG+3 |
YS | FLAG+29~, SCORES+8 |
YS("AD" | SCORES+3* |
YS("ADATE" | SCORES+5* |
YS("CODE" | SCORES+4* |
YS("DFN" | SCORES+6* |
YSCORE | FLAG+29~, FLAG2+14, SCORES+9*, HRSCR+1, HRSCR+2 |
YSDATA | SCORES+2~, SCORES+8 |
YSFDA | SETFLAG+1~ |
YSFDA( | SETFLAG+3* |
YSFLAG | FLAG+29~, FLAG+33*, FLAG2+9*, FLAG2+13*, FLAG2+14*, FLAG2+16, FLAG2+21, FLAG2+22, FLAG2+24, FLAG2+26 , FLAG2+28, FLAG2+30, HRSCR+1*, HRSCR+2*, YTAG+5, YTAG+10*, YTAG+11*, YATAG+3, YATAG+7*, YATAG+8* , ATAG+4, ATAG+9*, ATAG+10*, I9TAG+3, I9TAG+7*, I9TAG+8*, GTTAG+4*, GTTAG+15*, SETFLAG+3 |
YSHRT | FLAG2+1~, FLAG2+18*, FLAG2+19, FLAG2+21, FLAG2+23, FLAG2+25, FLAG2+27, FLAG2+29, FLAG2+31, YTAG+2 , ATAG+2, GTTAG+5, GTTAG+10 |
YSLIM | FLAG+29~, FLAG2+17*, FLAG2+19*, FLAG2+20 |