source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURXPRE.m@ 1093

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

initial load of WorldVistAEHR

File size: 2.7 KB
RevLine 
[613]1NURXPRE ;HIRMFO/FT-Nursing Service v4.0 Pre-initialization routine ;1/21/97 14:58
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 ;
4 ; This routine contains the pre-initialization code for the Nursing
5 ; Service package v4.0.
6 ;
7 D ^NURXENV I $G(XPDABORT) D KILL Q
8 S NURPKG=+$$VERSION^XPDUTL("GMRV")
9 I NURPKG<4 D BMES^XPDUTL("Vitals/Measurements v4.0 is required before you continue with this installation.") S XPDABORT=2 D KILL Q
10 S NURPKG=+$$VERSION^XPDUTL("GMRY")
11 I NURPKG<4 D BMES^XPDUTL("Intake/Output v4.0 is required before you continue with this installation.") S XPDABORT=2 D KILL Q
12 D OFFLINE,KILLDD,NMSP
13KILL ; kill variables
14 K DA,DIC,DIE,DLAYGO,DR,NURCNT,NURDA,NURERROR,NURIEN,NURMSG,NURPATCH,NURPKG,NURSEQ,X,Y
15 Q
16OFFLINE ; Set Nursing switch to Off-Line
17 S $P(^DIC(213.9,1,"OFF"),U,1)=1
18 D BMES^XPDUTL("Setting Nursing software switch to OFF-LINE")
19 Q
20KILLDD ; Kill old data dictionary nodes that no longer apply
21 ;
22 ; old File 16 references
23 K ^DD(210,21.71,9.3)
24 K ^DD(210,21.71,9.4)
25 ; old computed field code
26 K ^DD(210,19,9.01)
27 K ^DD(210,19,9.1)
28 K ^DD(210,19,9.2)
29 K ^DD(210,19,9.3)
30 K ^DD(213.4,11,9.2)
31 D BMES^XPDUTL("Killing old data dictionary nodes that are no longer needed.")
32 Q
33 ;
34NMSP ; This subroutine changes the PACKAGE FILE LINK (#1) pointer value to
35 ; the NUR*3.0*1/3/6/7/8/9/10 entries in the BUILD (#9.6) and INSTALL
36 ; (#9.7) files to the NURSING SERVICE entry.
37 ;
38 Q:+$$VERSION^XPDUTL("NUR")>3 ;quit if v4.0 already installed.
39 Q:'$D(^NURSF(210,0)) ;quit if virgin installation
40 D FIND^DIC(9.4,"","","X","NUR","","C","","","NURIEN","NURERROR")
41 S NURDA=$O(NURIEN("DILIST",2,0)) Q:'NURDA
42 S NURDA=+$G(NURIEN("DILIST",2,+NURDA))
43 D BUILD,INSTALL
44 Q
45BUILD ; stuff pointer for NURSING SERVICE in PACKAGE FILE LINK field (#1)
46 ; of BUILD file (#9.6) for NUR*3.0*1/3/6/7/8/9/10 entries
47 Q:'$G(NURDA) ;quit if no package file pointer value
48 F NURPATCH="NUR*3.0*1","NUR*3.0*3","NUR*3.0*6","NUR*3.0*7","NUR*3.0*8","NUR*3.0*9","NUR*3.0*10" D
49 .K NURIEN,NURERROR
50 .D FIND^DIC(9.6,"","","X",NURPATCH,"","B","","","NURIEN","NURERROR")
51 .S NURSEQ=0
52 .F S NURSEQ=+$O(NURIEN("DILIST",2,NURSEQ)) Q:NURSEQ'>0 D
53 ..S DA=+$G(NURIEN("DILIST",2,NURSEQ)) Q:DA'>0
54 ..S DIE="^XPD(9.6,",DR="1////"_NURDA D ^DIE
55 ..Q
56 .Q
57 Q
58INSTALL ; stuff pointer for NURSING SERVICE in PACKAGE FILE LINK field (#1)
59 ; of INSTALL file (#9.7) for NUR*3.0*1/3/6/7/8/9/10 entries
60 Q:'$G(NURDA) ;quit if no package file pointer value
61 F NURPATCH="NUR*3.0*1","NUR*3.0*3","NUR*3.0*6","NUR*3.0*7","NUR*3.0*8","NUR*3.0*9","NUR*3.0*10" D
62 .K NURIEN,NURERROR
63 .D FIND^DIC(9.7,"","","X",NURPATCH,"","B","","","NURIEN","NURERROR")
64 .S NURSEQ=0
65 .F S NURSEQ=+$O(NURIEN("DILIST",2,NURSEQ)) Q:NURSEQ'>0 D
66 ..S DA=+$G(NURIEN("DILIST",2,NURSEQ)) Q:DA'>0
67 ..S DIE="^XPD(9.7,",DR="1////"_NURDA D ^DIE
68 ..Q
69 .Q
70 Q
Note: See TracBrowser for help on using the repository browser.