Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: NURXPRE

NURXPRE.m

Go to the documentation of this file.
  1. NURXPRE ;HIRMFO/FT-Nursing Service v4.0 Pre-initialization routine ;1/21/97 14:58
  1. ;;4.0;NURSING SERVICE;;Apr 25, 1997
  1. ;
  1. ; This routine contains the pre-initialization code for the Nursing
  1. ; Service package v4.0.
  1. ;
  1. D ^NURXENV I $G(XPDABORT) D KILL Q
  1. S NURPKG=+$$VERSION^XPDUTL("GMRV")
  1. I NURPKG<4 D BMES^XPDUTL("Vitals/Measurements v4.0 is required before you continue with this installation.") S XPDABORT=2 D KILL Q
  1. S NURPKG=+$$VERSION^XPDUTL("GMRY")
  1. I NURPKG<4 D BMES^XPDUTL("Intake/Output v4.0 is required before you continue with this installation.") S XPDABORT=2 D KILL Q
  1. D OFFLINE,KILLDD,NMSP
  1. KILL ; kill variables
  1. K DA,DIC,DIE,DLAYGO,DR,NURCNT,NURDA,NURERROR,NURIEN,NURMSG,NURPATCH,NURPKG,NURSEQ,X,Y
  1. Q
  1. OFFLINE ; Set Nursing switch to Off-Line
  1. S $P(^DIC(213.9,1,"OFF"),U,1)=1
  1. D BMES^XPDUTL("Setting Nursing software switch to OFF-LINE")
  1. Q
  1. KILLDD ; Kill old data dictionary nodes that no longer apply
  1. ;
  1. ; old File 16 references
  1. K ^DD(210,21.71,9.3)
  1. K ^DD(210,21.71,9.4)
  1. ; old computed field code
  1. K ^DD(210,19,9.01)
  1. K ^DD(210,19,9.1)
  1. K ^DD(210,19,9.2)
  1. K ^DD(210,19,9.3)
  1. K ^DD(213.4,11,9.2)
  1. D BMES^XPDUTL("Killing old data dictionary nodes that are no longer needed.")
  1. Q
  1. ;
  1. NMSP ; This subroutine changes the PACKAGE FILE LINK (#1) pointer value to
  1. ; the NUR*3.0*1/3/6/7/8/9/10 entries in the BUILD (#9.6) and INSTALL
  1. ; (#9.7) files to the NURSING SERVICE entry.
  1. ;
  1. Q:+$$VERSION^XPDUTL("NUR")>3 ;quit if v4.0 already installed.
  1. Q:'$D(^NURSF(210,0)) ;quit if virgin installation
  1. D FIND^DIC(9.4,"","","X","NUR","","C","","","NURIEN","NURERROR")
  1. S NURDA=$O(NURIEN("DILIST",2,0)) Q:'NURDA
  1. S NURDA=+$G(NURIEN("DILIST",2,+NURDA))
  1. D BUILD,INSTALL
  1. Q
  1. BUILD ; stuff pointer for NURSING SERVICE in PACKAGE FILE LINK field (#1)
  1. ; of BUILD file (#9.6) for NUR*3.0*1/3/6/7/8/9/10 entries
  1. Q:'$G(NURDA) ;quit if no package file pointer value
  1. 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
  1. .K NURIEN,NURERROR
  1. .D FIND^DIC(9.6,"","","X",NURPATCH,"","B","","","NURIEN","NURERROR")
  1. .S NURSEQ=0
  1. .F S NURSEQ=+$O(NURIEN("DILIST",2,NURSEQ)) Q:NURSEQ'>0 D
  1. ..S DA=+$G(NURIEN("DILIST",2,NURSEQ)) Q:DA'>0
  1. ..S DIE="^XPD(9.6,",DR="1////"_NURDA D ^DIE
  1. ..Q
  1. .Q
  1. Q
  1. INSTALL ; stuff pointer for NURSING SERVICE in PACKAGE FILE LINK field (#1)
  1. ; of INSTALL file (#9.7) for NUR*3.0*1/3/6/7/8/9/10 entries
  1. Q:'$G(NURDA) ;quit if no package file pointer value
  1. 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
  1. .K NURIEN,NURERROR
  1. .D FIND^DIC(9.7,"","","X",NURPATCH,"","B","","","NURIEN","NURERROR")
  1. .S NURSEQ=0
  1. .F S NURSEQ=+$O(NURIEN("DILIST",2,NURSEQ)) Q:NURSEQ'>0 D
  1. ..S DA=+$G(NURIEN("DILIST",2,NURSEQ)) Q:DA'>0
  1. ..S DIE="^XPD(9.7,",DR="1////"_NURDA D ^DIE
  1. ..Q
  1. .Q
  1. Q