KMPDSS ;OAK/RAK,JML - CM Tools Status ;6/1/2020
;;4.0;CAPACITY MANAGEMENT;**1**;11/15/2017;Build 27
;
EN ;-entry point
;
N DIR,OUT,X,Y
;
S OUT=0
F D Q:OUT
.D HDR^KMPDUTL4(" Check Capacity Planning Environment ")
.S DIR(0)="SO^S:SAGG;T:Timing"
.W !! D ^DIR I Y=""!(Y="^") SET OUT=1 Q
.D DISPLAY^KMPDSS1(Y_"^"_Y(0))
;
Q
;
VERDSPL(KMPDPKG) ;--display routine version info
;-----------------------------------------------------------------------
; KMPDPKG... CM Package:
; "D" - CM Tools
; "R" - RUM - Decommissioned
; "S" - SAGG
;-----------------------------------------------------------------------
Q:$G(KMPDPKG)=""
Q:KMPDPKG'="D"&(KMPDPKG'="S")
N I,X
; routine check
D VERPTCH^KMPDUTL1(KMPDPKG,.X)
W !?5,$S(KMPDPKG="D":"CM TOOLS",1:"SAGG")
W " routines",$$REPEAT^XLFSTR(".",28-$X),": "
I '$P($G(X(0)),U,3) W "No Problems"
E D
.W !?20,"Current Version",?55,"Should be"
.S I=0 F S I=$O(X(I)) Q:I="" I $P(X(I),U) D
..W !?3,I,?20,$P(X(I),U,4)
..W:$P(X(I),U,5)]"" " - ",$P(X(I),U,5)
..W ?55,$P(X(I),U,2)
..W:$P(X(I),U,3)]"" " - ",$P(X(I),U,3)
Q
;
PRM ;-- edit parameters file
;
N DDSFILE,DR,DA
;
S DA=$O(^KMPD(8973,0)) Q:'DA
S DDSFILE=8973,DR="[KMPD PARAMETERS EDIT]" D ^DDS
;
Q
;
SST ;-- start/stop coversheet collection
; check for cprs patch
I '$$PATCH^XPDUTL("OR*3.0*209") D Q
.W !! D EN^DDIOL($C(7)_"*** Patch OR*3.0*209 must be installed for CPRS Timing data to be collected ***")
;
N DIR,STAT,X,Y
S STAT=$G(^KMPTMP("KMPD-CPRS"))
W !!!,"Timing Collection is currently [ ",$S(STAT:"Running",1:"STOPPED")," ]",!
S DIR(0)="YO",DIR("B")="N"
S DIR("A")="Do you want to '"_$S(STAT:"Stop",1:"Start")_"' the collection"
D ^DIR Q:'Y
S ^KMPTMP("KMPD-CPRS")=$S(STAT:"",1:1)
W !!,"Timing Collection has been [ ",$S(STAT:"STOPPED",1:"Started")," ]"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HKMPDSS 1902 printed Dec 13, 2024@01:40:38 Page 2
KMPDSS ;OAK/RAK,JML - CM Tools Status ;6/1/2020
+1 ;;4.0;CAPACITY MANAGEMENT;**1**;11/15/2017;Build 27
+2 ;
EN ;-entry point
+1 ;
+2 NEW DIR,OUT,X,Y
+3 ;
+4 SET OUT=0
+5 FOR
Begin DoDot:1
+6 DO HDR^KMPDUTL4(" Check Capacity Planning Environment ")
+7 SET DIR(0)="SO^S:SAGG;T:Timing"
+8 WRITE !!
DO ^DIR
IF Y=""!(Y="^")
SET OUT=1
QUIT
+9 DO DISPLAY^KMPDSS1(Y_"^"_Y(0))
End DoDot:1
if OUT
QUIT
+10 ;
+11 QUIT
+12 ;
VERDSPL(KMPDPKG) ;--display routine version info
+1 ;-----------------------------------------------------------------------
+2 ; KMPDPKG... CM Package:
+3 ; "D" - CM Tools
+4 ; "R" - RUM - Decommissioned
+5 ; "S" - SAGG
+6 ;-----------------------------------------------------------------------
+7 if $GET(KMPDPKG)=""
QUIT
+8 if KMPDPKG'="D"&(KMPDPKG'="S")
QUIT
+9 NEW I,X
+10 ; routine check
+11 DO VERPTCH^KMPDUTL1(KMPDPKG,.X)
+12 WRITE !?5,$SELECT(KMPDPKG="D":"CM TOOLS",1:"SAGG")
+13 WRITE " routines",$$REPEAT^XLFSTR(".",28-$X),": "
+14 IF '$PIECE($GET(X(0)),U,3)
WRITE "No Problems"
+15 IF '$TEST
Begin DoDot:1
+16 WRITE !?20,"Current Version",?55,"Should be"
+17 SET I=0
FOR
SET I=$ORDER(X(I))
if I=""
QUIT
IF $PIECE(X(I),U)
Begin DoDot:2
+18 WRITE !?3,I,?20,$PIECE(X(I),U,4)
+19 if $PIECE(X(I),U,5)]""
WRITE " - ",$PIECE(X(I),U,5)
+20 WRITE ?55,$PIECE(X(I),U,2)
+21 if $PIECE(X(I),U,3)]""
WRITE " - ",$PIECE(X(I),U,3)
End DoDot:2
End DoDot:1
+22 QUIT
+23 ;
PRM ;-- edit parameters file
+1 ;
+2 NEW DDSFILE,DR,DA
+3 ;
+4 SET DA=$ORDER(^KMPD(8973,0))
if 'DA
QUIT
+5 SET DDSFILE=8973
SET DR="[KMPD PARAMETERS EDIT]"
DO ^DDS
+6 ;
+7 QUIT
+8 ;
SST ;-- start/stop coversheet collection
+1 ; check for cprs patch
+2 IF '$$PATCH^XPDUTL("OR*3.0*209")
Begin DoDot:1
+3 WRITE !!
DO EN^DDIOL($CHAR(7)_"*** Patch OR*3.0*209 must be installed for CPRS Timing data to be collected ***")
End DoDot:1
QUIT
+4 ;
+5 NEW DIR,STAT,X,Y
+6 SET STAT=$GET(^KMPTMP("KMPD-CPRS"))
+7 WRITE !!!,"Timing Collection is currently [ ",$SELECT(STAT:"Running",1:"STOPPED")," ]",!
+8 SET DIR(0)="YO"
SET DIR("B")="N"
+9 SET DIR("A")="Do you want to '"_$SELECT(STAT:"Stop",1:"Start")_"' the collection"
+10 DO ^DIR
if 'Y
QUIT
+11 SET ^KMPTMP("KMPD-CPRS")=$SELECT(STAT:"",1:1)
+12 WRITE !!,"Timing Collection has been [ ",$SELECT(STAT:"STOPPED",1:"Started")," ]"
+13 QUIT