source: FOIAVistA/trunk/r/CLINICAL_CASE_REGISTRIES-ROR/RORP001.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1RORP001 ;HCIOFO/SG - PATCH ROR*1.5*1 INSTALLATION ROUTINE ; 7/18/06 9:38am
2 ;;1.5;CLINICAL CASE REGISTRIES;**1**;Feb 17, 2006;Build 24
3 ;
4 ;***** ENVIRONMENT CHECK
5 N RC
6 ;--- Check the User ID
7 I $G(DUZ)'>0 D S XPDABORT=2 Q
8 . W !!,"The DUZ variable must be defined!",!
9 ;--- Check the required security key
10 I '$D(^XUSEC("ROR VA IRM",DUZ)) D S XPDABORT=2 Q
11 . W !!,"You must have the ROR VA IRM security key!",!
12 ;
13 ;=== Installation section
14 Q:'$G(XPDENV)
15 ;--- Check the scheduled option
16 I $$CHKOPT^RORKIDS("ROR TASK")<0 S XPDABORT=2 Q
17 ;--- Override the "Want to DISABLE Options, and Protocols?" question
18 S XPDDIQ("XPZ1")=0
19 Q
20 ;
21 ;***** ERROR PROCESSING
22ERROR ;
23 N TMP S XPDABORT=1
24 I $D(ZTQUEUED) D D ALERT^RORKIDS(DUZ,-43,REGNAME,,TMP)
25 . S TMP=+$G(RORPARM("KIDS"))
26 . S TMP=$S(TMP=1:"pre-",TMP=2:"post-",1:"")_"install"
27 D DSPSTK^RORERR(),ABTMSG^RORKIDS()
28 Q
29 ;
30 ;***** POST-INSTALL ENTRY POINT
31POS ;
32 N RORERROR ; Error processing data
33 N RORLOG ; Log subsystem constants & variables
34 N RORPARM ; Application parameters
35 ;
36 N DA,RC,RORHIV,TMP
37 S RORPARM("DEVELOPER")=1 ; Enable modifications
38 S RORPARM("ERR")=1 ; Enable error processing
39 S RORPARM("KIDS")=2 ; Post-install indicator
40 S RORPARM("LOG")=1 ; Enable log recording
41 ;
42 ;--- Open a new log
43 K TMP S TMP("VA HIV")=""
44 S TMP=$$OPEN^RORLOG(.TMP,0,XPDNM_" POST-INSTALL STARTED")
45 K TMP
46 ;
47 ;--- Initialize variables
48 S RORHIV=$$REGIEN^RORUTL02("VA HIV") G:RORHIV<0 ERROR
49 S RORHIV=RORHIV_U_"VA HIV"
50 ;
51 ;--- ROR GENERIC DRUG file (#799.51)
52 G:$$CP^RORKIDS("POS05","$$RS79951^RORPUT02")<0 ERROR
53 ;
54 ;--- Restore the CDC definition
55 G:$$CP^RORKIDS("POS10","$$CDCDEF^RORPUT01")<0 ERROR
56 ;
57 ;--- Restore predefined report templates
58 G:$$CP^RORKIDS("POS15","$$RSPRT^RORPUT02")<0 ERROR
59 ;
60 ;--- Close the log
61 D CLOSE^RORLOG(XPDNM_" POST-INSTALL COMPLETED")
62 Q
63 ;
64 ;***** PRE-TRANSPORTATION ENTRY POINT
65PTR ;
66 N RORBUF,TMP
67 ;--- Copy the CDC definition to the transport global
68 D GETPARM^RORRP038(.RORBUF,"ICRCDCDEF","PKG")
69 K RORBUF(0) M @XPDGREF@("RORCDCDEF")=RORBUF
70 ;--- Load the records of the ROR GENERIG DRUG file
71 D LD79951^RORPUT02()
72 ;--- Load predefined report templates
73 D LDPRT^RORPUT02()
74 Q
Note: See TracBrowser for help on using the repository browser.