VistA Analysis » VistA Reference » RPCs » ORWDPS32 AUTH

ORWDPS32 AUTH

Checks restrictions for entering inpatient meds. If no restrictions, a 0is returned. If there is a restriction, it is returned in the format: 1^restriction text

Properties

Property Value
Label AUTH
MUMPS Implementation ORWDPS32
Return Type SINGLE VALUE

MUMPS Method Description

Property Value
Method AUTH^ORWDPS32
Method Comment For inpatient meds, check restrictions
Input Parameters PRV, ORDLOG
Code
 N NAME,AUTH,INACT,X,ORSDLOG,ORDL,A,IFN S VAL=0
S NAME=$P($G(^VA(200,PRV,20)),U,2) S:'$L(NAME) NAME=$P(^(0),U)
S X=$G(^VA(200,PRV,"PS")),AUTH=$P(X,U),INACT=$P(X,U,4)
S ORDLOG=$G(ORDLOG),ORDL=""
I ORDLOG?1"X".E S IFN=$E(ORDLOG,2,99),A=$P($G(^OR(100,+IFN,0)),"^",5) I $P(A,";",2)'=101.41 S ORDLOG=""
I ORDLOG]"" S A=$P($G(^ORD(101.41,ORDLOG,0)),"^",5) I A]"" S ORDL=$P($G(^ORD(100.98,A,0)),"^",4)
S ORSDLOG=$O(^ORD(101.41,"B","PSO SUPPLY",""))
I 'AUTH!(INACT&(DT>INACT)) D Q
. I $G(ORDL)=ORSDLOG,$D(^XUSEC("ORSUPPLY",DUZ)) Q
. S VAL="1^"_NAME_" is not authorized to write medication orders."
I $D(^XUSEC("OREMAS",DUZ)),'$$GET^XPAR("ALL","OR OREMAS MED ORDERS") D Q
. S VAL="1^OREMAS key holders may not enter medication orders."

CPRS

File Type Description
Pascal File Orders/rODBase.pas


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