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

HDI1001A.m

Go to the documentation of this file.
  1. HDI1001A ;BPFO/JRP - PATCH 1 POST INSTALL;5/12/2005
  1. ;;1.0;HEALTH DATA & INFORMATICS;**1**;Feb 22, 2005
  1. ;
  1. POST ;Main entry point for post-install routine
  1. ; Input: None
  1. ; All variables set by Kernel for KIDS post-installs
  1. ;Output: None
  1. N HDIMSG
  1. S HDIMSG(1)=" "
  1. S HDIMSG(2)="~~~~~~~~~~~~~~~~~~~~"
  1. S HDIMSG(3)="Post-Installation (POST^HDI1001A) will now be run"
  1. S HDIMSG(4)=" "
  1. D MES^XPDUTL(.HDIMSG) K HDIMSG
  1. D DELETE
  1. I '$$VUID() D PSTHALT Q
  1. S HDIMSG(1)=" "
  1. S HDIMSG(2)="Post-Installation ran to completion"
  1. S HDIMSG(3)="~~~~~~~~~~~~~~~~~~~~"
  1. S HDIMSG(4)=" "
  1. D MES^XPDUTL(.HDIMSG) K HDIMSG
  1. Q
  1. ;
  1. PSTHALT ;Print post-install halted text
  1. N HDIMSG
  1. S HDIMSG(1)=" "
  1. S HDIMSG(2)="*****"
  1. S HDIMSG(3)="***** Post-installation has been halted"
  1. S HDIMSG(4)="***** Please contact Enterprise VistA Support"
  1. S HDIMSG(5)="*****"
  1. S HDIMSG(6)=" "
  1. D MES^XPDUTL(.HDIMSG)
  1. Q
  1. ;
  1. VUID() ;Instantiate VUIDs for set of code fields
  1. ; Input: None
  1. ;Output: 0 = Stop post-install (error)
  1. ; 1 = Continue with post-install
  1. N HDIMSG
  1. S HDIMSG(1)=" "
  1. S HDIMSG(2)="Seeding XTID VUID FOR SET OF CODES file (#8985.1) with Allergy data"
  1. S HDIMSG(3)=" "
  1. D MES^XPDUTL(.HDIMSG) K HDIMSG
  1. I '$$VUIDL^HDISVU02("ALLERGY","HDI1001B") Q 0
  1. S HDIMSG(1)=" "
  1. S HDIMSG(2)="Seeding XTID VUID FOR SET OF CODES file (#8985.1) with Pharmacy data"
  1. S HDIMSG(3)=" "
  1. D MES^XPDUTL(.HDIMSG) K HDIMSG
  1. I '$$VUIDL^HDISVU02("PHARM","HDI1001C") Q 0
  1. Q 1
  1. ;
  1. DELETE ;Delete VUID for ENTERED IN ERROR field (#22) of PATIENT
  1. ; ALLERGIES file (#120.8)
  1. ;
  1. ; Input: None
  1. ;Output: None
  1. N HDIFILE,HDIFLD,HDIZERO,HDIARR,HDIERR,DIK,DA,INDX,HDIMSG,VUID
  1. S HDIMSG(1)=" "
  1. S HDIMSG(2)="Deleting VUIDs for the ENTERED IN ERROR field (#22)"
  1. S HDIMSG(3)="of the PATIENT ALLERGIES file (#120.8)"
  1. S HDIMSG(4)=" "
  1. D MES^XPDUTL(.HDIMSG) K HDIMSG
  1. ;Find entry in XTID VUID FOR SET OF CODES file (#8985.1)
  1. S HDIFILE=120.8
  1. S HDIFLD=22
  1. S SCREEN="S HDIZERO=^(0) I $P(HDIZERO,""^"",1)=HDIFILE I $P(HDIZERO,""^"",2)=HDIFLD"
  1. D FIND^DIC(8985.1,,".01;.02;.03;99.99","Q",120.8,,"B",SCREEN,,"HDIARR","HDIERR")
  1. ;Delete entries found
  1. S INDX=0
  1. F S INDX=+$O(HDIARR("DILIST",2,INDX)) Q:'INDX D
  1. .S VUID=HDIARR("DILIST","ID",INDX,99.99)
  1. .S HDIMSG(1)=" "
  1. .S HDIMSG(2)=" Deleting VUID "_VUID_" ..."
  1. .D MES^XPDUTL(.HDIMSG) K HDIMSG
  1. .S DA=HDIARR("DILIST",2,INDX)
  1. .S DIK=$$GET1^DID(8985.1,,,"GLOBAL NAME")
  1. .D ^DIK
  1. Q