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
NURCEVE3 ;HIRMFO/RTK,RM/MD-Nursing Care Plans Edit Report ;8/16/95
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
+2 ; THIS IS A TEST VERSION OF THE ORDERS ROUTINE
ORDERS ; ORDERS
+1 KILL ORARRAY,^TMP("NURSEL",$JOB)
SET CNT=0
+2 DO EN1^NURCEVE4(DFN,GMRGPDA,GMRGRT,NURCINT(0))
+3 KILL ^TMP("NURSEL",$JOB),CNT,NURCLP,NURLPV,NUROCB,NUROCC,NURORSI,NURSTERM,NURX,NURY,NURZ,ORARRAY,ORDSTAT
+4 QUIT
STAT(DA,ORD) ; GIVEN ENTRY IN 216.8 (DA) AND ORDERABLE (ORD), THIS FUNCTION
+1 ; WILL RETURN THE MOST CURRENT STATUS OF THIS ORDER.
+2 NEW NURSEL,NUREVDT,NURORDA
+3 SET NURSEL=""
FOR NUREVDT=0:0
SET NUREVDT=$ORDER(^NURSC(216.8,DA,"ORD","AA",ORD,NUREVDT))
IF NUREVDT'>0
QUIT
Begin DoDot:1
+4 FOR NURORDA=0:0
SET NURORDA=$ORDER(^NURSC(216.8,DA,"ORD","AA",ORD,NUREVDT,NURORDA))
IF NURORDA'>0
QUIT
SET NURSEL=$GET(^NURSC(216.8,DA,"ORD",NURORDA,0))
IF NURSEL]""
QUIT
+5 QUIT
End DoDot:1
IF NURSEL]""
QUIT
+6 QUIT $PIECE(NURSEL,U,3)
+7 QUIT