HMPMONV ;ASMR/BL, view eHMP storage nodes ;Sep 24, 2016 03:07:36
;;2.0;ENTERPRISE HEALTH MANAGEMENT PLATFORM;**2,3**;April 14,2016;Build 15
;Per VA Directive 6402, this routine should not be modified.
;
Q ; no entry from top
;DE6644 - routine refactored, 7 September 2016
;
;
V ; action, view eHMP temporary storage nodes
;
D FORMFEED^HMPMONL ; clear screen before report
W !,$$HDR^HMPMONL("eHMP storage nodes"),!
;
D VIEWXTMP ; ^XTMP("HMP*") nodes
D VIEWTMP ; ^TMP("HMP*") nodes
D VIEWTMPJ ; ^TMP($job,"HMP*") nodes
Q
;
VIEWXTMP ; view ^XTMP("HMP*") nodes, ^XTMP("HMP") is skipped
W !
N CNT,DONE,SUB
S (CNT,DONE)=0,SUB="HMP" ; start after HMP
F S SUB=$O(^XTMP(SUB)) S:$E(SUB,1,3)'="HMP" DONE=1 Q:DONE D
. D VSHWNDS($NA(^XTMP(SUB))) S CNT=CNT+1
;
I 'CNT W !,"No ^XTMP('HMP*') nodes found.",!
D RTRN2CON^HMPMONL
Q
;
VIEWTMP ; view ^TMP("HMP*",$J) nodes
;
N CNT,DONE,JOB,SUB
W !
S (CNT,DONE)=0,SUB="HMP"
;the $D check is for first DO outside of FOR loop
D:$D(^TMP(SUB)) F S SUB=$O(^TMP(SUB)) D Q:DONE
. I $E(SUB,1,3)'="HMP" S DONE=1 Q
. S JOB=0 F S JOB=$O(^TMP(SUB,JOB)) Q:'JOB D VSHWNDS($NA(^TMP(SUB,JOB))) S CNT=CNT+1
;
I 'CNT W !,"No ^TMP('HMP*',$JOB) nodes found.",!
D RTRN2CON^HMPMONL
Q
;
VIEWTMPJ ; view ^TMP($job,"HMP*") nodes
W !
N CNT,DONE,JOB,SUB
S (CNT,DONE,JOB)=0
F S JOB=$O(^TMP(JOB)) Q:'JOB D
. S SUB="HMP",DONE=0
. ; the $D check is for first DO outside of FOR loop
. D:$D(^TMP(JOB,SUB)) F S SUB=$O(^TMP(JOB,SUB)) D Q:DONE
.. I $E(SUB,1,3)'="HMP" S DONE=1 Q
.. D VSHWNDS($NA(^TMP(JOB,SUB))) S CNT=CNT+1
;
I 'CNT W !,"No ^TMP($JOB,'HMP*') nodes found.",!
D RTRN2CON^HMPMONL
Q
;
VSHWNDS(NODE) ; display nodes for an eHMP global node
; input:
; NODE = $NAME value of global node, e.g., ^XTMP("HMPSTUFF")
;
N LAST,LN
W !,"> "_NODE
S LAST=$O(@NODE@(""),-1) S:$L(LAST) LAST=$NA(^(LAST))
S LN=" last susbcript: "_$S($L(LAST):LAST,1:"*not found*")
W !,LN,!
;
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHMPMONV 2026 printed Dec 13, 2024@01:54:24 Page 2
HMPMONV ;ASMR/BL, view eHMP storage nodes ;Sep 24, 2016 03:07:36
+1 ;;2.0;ENTERPRISE HEALTH MANAGEMENT PLATFORM;**2,3**;April 14,2016;Build 15
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ; no entry from top
QUIT
+5 ;DE6644 - routine refactored, 7 September 2016
+6 ;
+7 ;
V ; action, view eHMP temporary storage nodes
+1 ;
+2 ; clear screen before report
DO FORMFEED^HMPMONL
+3 WRITE !,$$HDR^HMPMONL("eHMP storage nodes"),!
+4 ;
+5 ; ^XTMP("HMP*") nodes
DO VIEWXTMP
+6 ; ^TMP("HMP*") nodes
DO VIEWTMP
+7 ; ^TMP($job,"HMP*") nodes
DO VIEWTMPJ
+8 QUIT
+9 ;
VIEWXTMP ; view ^XTMP("HMP*") nodes, ^XTMP("HMP") is skipped
+1 WRITE !
+2 NEW CNT,DONE,SUB
+3 ; start after HMP
SET (CNT,DONE)=0
SET SUB="HMP"
+4 FOR
SET SUB=$ORDER(^XTMP(SUB))
if $EXTRACT(SUB,1,3)'="HMP"
SET DONE=1
if DONE
QUIT
Begin DoDot:1
+5 DO VSHWNDS($NAME(^XTMP(SUB)))
SET CNT=CNT+1
End DoDot:1
+6 ;
+7 IF 'CNT
WRITE !,"No ^XTMP('HMP*') nodes found.",!
+8 DO RTRN2CON^HMPMONL
+9 QUIT
+10 ;
VIEWTMP ; view ^TMP("HMP*",$J) nodes
+1 ;
+2 NEW CNT,DONE,JOB,SUB
+3 WRITE !
+4 SET (CNT,DONE)=0
SET SUB="HMP"
+5 ;the $D check is for first DO outside of FOR loop
+6 if $DATA(^TMP(SUB))
Begin DoDot:1
+7 IF $EXTRACT(SUB,1,3)'="HMP"
SET DONE=1
QUIT
+8 SET JOB=0
FOR
SET JOB=$ORDER(^TMP(SUB,JOB))
if 'JOB
QUIT
DO VSHWNDS($NAME(^TMP(SUB,JOB)))
SET CNT=CNT+1
End DoDot:1
FOR
SET SUB=$ORDER(^TMP(SUB))
Begin DoDot:1
End DoDot:1
if DONE
QUIT
+9 ;
+10 IF 'CNT
WRITE !,"No ^TMP('HMP*',$JOB) nodes found.",!
+11 DO RTRN2CON^HMPMONL
+12 QUIT
+13 ;
VIEWTMPJ ; view ^TMP($job,"HMP*") nodes
+1 WRITE !
+2 NEW CNT,DONE,JOB,SUB
+3 SET (CNT,DONE,JOB)=0
+4 FOR
SET JOB=$ORDER(^TMP(JOB))
if 'JOB
QUIT
Begin DoDot:1
+5 SET SUB="HMP"
SET DONE=0
+6 ; the $D check is for first DO outside of FOR loop
+7 if $DATA(^TMP(JOB,SUB))
Begin DoDot:2
+8 IF $EXTRACT(SUB,1,3)'="HMP"
SET DONE=1
QUIT
+9 DO VSHWNDS($NAME(^TMP(JOB,SUB)))
SET CNT=CNT+1
End DoDot:2
FOR
SET SUB=$ORDER(^TMP(JOB,SUB))
Begin DoDot:2
End DoDot:2
if DONE
QUIT
End DoDot:1
+10 ;
+11 IF 'CNT
WRITE !,"No ^TMP($JOB,'HMP*') nodes found.",!
+12 DO RTRN2CON^HMPMONL
+13 QUIT
+14 ;
VSHWNDS(NODE) ; display nodes for an eHMP global node
+1 ; input:
+2 ; NODE = $NAME value of global node, e.g., ^XTMP("HMPSTUFF")
+3 ;
+4 NEW LAST,LN
+5 WRITE !,"> "_NODE
+6 SET LAST=$ORDER(@NODE@(""),-1)
if $LENGTH(LAST)
SET LAST=$NAME(^(LAST))
+7 SET LN=" last susbcript: "_$SELECT($LENGTH(LAST):LAST,1:"*not found*")
+8 WRITE !,LN,!
+9 ;
+10 QUIT
+11 ;