VistA Analysis » VistA Reference » RPCs » ORWDX1 ORDMATCH

ORWDX1 ORDMATCH

This RPC will accept a list of orders and each order status, if one of the order does not have a status it will return a false value.

Properties

Property Value
Label ORDMATCH
MUMPS Implementation ORWDX1
Return Type SINGLE VALUE

Input Parameters

Name Type Maximum Data Length Required Description
DFN LITERAL   true  
ORYARR LIST   true  

MUMPS Method Description

Property Value
Method ORDMATCH^ORWDX1
Input Parameters DFN, ORYARR
Code
 N ACTION,CNT,IEN,MATCH,ORDERID,STATUS
S CNT=0,MATCH=1
F S CNT=$O(ORYARR(CNT)) Q:CNT'>0!(MATCH=0) D
. S ORDERID=$P(ORYARR(CNT),U),STATUS=$P(ORYARR(CNT),U,2)
. ;*341 Set up Action before validation.
. S IEN=$P(ORDERID,";"),ACTION=$P(ORDERID,";",2)
. I ORDERID=0,$G(ACTION)="" Q
. I STATUS=$P($G(^OR(100,IEN,3)),U,3) Q
. I $P($G(^ORD(100.01,STATUS,0)),U)="DISCONTINUED/EDIT" Q
. ;S MATCH=0
. I $P($G(^OR(100,IEN,8,ACTION,0)),U,15)'=STATUS S MATCH=0
S ORY=MATCH

CPRS

File Type Description
Pascal File Orders/rOrders.pas


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