source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVXPST.m@ 1270

Last change on this file since 1270 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1GMVXPST ;HOIFO/FT-POST INSTALLATION FOR VITALS ;10/28/02 12:33
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #10141 - ^XPDUTL calls (supported)
6 ; #2263 - ^XPAR calls (supported)
7 ;
8 ; This post-installation:
9 ; 1) deletes the data dictionary entries and data for File 120.5,
10 ; Fields 1.1 and 1.3
11 ; 2) deletes the data dictionary entries and data for File 120.51,
12 ; Fields 2 and 6
13 ; 3) updates the parameters for the required client version
14 ; 4) deletes some bogus data dictionary nodes in FILE 120.5
15 ;
16XPAR ; Setup preliminary parameters
17 ; This submodule is called during the KIDS installation
18 ; process.
19 ;
20 ; Variables:
21 ; GMV: [Private] Scratch
22 ; GMVGUI: [Private] Current version of GUI being installed
23 ; GMVLST: [Private] Scratch List
24 ;
25 ; New private variables
26 NEW GMV,GMVGUI,GMVLST
27 ; Announce my intentions
28 D BMES^XPDUTL("Updating system parameters.")
29 ; Set current client version
30 S GMVGUI="5.0.0.0"
31 ; Deactivate all previous versions from XPAR
32 D GETLST^XPAR(.GMVLST,"SYS","GMV GUI VERSION")
33 F GMV=0:0 S GMV=$O(GMVLST(GMV)) Q:'GMV D
34 .D EN^XPAR("SYS","GMV GUI VERSION",$P(GMVLST(GMV),"^",1),0)
35 ; Add and/or activate current client versions
36 D EN^XPAR("SYS","GMV GUI VERSION","VITALS.EXE:"_GMVGUI,1)
37 D EN^XPAR("SYS","GMV GUI VERSION","VITALSMANAGER.EXE:"_GMVGUI,1)
38 ; Set latest Vital Home Page
39 D EN^XPAR("SYS","GMV WEBLINK",1,"http://vista.med.va.gov/ClinicalSpecialties/vitals/")
40 ;
41 ; Kill bogus DD nodes
42 K ^DD(120.5,1,0)
43 K ^DD(120.5,1,21,0)
44 K ^DD(120.5,1,21,1,0)
45 K ^DD(120.5,1,21,2,0)
46 K ^DD(120.5,"B","SITE",1)
47 K ^DD(120.5,"GL",1,0,1)
48 K ^DD(120.5,"SB",120.505,1)
49 ;
50QUEUE ; Queue post-install
51 N GMVMSG,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSK
52 I +$$VERSION^XPDUTL("GMRV")>4.9 Q ;post-install was done before
53 D BMES^XPDUTL("Will queue data cleanup as a background job.")
54 S ZTDESC="V/M v5.0 Data Cleanup"
55 S ZTRTN="EN^GMVXPST",ZTIO="",ZTDTH=$H
56 D ^%ZTLOAD
57 S:ZTSK GMVMSG="Task #: "_ZTSK
58 S:'ZTSK GMVMSG="Could not task the data cleanup."
59 D MES^XPDUTL(GMVMSG)
60 Q
61EN ; Driver subroutine for post-installation
62 S:$D(ZTQUEUED) ZTREQ="@"
63 D DATA,DD
64 Q
65DD ; Delete obsolete data dictionary fields
66 ; delete *SITE (#2) and *QUALITY (#6) from File 120.51
67 N DA,DIK
68 S DIK="^DD(120.51,"
69 F DA=2,6 D
70 .S DA(1)=DA
71 .D ^DIK
72 .Q
73 ; delete *SITE (#1.1) and *QUALITY (#1.3) from File 120.5
74 S DIK="^DD(120.5,"
75 F DA=1.1,1.3 D
76 .S DA(1)=DA
77 .D ^DIK
78 .Q
79 Q
80DATA ; Delete data from obsolete fields
81 ; delete data from File 120.51, Fields 2 and 6
82 N DA,DIE,DR,GMVNODE
83 S DA=0
84 F S DA=$O(^GMRD(120.51,DA)) Q:'DA D
85 .S DIE="^GMRD(120.51,",DR="2///@;6///@"
86 .D ^DIE
87 .Q
88 ; delete data from File 120.5, Fields 1.1 and 1.3
89 S DA=0
90 F S DA=$O(^GMR(120.5,DA)) Q:'DA D
91 .S GMVNODE=$G(^GMR(120.5,DA,0))
92 .I $P(GMVNODE,U,7)="",$P(GMVNODE,U,9)="" Q ;no data to delete
93 .S DIE="^GMR(120.5,",DR="1.1///@;1.3///@"
94 .D ^DIE
95 .Q
96 Q
Note: See TracBrowser for help on using the repository browser.