VistA-WorldVistAEHR/r/NURSING_SERVICE-NUR/NURCEVE3.m

17 lines
805 B
Mathematica
Raw Permalink Normal View History

2009-11-29 13:37:14 -05:00
NURCEVE3 ;HIRMFO/RTK,RM/MD-Nursing Care Plans Edit Report ;8/16/95
;;4.0;NURSING SERVICE;;Apr 25, 1997
; THIS IS A TEST VERSION OF THE ORDERS ROUTINE
ORDERS ; ORDERS
K ORARRAY,^TMP("NURSEL",$J) S CNT=0
D EN1^NURCEVE4(DFN,GMRGPDA,GMRGRT,NURCINT(0))
K ^TMP("NURSEL",$J),CNT,NURCLP,NURLPV,NUROCB,NUROCC,NURORSI,NURSTERM,NURX,NURY,NURZ,ORARRAY,ORDSTAT
Q
STAT(DA,ORD) ; GIVEN ENTRY IN 216.8 (DA) AND ORDERABLE (ORD), THIS FUNCTION
; WILL RETURN THE MOST CURRENT STATUS OF THIS ORDER.
N NURSEL,NUREVDT,NURORDA
S NURSEL="" F NUREVDT=0:0 S NUREVDT=$O(^NURSC(216.8,DA,"ORD","AA",ORD,NUREVDT)) Q:NUREVDT'>0 D Q:NURSEL]""
. F NURORDA=0:0 S NURORDA=$O(^NURSC(216.8,DA,"ORD","AA",ORD,NUREVDT,NURORDA)) Q:NURORDA'>0 S NURSEL=$G(^NURSC(216.8,DA,"ORD",NURORDA,0)) Q:NURSEL]""
. Q
Q $P(NURSEL,U,3)
Q