VistA Analysis » VistA Reference » RPCs » ORWPS MEDHIST

ORWPS MEDHIST

Properties

Property Value
Label MEDHIST
MUMPS Implementation ORWPS
Return Type GLOBAL ARRAY

MUMPS Method Description

Property Value
Method MEDHIST^ORWPS
Method Comment show admin history for a med (RV)
Input Parameters DFN, ORIFN
Code
 N ORPSID,HPIV,ISIV,CKPKG,ORPHMID
N CLIVDISP
S ORPSID=+$P($$OI^ORX8(ORIFN),U,3),ISIV=0,HPIV=0
S ORROOT=$NA(^TMP("ORHIST",$J)) K @ORROOT
S ORPHMID=$G(^OR(100,+ORIFN,4)) ;Pharmacy order number
S ISIV=$O(^ORD(100.98,"B","IV RX",ISIV))
S HPIV=$O(^ORD(100.98,"B","TPN",HPIV))
S CLIVDISP=$O(^ORD(100.98,"B","CI RX",""))
S CKPKG=$$PATCH^XPDUTL("PSB*2.0*19")
I (ORPHMID["P")!(ORPHMID="") D Q
. I '$L($T(HISTORY^PSBMLHS)) D Q
. . S @ORROOT@(0)="This report is only available using BCMA version 2.0."
. D HISTORY^PSBMLHS(.ORROOT,DFN,ORPSID) ; DBIA #3459 for BCMA v2.0
I ($P($G(^OR(100,+ORIFN,0)),U,11)=ISIV)!($P($G(^OR(100,+ORIFN,0)),U,11)=HPIV)!($P($G(^OR(100,+ORIFN,0)),U,11)=CLIVDISP) D Q
. I 'CKPKG S @ORROOT@(0)="Medication Administration History is not available at this time for IV fluids."
. I CKPKG D
. . D RPC^PSBO(.ORROOT,"PM",DFN,"","","","","","","","","",ORPHMID) ;DBIA #3955
. . I '$D(@ORROOT) S @ORROOT@(0)="No Medication Administration History found for the IV order."
I '$L($T(HISTORY^PSBMLHS)) D Q
. S @ORROOT@(0)="This report is only available using BCMA version 2.0."
D HISTORY^PSBMLHS(.ORROOT,DFN,ORPSID) ; DBIA #3459 for BCMA v2.0

CPRS

File Type Description
Pascal File rMeds.pas


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