YTQRCDB ;BAL/KTL - MHA CLOUD DATABASE ADMIN RPC CALLS; 1/25/2017
Source file <YTQRCDB.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
SAVEADM(ARGS,DATA) | ; Save instrument administration and answers
|
|
SCORADM(ARGS,DATA) | ;Score administration
|
|
SAVESCR(ADMM,DATA) | ||
FILADMIN(DATA) | ||
RVW(ARGS,DATA) | ; update admin REVIEWED status
; Requires input ; DATA("adminId") |
|
SETADM(DATA) | ; return the id for new/updated admin
; Requires input ; DATA("patientId") ; DATA("orderedById") ; DATA("administeredById") ; DATA("completedDate") ; DATA("dateSaved") ; DATA("dateGiven") ; DATA("instrumentId") ; Optional ; DATA("adminId") - if updating existing admin ; DATA("cosignerId") |
|
FILANS(ADMIN,DATA) | ; File Answers for an ADMIN
; Requires: ADMIN = IEN of MH ADMINISTRATION ; DATA("answers",i,"id"/"value") |
|
QASAVE(ADMIN,DATA) | ; save questions and answers in DATA
; loop through DATA to create ANS array, then YSDATA array ; ANS(#)=questionId^choiceId <-- radio group question ; ANS(#,#)=wp value <-- all others ; Return: 1 = Success ; 0 = Failure |
|
TXT2ANS(IDX,QNUM) | ; Convert web to ANS format for DATA(IDX)
; expects DATA,ANS |
|
ADDSEGS(NODE) | ; split text in node into LEN segments with "|" for newlines
; expects DATA,ANS,LEN,LN |
|
SCOREIT(DATA,SCORES) | ; Score instrument based on incoming answers.
; Expects DATA("test")=TEST NAME ; Expects answers in the DATA("answers",i,"id"/"value") array |
|
LGSCORE(DATA,SCORES) | ;
; |
Name | Field # of Occurrence |
---|---|
FILE^DIE | RVW+12 |
$$GET1^DIQ | SCOREIT+10 |
$$NOW^XLFDT | FILADMIN+16, FILADMIN+17, FILADMIN+18 |
ADMSAVE^YTQAPI1 | SETADM+30 |
SAVEALL^YTQAPI17 | QASAVE+26 |
SCALEG^YTQAPI3 | SAVESCR+17 |
$$REQCSGN^YTQRQAD3 | RVW+10 |
SETERROR^YTQRUTL | SAVEADM+5, SCORADM+7, FILADMIN+5, FILADMIN+8, FILADMIN+9, FILADMIN+10, FILADMIN+11, FILADMIN+12, SETADM+31, FILANS+4 , FILANS+5, FILANS+6, QASAVE+27, SCOREIT+5, SCOREIT+8, SCOREIT+9, LGSCORE+3 |
UPDSCORE^YTSCORE | SAVESCR+25 |
CALC^YTSCOREX | SCOREIT+13 |
LEGACY^YTSCOREX | LGSCORE+8 |
FileNo | Call Tags |
---|---|
^YTT(601.71 - [#601.71] | GET1^DIQ |
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^TMP("YTQ-JSON" | SCORADM+4!, SCORADM+8*, SCORADM+9*, SCORADM+15*, SCORADM+16*, SCORADM+17*, SCORADM+18 |
^TMP($J | SAVESCR+16!, SAVESCR+18!, SAVESCR+19*, SAVESCR+20, SAVESCR+21, SAVESCR+23* |
^YTT(601.71 - [#601.71] | FILADMIN+6, FILADMIN+7, SCOREIT+6, SCOREIT+7 |
^YTT(601.72 - [#601.72] | QASAVE+19 |
^YTT(601.84 - [#601.84] | RVW+8, RVW+9, FILANS+5 |
Name | Line Occurrences |
---|---|
$$FILADMIN | SAVEADM+2 |
$$FILANS | SAVEADM+4 |
$$QASAVE | FILANS+7 |
$$SETADM | FILADMIN+26 |
ADDSEGS | TXT2ANS+5, TXT2ANS+9 |
LGSCORE | SCOREIT+11 |
SAVESCR | SAVEADM+6 |
SCOREIT | SCORADM+5 |
TXT2ANS | QASAVE+21 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
ACNT | FILADMIN+4~, FILADMIN+20*, FILADMIN+24*, FILADMIN+25 |
ADFN | LGSCORE+2~, LGSCORE+5*, LGSCORE+8 |
ADMIN | FILADMIN+4~, FILADMIN+26*, FILADMIN+27, RVW+4~, RVW+6*, RVW+8, RVW+9, RVW+10, RVW+11, SETADM+12~ , SETADM+13*, SETADM+15, SETADM+32, SETADM+33, FILANS~, FILANS+4, FILANS+5, FILANS+7, QASAVE~, QASAVE+25 |
ADMM | SAVEADM+1~, SAVEADM+2*, SAVEADM+3, SAVEADM+4, SAVEADM+5*, SAVEADM+6, SAVEADM+7, SAVESCR~, SAVESCR+24 |
ANS | QASAVE+6~, QASAVE+26 |
ANS( | QASAVE+14*, QASAVE+20*, QASAVE+21*, ADDSEGS+6* |
ANS("AD" | QASAVE+25* |
ANSRES | SAVEADM+1~, SAVEADM+4*, SAVEADM+5 |
ANSWERS | FILADMIN+3~, SCOREIT+3~, SCOREIT+12*, SCOREIT+13, LGSCORE+2~, LGSCORE+7*, LGSCORE+8 |
ARGS | SAVEADM~, SCORADM~, RVW~ |
ARSL | FILANS+3~, FILANS+7*, FILANS+8 |
AUSER | LGSCORE+2~, LGSCORE+6*, LGSCORE+8 |
CNT | SCORADM+3~, SCORADM+9*, SCORADM+15*, SCORADM+16, SCORADM+17* |
DATA | SAVEADM~, SAVEADM+2, SAVEADM+4, SAVEADM+6, SCORADM~, SCORADM+5, SAVESCR~, FILADMIN~, FILADMIN+26, RVW~ , SETADM~, FILANS~, FILANS+7, QASAVE~, SCOREIT~, SCOREIT+11, LGSCORE~ |
DATA("adminId" | RVW+6, RVW+7, SETADM+13 |
DATA("administeredById" | FILADMIN+15*, SETADM+22 |
DATA("answers" | FILADMIN+9, FILADMIN+20, FILADMIN+21, FILADMIN+22*, FILANS+6, QASAVE+8, QASAVE+9, QASAVE+10, QASAVE+22!, TXT2ANS+4 , TXT2ANS+6, TXT2ANS+7, TXT2ANS+8, SCOREIT+9, SCOREIT+12, LGSCORE+7 |
DATA("complete" | FILADMIN+19*, SETADM+24 |
DATA("completedDate" | FILADMIN+16* |
DATA("consultId" | FILADMIN+14*, SETADM+29 |
DATA("dateGiven" | FILADMIN+18*, SETADM+19 |
DATA("dateSaved" | FILADMIN+17* |
DATA("instrumentId" | FILADMIN+6*, FILADMIN+7*, FILADMIN+8, SETADM+18, SCOREIT+6*, SCOREIT+7*, SCOREIT+8, SCOREIT+10 |
DATA("locationId" | FILADMIN+12, SETADM+26 |
DATA("name" | SAVESCR+15, FILADMIN+5, SCOREIT+5, LGSCORE+4 |
DATA("numAns" | FILADMIN+25*, SETADM+25 |
DATA("orderedById" | FILADMIN+11, SETADM+21, LGSCORE+6 |
DATA("patientId" | FILADMIN+10, SETADM+17, LGSCORE+3, LGSCORE+5 |
DATA("results" | SAVEADM+6, SAVESCR+5, SAVESCR+7, SAVESCR+8, SAVESCR+9, SAVESCR+10, SAVESCR+11 |
DATA("source" | FILADMIN+13*, SETADM+27*, SETADM+28 |
DATAOUT | SCORADM+2~ |
DUZ | FILADMIN+15, RVW+10, LGSCORE+6 |
END | ADDSEGS+2~, ADDSEGS+3* |
ERRARY | SCORADM+2~ |
FIRST | ADDSEGS+2~, ADDSEGS+4*, ADDSEGS+5 |
I | SCORADM+2~, SCORADM+10*, SCORADM+11, SCORADM+12, SCORADM+13, SCORADM+14, SAVESCR+3~, SAVESCR+7*, SAVESCR+8, SAVESCR+9 , SAVESCR+10, SAVESCR+11, SAVESCR+20*, SAVESCR+21, FILADMIN+4~, FILADMIN+20*, FILADMIN+21, FILADMIN+22, QASAVE+6~, QASAVE+8* , QASAVE+9, QASAVE+10, QASAVE+21, ADDSEGS+2~, ADDSEGS+3*, ADDSEGS+4 |
IDX | TXT2ANS~, TXT2ANS+4, TXT2ANS+6, TXT2ANS+7, TXT2ANS+8 |
J | TXT2ANS+2~, TXT2ANS+7*, TXT2ANS+8 |
JSONOUT | SCORADM+2~ |
LAST | ADDSEGS+2~, ADDSEGS+3*, ADDSEGS+4*, ADDSEGS+5 |
LEN | TXT2ANS+2~, TXT2ANS+3*, ADDSEGS+4 |
LN | TXT2ANS+2~, TXT2ANS+3*, ADDSEGS+4*, ADDSEGS+6 |
N | SCOREIT+4~* |
N0 | RVW+4~, RVW+9* |
NODE | TXT2ANS+2~, TXT2ANS+4*, TXT2ANS+5, TXT2ANS+8*, TXT2ANS+9, ADDSEGS~, ADDSEGS+3, ADDSEGS+5 |
QANS | QASAVE+6~, QASAVE+7*, QASAVE+16* |
QID | QASAVE+6~, QASAVE+9*, QASAVE+11, QASAVE+13*, QASAVE+14, QASAVE+19, QASAVE+20, QASAVE+21 |
QNUM | QASAVE+6~, QASAVE+7*, QASAVE+12*, QASAVE+14, QASAVE+20, QASAVE+21, TXT2ANS~, ADDSEGS+6 |
RARR | SAVESCR+3~ |
RARR( | SAVESCR+13*, SAVESCR+14*, SAVESCR+23 |
RT1 | QASAVE+6~, QASAVE+17*, QASAVE+18*, QASAVE+19*, QASAVE+20 |
SCL | SAVESCR+4~, SAVESCR+21*, SAVESCR+22, SAVESCR+23 |
SCLID | SAVESCR+4~, SAVESCR+21*, SAVESCR+22, SAVESCR+23 |
SCORES | SCORADM+2~, SCORADM+5, SCORADM+6, SCOREIT~, SCOREIT+11, SCOREIT+13, LGSCORE~, LGSCORE+8 |
SCORES( | SCORADM+10, SCORADM+11, SCORADM+12, SCORADM+13, SCORADM+14 |
SCRRES | SAVEADM+1~ |
TEST | FILADMIN+3~, FILADMIN+5*, FILADMIN+6, FILADMIN+7, SCOREIT+3~, SCOREIT+5*, SCOREIT+6, SCOREIT+7, SCOREIT+13 |
TESTNM | LGSCORE+2~, LGSCORE+4*, LGSCORE+8 |
U | SAVESCR+14, SAVESCR+21, RVW+9, RVW+16, SETADM+32, QASAVE+14, QASAVE+19, QASAVE+20 |
VAL | FILADMIN+4~, FILADMIN+21*, FILADMIN+22, FILADMIN+23, QASAVE+6~, QASAVE+10*, QASAVE+14, QASAVE+16, QASAVE+18, QASAVE+20 |
X | ADDSEGS+2~, ADDSEGS+5*, ADDSEGS+6 |
YS | SAVESCR+3~, SAVESCR+17, SAVESCR+24!, SAVESCR+25, RVW+4~, SETADM+12~, SETADM+30 |
YS( | RVW+11* |
YS("AD" | SAVESCR+24* |
YS("CODE" | SAVESCR+15* |
YS("FILEN" | SETADM+14* |
YS("IEN" | SETADM+15* |
YS(1 | SETADM+16* |
YS(10 | SETADM+25* |
YS(11 | SETADM+26* |
YS(12 | SETADM+28* |
YS(13 | SETADM+29* |
YS(2 | SETADM+17* |
YS(3 | SETADM+18* |
YS(4 | SETADM+19* |
YS(5 | SETADM+20* |
YS(6 | SETADM+21* |
YS(7 | SETADM+22* |
YS(8 | SETADM+23* |
YS(9 | SETADM+24* |
YSARR | SAVEADM+1~ |
YSARR("consultId" | FILADMIN+14 |
YSCMPLT | RVW+4~, RVW+9* |
YSDATA | SAVESCR+17, SAVESCR+25, SETADM+12~, SETADM+30, QASAVE+24~, QASAVE+26 |
YSDATA(1 | SETADM+31, QASAVE+27 |
YSDATA(2 | SETADM+32 |
YSID | SCORADM+3~, SCORADM+11*, SCORADM+15, SAVESCR+3~, SAVESCR+8*, SAVESCR+12, SAVESCR+13, SAVESCR+14 |
YSLG | SCOREIT+3~, SCOREIT+10*, SCOREIT+11 |
YSMESS | RVW+4~, RVW+5*, RVW+7*, RVW+8*, RVW+14*, RVW+16 |
YSNAM | SCORADM+3~, SCORADM+12*, SCORADM+15, SAVESCR+3~, SAVESCR+9*, SAVESCR+13 |
YSOK | RVW+4~, RVW+5*, RVW+10*, RVW+11, RVW+13*, RVW+14*, RVW+16 |
YSORD | RVW+4~, RVW+9*, RVW+10 |
YSRAW | SCORADM+3~, SCORADM+13*, SCORADM+15, SAVESCR+3~, SAVESCR+10*, SAVESCR+13 |
YSTSC | SAVESCR+3~, SAVESCR+11*, SAVESCR+14 |
YSTSCR | SCORADM+3~, SCORADM+14*, SCORADM+15 |
YTERR | RVW+4~, RVW+14 |
YTQRRSLT | SCORADM+4!, SCORADM+8*, SCORADM+18* |