VistA Analysis » VistA Reference » RPCs » ORQOR LIST

ORQOR LIST

Returns a list of patient orders.

Properties

Property Value
Label LIST
MUMPS Implementation ORQOR1
Return Type ARRAY

Input Parameters

Name Type Maximum Data Length Required Description
PATIENT LITERAL 16 true Patient DFN from Patient file [#2].
GROUP LITERAL 16 true Entry number of the desired display group from the Display Group File [#100.98].
FLAG LITERAL 16 true Flag identifying the context of the orders to be retreived.
STARTDATE LITERAL 16 true The startdate for the order search in 'T' or Fileman format.Startdate is only considered when FLAG is '1' (return all orders).
STOPDATE LITERAL 16 true The stopdate for the order search in 'T' or Fileman format.Stopdate is only considered when FLAG is '1' (return all orders).

MUMPS Method Description

Property Value
Method LIST^ORQOR1
Method Comment return list of patient orders
Input Parameters PATIENT, GROUP, FLAG, ORSDT, OREDT, ORXREF, GETKID
First Comment
 return PATIENT's orders for a display GROUP of type FLAG
between start (ORSDT) and end dates (OREDT)
dates can be in Fileman or T, T-14 formats
Code
 N GIEN S GIEN=""
I $L($G(ORSDT)) D DT^DILF("T",ORSDT,.ORSDT,"","")
I $L($G(OREDT)) D DT^DILF("T",OREDT,.OREDT,"","")
I (ORSDT=-1)!(OREDT=-1) S ORY(1)="^Error in date range." Q
S PATIENT=PATIENT_";DPT("
S:$L($G(GROUP)) GIEN=$O(^ORD(100.98,"B",GROUP,GIEN))
K ^TMP("ORR",$J)
D EN^ORQ1(PATIENT,GIEN,FLAG,"",ORSDT,OREDT,1,0,$G(ORXREF),$G(GETKID))
N J,HOR,SEQ,X S J=1,HOR=0,SEQ=0
S HOR=$O(^TMP("ORR",$J,HOR)) Q:+HOR<1
F S SEQ=$O(^TMP("ORR",$J,HOR,SEQ)) Q:+SEQ<1 D
.S X=^TMP("ORR",$J,HOR,SEQ)
.S ORY(J)=$P(X,U)_U_$E(^TMP("ORR",$J,HOR,SEQ,"TX",1),1,60)_U_$P(X,U,4)_U_$P(X,U,6),J=J+1
K ^TMP("ORR",$J)
S:+$G(ORY(1))<1 ORY(1)="^No orders found."

CPRS

File Type Description
NOT OSEHRA CPRS  


Document generated on August 31st 2022, 2:55:43 pm