ORQRY ; SLC/MKB/JDL - Order Query utilities ;3/17/03 14:45
Source file <ORQRY.m>
Package | Total | Call Graph |
---|---|---|
Order Entry Results Reporting | 3 | EN^ORQ1 DOCDT^ORQRY01 VST^ORWCV |
Kernel | 1 | ($$LOW,$$UP)^XLFSTR |
Outpatient Pharmacy | 1 | OCL^PSOORRL |
Registration | 1 | OERR^VADPT |
Scheduling | 1 | $$OUTPTPR^SDUTL3 |
Text Integration Utility | 1 | QUERY^TIUQRY |
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 |
---|---|---|
Order Entry Results Reporting | 1 | ORRHCQ |
Name | Comments | DBIA/ICR reference |
---|---|---|
PP(DFN,PROV) | ; -- Returns 1 or 0, if PROV is prim prov for DFN
|
|
ACT(DFN,BEG,END,LOC) | ; -- Returns 1 or 0, if recent activity for DFN
; BEG = beginning date [default = DT-1yr] ; END = ending date [default = DT] ; LOC(IEN) = list of clinic IENs from #44 [default = all] |
|
ACTQ | ||
BYPT(ORY,DFN,QRY) | ; -- Returns report data in @ORY based on QRY parameters
|
|
DOCMTS | ; -- Find documents
|
|
CSLTS | ; -- Find consults (treats consults as special case of orders)
|
|
ORDERS | ; -- Find orders
|
|
ORDERS1 | ||
GRP(DG) | ; -- Setup display group DG in ORGRP()
|
|
POP | ||
PROC | ||
DATES | ; -- Return SDATE and EDATE from TimeFrame
; [Inverted for rev-chron search] |
|
AVWX | ; -- use ORQ1 for order view
|
|
ARSX | ; -- loop on ARS xref
|
|
ACTX | ; -- loop on "ACT" xref
|
|
CONT | ; -- Proceed with checking order ORDER() & IFN [from ARS,ACT]
|
|
LAST(IFN) | ; -- Returns DA of current/latest action for order IFN
; (Only NW or XX actions?) |
|
OI(IFN) | ; -- Return 1 or 0, if IFN contains any requested OI's
|
|
TEXT(IFN,TXT) | ; -- Return 1 or 0, if IFN;TXT text contains requested string
|
|
SAVEORD | ; -- Save order number in @ORY@("ORD:IFN;ACTN")
; Called from CONT: also uses X0,X3,X8,TXT,ORYPAT |
|
BLDTXT(IFN,TXT) | ; -- Return concatenated order text up to 245 chars
|
|
SETCBO(IFN) | ; -- Set flags when looking for combinations of orderable items
|
|
VISITS | ; -- Find clinic visits
; Save in @ORY@("VST:TYPE;DT;LOC") |
|
ISVALID(VST) | ; -- True: valid visit data
|
|
NEGATE(SRCHITM) | ; -- set report to return nodes only when nothing found
|
|
RMOV(PRE) | ; -- Remove nodes based on ID prefix
|
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^DGPM("APRD" | ACT+12 |
^DPT - [#2] | ACT+11 |
^OR(100 - [#100] | ACTX+5, CONT+2, CONT+3, CONT+10, LAST+2, LAST+3, OI+2, TEXT+3, BLDTXT+2, BLDTXT+3 , SETCBO+2, SETCBO+3 |
^ORD(100.01 - [#100.01] | SAVEORD+8 |
^ORD(100.98 - [#100.98] | CSLTS+4, GRP+3, PROC, AVWX+3, SAVEORD+5 |
^SCE - [#409.68] | ACT+25 |
^SCE("ADFN" | ACT+23, ACT+25 |
^TMP("ORR" | AVWX+6, AVWX+7! |
^TMP("PS" | ACT+16, ACTQ! |
^UTILITY("VASD" | ACTQ! |
^VA(200 - [#200] | SAVEORD+6 |
Name | Line Occurrences |
---|---|
$$BLDTXT | SAVEORD+11 |
$$ISVALID | VISITS+8 |
$$LAST | CONT+10 |
$$OI | CONT+9 |
$$TEXT | CONT+11 |
@( | ORDERS1+2, GRP+3 |
ACTQ | ACT+9, ACT+22 |
CONT | AVWX+6, ARSX+4, ACTX+5 |
CSLTS | BYPT+9 |
DATES | ORDERS1+2 |
DOCMTS | BYPT+7 |
GRP | ORDERS1+1 |
NEGATE | DOCMTS+5, ORDERS1+9, VISITS+18 |
ORDERS | BYPT+8 |
ORDERS1 | CSLTS+5 |
RMOV | ORDERS1+5, NEGATE+12 |
SAVEORD | CONT+14 |
SETCBO | SAVEORD+13 |
VISITS | BYPT+10 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
ACT | AVWX+1~, AVWX+6*, ACTX+1~, ACTX+4*, ACTX+5, CONT+10 |
ACTN | CONT+1~, CONT+10*, SAVEORD+3 |
ALL | BLDTXT+1~*, BLDTXT+4*, BLDTXT+6*, BLDTXT+7 |
BEG | ACT~, ACT+7*, ACT+8*, ACT+12, ACT+16, ACT+18, ACT+23 |
CSLTMODE | CSLTS+1~, CSLTS+2*, ORDERS1+5, ORDERS1+7, ORDERS1+8, ORDERS1+9, SAVEORD+3 |
DA | ACT+4~, ACT+25* |
DFN | PP~, PP+1, PP+2, ACT~, ACT+6*, ACT+11, ACT+12, ACT+16, ACT+18, ACT+23 , ACT+25, BYPT~, BYPT+1, BYPT+2*, BYPT+3, VISITS+6, NEGATE+2, NEGATE+3, NEGATE+4, NEGATE+5 |
DG | GRP~, GRP+2, PROC*, PROC+1, AVWX+1~, AVWX+3* |
DOCMT | DOCMTS+1~, DOCMTS+2*, DOCMTS+3, DOCMTS+4 |
DOCMT("NegativeSearch" | DOCMTS+5 |
DT | ACT+7 |
EDATE | CSLTS+1~, ORDERS+1~, DATES+2*, DATES+3*, DATES+5*, DATES+6*, AVWX+2*, AVWX+5, ARSX+3, ACTX+3 , VISITS+2~, VISITS+4*, VISITS+5*, VISITS+6, VISITS+9 |
END | ACT~, ACT+7*, ACT+8*, ACT+14, ACT+16, ACT+18, ACT+23 |
I | ORDERS+1~, ORDERS1+1*, TEXT+1~, TEXT+2*, TEXT+3*, BLDTXT+1~, BLDTXT+2*, BLDTXT+3, SETCBO+1~, SETCBO+2* , SETCBO+3, VISITS+2~, VISITS+7*, VISITS+8, VISITS+10 |
ID | SAVEORD+2~, SAVEORD+3*, SAVEORD+4, SAVEORD+5, SAVEORD+6, SAVEORD+7, SAVEORD+8, SAVEORD+9, SAVEORD+10, SAVEORD+11 , SAVEORD+12, VISITS+2~, VISITS+11*, VISITS+12, VISITS+13, VISITS+14, VISITS+15, VISITS+16, NEGATE+1~, NEGATE+2* , NEGATE+3*, NEGATE+4*, NEGATE+5*, NEGATE+8, NEGATE+9, RMOV+1~, RMOV+2* |
IDT | ACT+4~, ACT+23*, ACT+25 |
IDX | ARSX+1~, ARSX+2*, ARSX+3*, ARSX+4, ACTX+1~, ACTX+2*, ACTX+3*, ACTX+4 |
IFN | AVWX+1~, AVWX+6*, ARSX+1~, ARSX+4*, ACTX+1~, ACTX+4*, ACTX+5, CONT+2, CONT+9, CONT+10 , CONT+11, LAST~, LAST+2, LAST+3, OI~, OI+2, TEXT~, TEXT+3, SAVEORD+3, SAVEORD+11 , SAVEORD+13, BLDTXT~, BLDTXT+2, BLDTXT+3, SETCBO~, SETCBO+2, SETCBO+3 |
ISVAL | ISVALID+1~, ISVALID+3*, ISVALID+5*, ISVALID+6*, ISVALID+7 |
ITM | OI+1~, OI+2* |
IX | ACT+5~, ACT+17*, ACT+19*, ACT+21, ISVALID+1~, ISVALID+3*, ISVALID+4*, ISVALID+5 |
JX | ACT+5~, ACT+17*, ACT+20*, ACT+21 |
LOC | ACT~, ACT+9, ACT+24 |
LOC( | ACT+20, ACT+25 |
MAX | BLDTXT+1~*, BLDTXT+2, BLDTXT+5*, BLDTXT+6 |
MEM | GRP+1~, GRP+2*, GRP+3*, POP*, PROC, PROC+1* |
MULT | AVWX+1~, AVWX+4*, AVWX+5 |
OI | SETCBO+1~, SETCBO+3*, SETCBO+4, SETCBO+5 |
ORCBO | ORDERS1~, ORDERS1+4, SAVEORD+13 |
ORCBO(1 | ORDERS1*, ORDERS1+4, SETCBO+4* |
ORCBO(2 | ORDERS1*, ORDERS1+4, SETCBO+5* |
ORCNT | CSLTS+1~, CSLTS+2*, ORDERS+1~, ORDERS+2*, ORDERS1+6*, ORDERS1+7, ORDERS1+8, SAVEORD+3*, VISITS+2~, VISITS+6* , VISITS+11*, VISITS+17 |
ORDER | CSLTS+1~, CSLTS+2*, ORDERS+1~, ORDERS+2* |
ORDER("Abnormal" | ORDERS1+2, CONT+8 |
ORDER("DisplayGroup" | CSLTS+3, CSLTS+4*, ORDERS1+1 |
ORDER("ItemCombo1" | ORDERS1, SETCBO+4 |
ORDER("ItemCombo2" | SETCBO+5 |
ORDER("NegativeSearch" | ORDERS1+9 |
ORDER("Orderable" | CONT+9, OI+2 |
ORDER("Requestor" | CONT+6 |
ORDER("SignStatus" | ACTX+5, CONT+12 |
ORDER("Status" | CONT+7 |
ORDER("Text" | CONT+11, TEXT+2 |
ORDER("TimeFrame" | DATES+2, AVWX+2 |
ORDER("View" | AVWX+3 |
ORGRP | CSLTS+1~, ORDERS+1~, CONT+5 |
ORGRP( | GRP+2*, PROC+1*, CONT+5 |
ORI | AVWX+1~, AVWX+6* |
ORLIST | AVWX+1~, AVWX+6, AVWX+7 |
ORV | VISITS+2~, VISITS+6 |
ORV( | VISITS+7, VISITS+8, VISITS+10 |
ORY | BYPT~, BYPT+2*, DOCMTS+4, ORDERS1+7, ORDERS1+8, SAVEORD+4, SAVEORD+5, SAVEORD+6, SAVEORD+7, SAVEORD+8 , SAVEORD+9, SAVEORD+10, SAVEORD+11, SAVEORD+12, VISITS+12, VISITS+13, VISITS+14, VISITS+15, VISITS+16, VISITS+17 , NEGATE+6, NEGATE+8, NEGATE+9, NEGATE+10, NEGATE+13, RMOV+2 |
ORYPAT | BYPT+1~, DOCMTS+4, SAVEORD+12, VISITS+16, NEGATE+8 |
ORYPAT("Patient.Age" | BYPT+4* |
ORYPAT("Patient.DFN" | BYPT+3* |
ORYPAT("Patient.Last4" | BYPT+5* |
ORYPAT("Patient.Name" | BYPT+4* |
ORYPAT("Patient.Ward" | BYPT+6* |
PART | BLDTXT+1~, BLDTXT+3*, BLDTXT+4 |
PAT | BYPT+1~, BYPT+3*, AVWX+5, ARSX+3, ACTX+3 |
PRE | NEGATE+1~, NEGATE+2*, NEGATE+3*, NEGATE+4*, NEGATE+5*, NEGATE+12, RMOV~, RMOV+2 |
PROV | PP~, PP+1, PP+2 |
QRY | BYPT~ |
QRY("Consult" | BYPT+9, CSLTS+2 |
QRY("Document" | BYPT+7, DOCMTS+2 |
QRY("Order" | BYPT+8, ORDERS+2 |
QRY("Visit" | BYPT+10, VISITS+3 |
RTNCNT | NEGATE+1~, NEGATE+6*, NEGATE+7 |
SDATE | CSLTS+1~, ORDERS+1~, DATES+2*, DATES+4*, DATES+5*, DATES+6*, AVWX+2*, AVWX+5, VISITS+2~, VISITS+4* , VISITS+5*, VISITS+6 |
SRCHITM | NEGATE~, NEGATE+2, NEGATE+3, NEGATE+4, NEGATE+5, NEGATE+6, NEGATE+9, NEGATE+10, NEGATE+13 |
STK | GRP+1~, GRP+2*, GRP+3, POP*, PROC, PROC+1* |
STK( | GRP+2*, GRP+3, POP, PROC*, PROC+1* |
STK(0 | GRP+2* |
TXT | CONT+11*, TEXT~, TEXT+3, SAVEORD+11, BLDTXT~, BLDTXT+2, BLDTXT+3 |
U | ACT+25, BYPT+6, AVWX+4, ACTX+5, CONT+3, CONT+5, CONT+6, CONT+7, CONT+8, CONT+11 , CONT+12, LAST+2, SAVEORD+4, SAVEORD+5, SAVEORD+6, SAVEORD+7, SAVEORD+8, SAVEORD+9, SAVEORD+10, VISITS+11 , VISITS+13, VISITS+14, VISITS+15 |
VA | BYPT+1~ |
VA("BID" | BYPT+5 |
VADM | BYPT+1~ |
VADM(1 | BYPT+4, BYPT+5 |
VADM(4 | BYPT+4 |
VAERR | ACT+4~, BYPT+1~ |
VAIN | BYPT+1~ |
VAIN(4 | BYPT+6 |
VAIN(5 | BYPT+6 |
VASD | ACT+4~ |
VISIT | VISITS+2~, VISITS+3* |
VISIT("Location" | ISVALID+4, ISVALID+6 |
VISIT("NegativeSearch" | VISITS+18 |
VISIT("TimeFrame" | VISITS+4 |
VST | ISVALID~, ISVALID+2 |
VSTH | ACT+5~, ACT+17*, ACT+18 |
VSTH( | ACT+19, ACT+21 |
VSTID | ISVALID+1~, ISVALID+2*, ISVALID+5 |
VTYPE | VISITS+2~, VISITS+10*, VISITS+15 |
X | PP+1~, PP+2*, ACT+4~, ACT+8*, ACT+12*, ACT+14, CSLTS+1~, DATES+2~*, DATES+6*, AVWX+1~ , AVWX+2*, AVWX+3*, AVWX+4, AVWX+5, CONT+1~, TEXT+1~, TEXT+2*, TEXT+3, SAVEORD+2~, SAVEORD+7* , VISITS+2~, VISITS+4*, VISITS+8*, VISITS+9, VISITS+11, VISITS+13, VISITS+14, VISITS+15 |
X0 | CONT+1~, CONT+2*, CONT+5, CONT+6, SAVEORD+4, SAVEORD+5, SAVEORD+6 |
X3 | CONT+1~, CONT+2*, CONT+3, CONT+7, SAVEORD+8 |
X7 | CONT+1~, CONT+2*, CONT+8, SAVEORD+9, SAVEORD+10 |
X8 | CONT+1~, CONT+10*, CONT+11, CONT+12, SAVEORD+4, SAVEORD+7 |
Y | PP+1~, PP+2*, PP+3, LAST+2~*, LAST+3*, LAST+4, OI+1~*, OI+2*, OI+3, TEXT+1~* , TEXT+3*, TEXT+4 |
YY | ACT+4~, ACT+6*, ACT+9, ACT+11*, ACT+14*, ACT+16*, ACT+21*, ACT+22, ACT+23, ACT+24* , ACT+25*, ACTQ+1 |