NURCEVE2 ;HIRMFO/RTK,RM/MD-Nursing Care Plans Edit Report ;8/16/95
;;4.0;NURSING SERVICE;;Apr 25, 1997
GOALS ; GIVEN THE TERM IN THE CHILD MULTIPLE (NURCA),
; THIS ROUTINE PRINTS THE GOALS UNDER NURCA AND ALLOWS THE
; USER TO EDIT THEM.
K ^TMP("NURSEL",$J),GOARRAY S CNT=0
D EN1^NURCEVE4(DFN,GMRGPDA,GMRGRT,NURCGOEX(0))
K ^TMP("NURSEL",$J),CNT,GMRGTERM,GOARRAY,GOTMDC,NURCB,NURCC,NURCNT,NURGVR,NURX,NURY,NURZ
Q
SELDAT(AGGY,IEN) ; GIVEN AGGREGATE TERM (AGGY) AND 124.3 ENTRY (IEN)
; THIS ENTRY RETURNS THE INT/APP DATA ENTERED FOR THAT TERM
N FXN
S FXN=$O(^GMR(124.3,IEN,1,"B",AGGY,0))
I FXN>0 S FXN=$P($G(^GMR(124.3,IEN,1,FXN,0)),U,2)
Q FXN
STAT(DA,GOAL,DATE) ; GIVEN THE 216.8 ENTRY (DA) THIS FUNCTION RETURNS THE
; LATEST STATUS FOR THE GOAL (GOAL).
N NURSEL,NUREVDT,NURGODA
S NURSEL="" F NUREVDT=0:0 S NUREVDT=$O(^NURSC(216.8,DA,"TARG","AA",GOAL,NUREVDT)) Q:NUREVDT'>0 D Q:NURSEL]""
. F NURGODA=0:0 S NURGODA=$O(^NURSC(216.8,DA,"TARG","AA",GOAL,NUREVDT,NURGODA)) Q:NURGODA'>0 S NURSEL=$G(^NURSC(216.8,DA,"TARG",NURGODA,0)) Q:NURSEL]""
. Q
S DATE=$P(NURSEL,U,5)
Q $P(NURSEL,U,2)
ACTIVE(BLK,AGGY) ; GIVEN 124.3 ENTRY (BLK) THIS FUNCTION RETURNS 1 IF
; THE AGGREGATE TERM ENTRY (AGGY) IS A PART OF BLK, ELSE IT RETURNS 0
Q ''$D(^GMR(124.3,BLK,1,"ALIST",AGGY))
NURCEVE2 ;HIRMFO/RTK,RM/MD-Nursing Care Plans Edit Report ;8/16/95
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
GOALS ; GIVEN THE TERM IN THE CHILD MULTIPLE (NURCA),
+1 ; THIS ROUTINE PRINTS THE GOALS UNDER NURCA AND ALLOWS THE
+2 ; USER TO EDIT THEM.
+3 KILL ^TMP("NURSEL",$JOB),GOARRAY
SET CNT=0
+4 DO EN1^NURCEVE4(DFN,GMRGPDA,GMRGRT,NURCGOEX(0))
+5 KILL ^TMP("NURSEL",$JOB),CNT,GMRGTERM,GOARRAY,GOTMDC,NURCB,NURCC,NURCNT,NURGVR,NURX,NURY,NURZ
+6 QUIT
SELDAT(AGGY,IEN) ; GIVEN AGGREGATE TERM (AGGY) AND 124.3 ENTRY (IEN)
+1 ; THIS ENTRY RETURNS THE INT/APP DATA ENTERED FOR THAT TERM
+2 NEW FXN
+3 SET FXN=$ORDER(^GMR(124.3,IEN,1,"B",AGGY,0))
+4 IF FXN>0
SET FXN=$PIECE($GET(^GMR(124.3,IEN,1,FXN,0)),U,2)
+5 QUIT FXN
STAT(DA,GOAL,DATE) ; GIVEN THE 216.8 ENTRY (DA) THIS FUNCTION RETURNS THE
+1 ; LATEST STATUS FOR THE GOAL (GOAL).
+2 NEW NURSEL,NUREVDT,NURGODA
+3 SET NURSEL=""
FOR NUREVDT=0:0
SET NUREVDT=$ORDER(^NURSC(216.8,DA,"TARG","AA",GOAL,NUREVDT))
IF NUREVDT'>0
QUIT
Begin DoDot:1
+4 FOR NURGODA=0:0
SET NURGODA=$ORDER(^NURSC(216.8,DA,"TARG","AA",GOAL,NUREVDT,NURGODA))
IF NURGODA'>0
QUIT
SET NURSEL=$GET(^NURSC(216.8,DA,"TARG",NURGODA,0))
IF NURSEL]""
QUIT
+5 QUIT
End DoDot:1
IF NURSEL]""
QUIT
+6 SET DATE=$PIECE(NURSEL,U,5)
+7 QUIT $PIECE(NURSEL,U,2)
ACTIVE(BLK,AGGY) ; GIVEN 124.3 ENTRY (BLK) THIS FUNCTION RETURNS 1 IF
+1 ; THE AGGREGATE TERM ENTRY (AGGY) IS A PART OF BLK, ELSE IT RETURNS 0
+2 QUIT ''$DATA(^GMR(124.3,BLK,1,"ALIST",AGGY))