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

INHPCO.m

Go to the documentation of this file.
  1. INHPCO ; FRW ; 1 Mar 96 13:44; Manipulate GIS control files
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;COPYRIGHT 1991-2000 SAIC
  1. ;
  1. EN ;Main entry point
  1. ;
  1. Q
  1. ;
  1. ACTIVATE ;Activate everything in a production environment
  1. ;fall thru to PRD
  1. ;
  1. PRD ;Activate a produciton environment
  1. ;
  1. D ALL^INHPSAM(1)
  1. S $P(^INRHT("ALAST"),U,2)=$$NOW^%ZTFDT
  1. Q
  1. ;
  1. ;D ACTONE^INHPCO1(1)
  1. Q
  1. ;
  1. DEV ;Activate a development environment
  1. D ACTONE^INHPCO1(0)
  1. Q
  1. ;
  1. PACK ;How to Package the GIS Control Files
  1. ;
  1. ;Prep globals - D PREP
  1. ;set default directory - D ^%SPAWN(SET DEF)
  1. ;Call global COM file - D ^%SPAWN(@GLOBAL)
  1. ; Set working directory
  1. ; Save globals
  1. ; Do diff
  1. ;Reactivate environment - D DEV^INHPCO
  1. ;Verify diff - manual
  1. ;Set default directory - SET DEF
  1. ;Call global COM file - @GLOBAL
  1. ; Replace globals into CMS
  1. ; Insert globals into class
  1. ;Create/Insert .DOC file into class - D ^ZCMS
  1. ;Mark class ready in CMS and Forum
  1. ;
  1. Q
  1. ;
  1. PREP ;Prep globals for packaging
  1. ;Verbose mode => 0 - verbose ; 1 - not verbose
  1. D PREP^INHPCO1
  1. Q
  1. ;
  1. DEACTST ;Deactive non-production stuff
  1. ;
  1. W:'$G(INVERBOS) !,"*** Deactivating non-production entries ***"
  1. ;Loop through transaction types
  1. D LOOP("^INRHT(""B"")","D TTONE(DA)","^INRHT")
  1. ;Loop through messages
  1. D LOOP("^INTHL7M(""B"")","D MSGONE(DA)","^INTHL7M")
  1. ;Loop through the background process control file
  1. D LOOP("^INTHPC(""B"")","D BPCONE(DA,0)","^INTHPC")
  1. ;
  1. ;Delete the PARENT field from the TT if
  1. ; the parent = "HL" and the .01 '= "HL"
  1. ;Delete from Message Replication (4020) file if
  1. ; Originating TT = "HL" and the .01 '= "HL"
  1. ;
  1. Q
  1. ;
  1. ACTIVTST ;Activate test stuff
  1. ;
  1. ;Activate messages
  1. D LOOP("^INTHL7M(""B"")","D ACTSTONE(DA)","^INTHL7M")
  1. ;Activate transaction types
  1. D LOOP("^INRHT(""B"")","D TTONE(DA,1)","^INRHT")
  1. ;Activate background processses
  1. D LOOP("^INTHPC(""B"")","D BPCONE(DA,1)","^INTHPC")
  1. Q
  1. ;
  1. LOOP(INGL,INEXE,INGLDAT) ;Local LOOP call
  1. ;
  1. D LOOP^INHPCO1($G(INGL),$G(INEXE),$G(INGLDAT))
  1. Q
  1. ;
  1. REMEMBER ;Remember environemntal information
  1. ;
  1. I '$G(INVERBOS) W !,"*** Storing environmental information ***"
  1. N INHPREP S INHPREP=$O(^UTILITY("INSAVE","GIS PREP",""))
  1. I INHPREP W !,"WARNING: You already have environment data stored.",!,"<CR> to continue, Control C to abort." R %:DTIME
  1. S INHPREP=$H,%=$$BACKUP^INHSYSUL("GIS PREP",INHPREP)
  1. I '% W !,"*** Backup failed. some data may not be refreshed. ***" Q
  1. S ^UTILITY("INSAVE","GIS PREP","REMEMBER")=INHPREP_U_$$NOW^%ZTFDT
  1. Q
  1. ; old remember code follows
  1. ;N DA K INENV S INENV="^UTILITY(""INENV"","_+$G(DUZ)_")"
  1. ;If INENV global exists and has not been restored ask user if they want to continue (or refresh)
  1. ;I $D(@INENV) W !,"WARNING: You already have environment data stored." R %:DTIME
  1. ;K @INENV
  1. ;;IP PORT (^5) and CLIENT ADDR fields (^6) in BPC file
  1. ;S @INENV@(4004)="",DA=0
  1. ;F S DA=$O(^INTHPC(DA)) Q:'DA D
  1. ;. M @INENV@(4004,DA,5)=^INTHPC(DA,5)
  1. ;. M @INENV@(4004,DA,6)=^INTHPC(DA,6)
  1. ;S @INENV@("STORE")=$$NOW^%ZTFDT
  1. ;
  1. REFRESH ;Replace environmental information
  1. I '$G(INVERBOS) W !,"*** Replacing environmental information ***"
  1. N INHPREP S INHPREP=$O(^UTILITY("INSAVE","GIS PREP",""))
  1. I 'INHPREP W:'$G(INVERBOS) !,"*** No backup exists to refresh from. ***" Q
  1. S %=$$RESTORE^INHSYSUL("GIS PREP",INHPREP)
  1. K:% ^UTILITY("INSAVE","GIS PREP")
  1. Q
  1. ;
  1. ;N DA S:'$L($G(INENV)) INENV="^UTILITY(""INENV"","_+$G(DUZ)_")"
  1. ;IP PORT (^5) and CLIENT ADDR fields (^6) in BPC file
  1. ;S DA=0 F S DA=$O(@INENV@(4004,DA)) Q:'DA D
  1. ;. M ^INTHPC(DA,5)=@INENV@(4004,DA,5)
  1. ;. M ^INTHPC(DA,6)=@INENV@(4004,DA,6)
  1. ;S $P(@INENV@("STORE"),U,2)=$$NOW^%ZTFDT
  1. ;K @INENV
  1. ;
  1. BCKCLN ;Clean up Background Process Control file
  1. I '$G(INVERBOS) W !,"*** Cleaning up Background Process Control File ***"
  1. ;Clean up - IP PORT (^5) and CLIENT ADDR fields (^6)
  1. ; D/T last started, $J fields
  1. ;Loop through background process control file
  1. N DA,DIE,DR S DA=0,DIE=4004,DR=".04///@;.05///@"
  1. F S DA=$O(^INTHPC(DA)) Q:'DA K ^INTHPC(DA,5),^(6) D ^DIE
  1. Q
  1. ;
  1. MISC ;miscellaneous things to do
  1. N DA,DIE
  1. S DA=+$$DIC^INHSYS05(4000,"HL GIS APPL ACKNOWLEDGEMENT",4000,"X")
  1. I DA<0 W !,"HL GIS APPL ACKNOWLEDGEMENT not found" Q
  1. S DIE=4000,DR=".16///5" D ^DIE
  1. Q