source: WorldVistAEHR/trunk/r/HEALTH_DATA_AND_INFORMATICS-HDI/HDI1001A.m@ 724

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1HDI1001A ;BPFO/JRP - PATCH 1 POST INSTALL;5/12/2005
2 ;;1.0;HEALTH DATA & INFORMATICS;**1**;Feb 22, 2005
3 ;
4POST ;Main entry point for post-install routine
5 ; Input: None
6 ; All variables set by Kernel for KIDS post-installs
7 ;Output: None
8 N HDIMSG
9 S HDIMSG(1)=" "
10 S HDIMSG(2)="~~~~~~~~~~~~~~~~~~~~"
11 S HDIMSG(3)="Post-Installation (POST^HDI1001A) will now be run"
12 S HDIMSG(4)=" "
13 D MES^XPDUTL(.HDIMSG) K HDIMSG
14 D DELETE
15 I '$$VUID() D PSTHALT Q
16 S HDIMSG(1)=" "
17 S HDIMSG(2)="Post-Installation ran to completion"
18 S HDIMSG(3)="~~~~~~~~~~~~~~~~~~~~"
19 S HDIMSG(4)=" "
20 D MES^XPDUTL(.HDIMSG) K HDIMSG
21 Q
22 ;
23PSTHALT ;Print post-install halted text
24 N HDIMSG
25 S HDIMSG(1)=" "
26 S HDIMSG(2)="*****"
27 S HDIMSG(3)="***** Post-installation has been halted"
28 S HDIMSG(4)="***** Please contact Enterprise VistA Support"
29 S HDIMSG(5)="*****"
30 S HDIMSG(6)=" "
31 D MES^XPDUTL(.HDIMSG)
32 Q
33 ;
34VUID() ;Instantiate VUIDs for set of code fields
35 ; Input: None
36 ;Output: 0 = Stop post-install (error)
37 ; 1 = Continue with post-install
38 N HDIMSG
39 S HDIMSG(1)=" "
40 S HDIMSG(2)="Seeding XTID VUID FOR SET OF CODES file (#8985.1) with Allergy data"
41 S HDIMSG(3)=" "
42 D MES^XPDUTL(.HDIMSG) K HDIMSG
43 I '$$VUIDL^HDISVU02("ALLERGY","HDI1001B") Q 0
44 S HDIMSG(1)=" "
45 S HDIMSG(2)="Seeding XTID VUID FOR SET OF CODES file (#8985.1) with Pharmacy data"
46 S HDIMSG(3)=" "
47 D MES^XPDUTL(.HDIMSG) K HDIMSG
48 I '$$VUIDL^HDISVU02("PHARM","HDI1001C") Q 0
49 Q 1
50 ;
51DELETE ;Delete VUID for ENTERED IN ERROR field (#22) of PATIENT
52 ; ALLERGIES file (#120.8)
53 ;
54 ; Input: None
55 ;Output: None
56 N HDIFILE,HDIFLD,HDIZERO,HDIARR,HDIERR,DIK,DA,INDX,HDIMSG,VUID
57 S HDIMSG(1)=" "
58 S HDIMSG(2)="Deleting VUIDs for the ENTERED IN ERROR field (#22)"
59 S HDIMSG(3)="of the PATIENT ALLERGIES file (#120.8)"
60 S HDIMSG(4)=" "
61 D MES^XPDUTL(.HDIMSG) K HDIMSG
62 ;Find entry in XTID VUID FOR SET OF CODES file (#8985.1)
63 S HDIFILE=120.8
64 S HDIFLD=22
65 S SCREEN="S HDIZERO=^(0) I $P(HDIZERO,""^"",1)=HDIFILE I $P(HDIZERO,""^"",2)=HDIFLD"
66 D FIND^DIC(8985.1,,".01;.02;.03;99.99","Q",120.8,,"B",SCREEN,,"HDIARR","HDIERR")
67 ;Delete entries found
68 S INDX=0
69 F S INDX=+$O(HDIARR("DILIST",2,INDX)) Q:'INDX D
70 .S VUID=HDIARR("DILIST","ID",INDX,99.99)
71 .S HDIMSG(1)=" "
72 .S HDIMSG(2)=" Deleting VUID "_VUID_" ..."
73 .D MES^XPDUTL(.HDIMSG) K HDIMSG
74 .S DA=HDIARR("DILIST",2,INDX)
75 .S DIK=$$GET1^DID(8985.1,,,"GLOBAL NAME")
76 .D ^DIK
77 Q
Note: See TracBrowser for help on using the repository browser.