GMVXPST ;HOIFO/FT-POST INSTALLATION FOR VITALS ;10/28/02 12:33
;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
;
; This routine uses the following IAs:
; #10141 - ^XPDUTL calls (supported)
; #2263 - ^XPAR calls (supported)
;
; This post-installation:
; 1) deletes the data dictionary entries and data for File 120.5,
; Fields 1.1 and 1.3
; 2) deletes the data dictionary entries and data for File 120.51,
; Fields 2 and 6
; 3) updates the parameters for the required client version
; 4) deletes some bogus data dictionary nodes in FILE 120.5
;
XPAR ; Setup preliminary parameters
; This submodule is called during the KIDS installation
; process.
;
; Variables:
; GMV: [Private] Scratch
; GMVGUI: [Private] Current version of GUI being installed
; GMVLST: [Private] Scratch List
;
; New private variables
NEW GMV,GMVGUI,GMVLST
; Announce my intentions
D BMES^XPDUTL("Updating system parameters.")
; Set current client version
S GMVGUI="5.0.0.0"
; Deactivate all previous versions from XPAR
D GETLST^XPAR(.GMVLST,"SYS","GMV GUI VERSION")
F GMV=0:0 S GMV=$O(GMVLST(GMV)) Q:'GMV D
.D EN^XPAR("SYS","GMV GUI VERSION",$P(GMVLST(GMV),"^",1),0)
; Add and/or activate current client versions
D EN^XPAR("SYS","GMV GUI VERSION","VITALS.EXE:"_GMVGUI,1)
D EN^XPAR("SYS","GMV GUI VERSION","VITALSMANAGER.EXE:"_GMVGUI,1)
; Set latest Vital Home Page
D EN^XPAR("SYS","GMV WEBLINK",1,"http://vista.domain.ext/ClinicalSpecialties/vitals/")
;
; Kill bogus DD nodes
K ^DD(120.5,1,0)
K ^DD(120.5,1,21,0)
K ^DD(120.5,1,21,1,0)
K ^DD(120.5,1,21,2,0)
K ^DD(120.5,"B","SITE",1)
K ^DD(120.5,"GL",1,0,1)
K ^DD(120.5,"SB",120.505,1)
;
QUEUE ; Queue post-install
N GMVMSG,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSK
I +$$VERSION^XPDUTL("GMRV")>4.9 Q ;post-install was done before
D BMES^XPDUTL("Will queue data cleanup as a background job.")
S ZTDESC="V/M v5.0 Data Cleanup"
S ZTRTN="EN^GMVXPST",ZTIO="",ZTDTH=$H
D ^%ZTLOAD
S:ZTSK GMVMSG="Task #: "_ZTSK
S:'ZTSK GMVMSG="Could not task the data cleanup."
D MES^XPDUTL(GMVMSG)
Q
EN ; Driver subroutine for post-installation
S:$D(ZTQUEUED) ZTREQ="@"
D DATA,DD
Q
DD ; Delete obsolete data dictionary fields
; delete *SITE (#2) and *QUALITY (#6) from File 120.51
N DA,DIK
S DIK="^DD(120.51,"
F DA=2,6 D
.S DA(1)=DA
.D ^DIK
.Q
; delete *SITE (#1.1) and *QUALITY (#1.3) from File 120.5
S DIK="^DD(120.5,"
F DA=1.1,1.3 D
.S DA(1)=DA
.D ^DIK
.Q
Q
DATA ; Delete data from obsolete fields
; delete data from File 120.51, Fields 2 and 6
N DA,DIE,DR,GMVNODE
S DA=0
F S DA=$O(^GMRD(120.51,DA)) Q:'DA D
.S DIE="^GMRD(120.51,",DR="2///@;6///@"
.D ^DIE
.Q
; delete data from File 120.5, Fields 1.1 and 1.3
S DA=0
F S DA=$O(^GMR(120.5,DA)) Q:'DA D
.S GMVNODE=$G(^GMR(120.5,DA,0))
.I $P(GMVNODE,U,7)="",$P(GMVNODE,U,9)="" Q ;no data to delete
.S DIE="^GMR(120.5,",DR="1.1///@;1.3///@"
.D ^DIE
.Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMVXPST 2991 printed Nov 22, 2024@17:10:27 Page 2
GMVXPST ;HOIFO/FT-POST INSTALLATION FOR VITALS ;10/28/02 12:33
+1 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; #10141 - ^XPDUTL calls (supported)
+5 ; #2263 - ^XPAR calls (supported)
+6 ;
+7 ; This post-installation:
+8 ; 1) deletes the data dictionary entries and data for File 120.5,
+9 ; Fields 1.1 and 1.3
+10 ; 2) deletes the data dictionary entries and data for File 120.51,
+11 ; Fields 2 and 6
+12 ; 3) updates the parameters for the required client version
+13 ; 4) deletes some bogus data dictionary nodes in FILE 120.5
+14 ;
XPAR ; Setup preliminary parameters
+1 ; This submodule is called during the KIDS installation
+2 ; process.
+3 ;
+4 ; Variables:
+5 ; GMV: [Private] Scratch
+6 ; GMVGUI: [Private] Current version of GUI being installed
+7 ; GMVLST: [Private] Scratch List
+8 ;
+9 ; New private variables
+10 NEW GMV,GMVGUI,GMVLST
+11 ; Announce my intentions
+12 DO BMES^XPDUTL("Updating system parameters.")
+13 ; Set current client version
+14 SET GMVGUI="5.0.0.0"
+15 ; Deactivate all previous versions from XPAR
+16 DO GETLST^XPAR(.GMVLST,"SYS","GMV GUI VERSION")
+17 FOR GMV=0:0
SET GMV=$ORDER(GMVLST(GMV))
if 'GMV
QUIT
Begin DoDot:1
+18 DO EN^XPAR("SYS","GMV GUI VERSION",$PIECE(GMVLST(GMV),"^",1),0)
End DoDot:1
+19 ; Add and/or activate current client versions
+20 DO EN^XPAR("SYS","GMV GUI VERSION","VITALS.EXE:"_GMVGUI,1)
+21 DO EN^XPAR("SYS","GMV GUI VERSION","VITALSMANAGER.EXE:"_GMVGUI,1)
+22 ; Set latest Vital Home Page
+23 DO EN^XPAR("SYS","GMV WEBLINK",1,"http://vista.domain.ext/ClinicalSpecialties/vitals/")
+24 ;
+25 ; Kill bogus DD nodes
+26 KILL ^DD(120.5,1,0)
+27 KILL ^DD(120.5,1,21,0)
+28 KILL ^DD(120.5,1,21,1,0)
+29 KILL ^DD(120.5,1,21,2,0)
+30 KILL ^DD(120.5,"B","SITE",1)
+31 KILL ^DD(120.5,"GL",1,0,1)
+32 KILL ^DD(120.5,"SB",120.505,1)
+33 ;
QUEUE ; Queue post-install
+1 NEW GMVMSG,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSK
+2 ;post-install was done before
IF +$$VERSION^XPDUTL("GMRV")>4.9
QUIT
+3 DO BMES^XPDUTL("Will queue data cleanup as a background job.")
+4 SET ZTDESC="V/M v5.0 Data Cleanup"
+5 SET ZTRTN="EN^GMVXPST"
SET ZTIO=""
SET ZTDTH=$HOROLOG
+6 DO ^%ZTLOAD
+7 if ZTSK
SET GMVMSG="Task #: "_ZTSK
+8 if 'ZTSK
SET GMVMSG="Could not task the data cleanup."
+9 DO MES^XPDUTL(GMVMSG)
+10 QUIT
EN ; Driver subroutine for post-installation
+1 if $DATA(ZTQUEUED)
SET ZTREQ="@"
+2 DO DATA
DO DD
+3 QUIT
DD ; Delete obsolete data dictionary fields
+1 ; delete *SITE (#2) and *QUALITY (#6) from File 120.51
+2 NEW DA,DIK
+3 SET DIK="^DD(120.51,"
+4 FOR DA=2,6
Begin DoDot:1
+5 SET DA(1)=DA
+6 DO ^DIK
+7 QUIT
End DoDot:1
+8 ; delete *SITE (#1.1) and *QUALITY (#1.3) from File 120.5
+9 SET DIK="^DD(120.5,"
+10 FOR DA=1.1,1.3
Begin DoDot:1
+11 SET DA(1)=DA
+12 DO ^DIK
+13 QUIT
End DoDot:1
+14 QUIT
DATA ; Delete data from obsolete fields
+1 ; delete data from File 120.51, Fields 2 and 6
+2 NEW DA,DIE,DR,GMVNODE
+3 SET DA=0
+4 FOR
SET DA=$ORDER(^GMRD(120.51,DA))
if 'DA
QUIT
Begin DoDot:1
+5 SET DIE="^GMRD(120.51,"
SET DR="2///@;6///@"
+6 DO ^DIE
+7 QUIT
End DoDot:1
+8 ; delete data from File 120.5, Fields 1.1 and 1.3
+9 SET DA=0
+10 FOR
SET DA=$ORDER(^GMR(120.5,DA))
if 'DA
QUIT
Begin DoDot:1
+11 SET GMVNODE=$GET(^GMR(120.5,DA,0))
+12 ;no data to delete
IF $PIECE(GMVNODE,U,7)=""
IF $PIECE(GMVNODE,U,9)=""
QUIT
+13 SET DIE="^GMR(120.5,"
SET DR="1.1///@;1.3///@"
+14 DO ^DIE
+15 QUIT
End DoDot:1
+16 QUIT