source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSD4PRE.m@ 1710

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

initial load of WorldVistAEHR

File size: 4.0 KB
Line 
1YSD4PRE ;DALISC/LJA - Mental Health 5.01 Pre-init ;[ 04/10/94 10:39 AM ]
2 ;;5.01;MENTAL HEALTH;**6**;Dec 30, 1994
3 ;
4CTRL ; Master control module
5 D END ; Clean up variables
6 D STARTMSG
7 D CKALL I 'YSD4OK D QUIT ;->
8 . K DIFQ
9 . D END
10 D CLNUP ; Conditional MH PN message
11 D PCKGE ; Tell user about 'MH System' package file entry
12 D OUT^YSD4PRE0 ; Place DSM options out of order
13 D PCKCHG^YSD4PRE0 ; Check/Reset MH Package file entries
14 D DELMHPN^YSD4PRE0 ; Delete MH PN files
15 D ICD^YSD4PRE0 ; Conditional ICD9 message
16 D GMRDEL ; Delete 'DD' of File 121 field 30 - DXLS
17 D END ; Clean up variables
18 QUIT
19 ;
20STARTMSG ;
21 W !!,"Starting the Mental Health 5.01 pre-init now...",!!
22 H 2
23 QUIT
24 ;
25CKALL ; Check all possibilities why this process should not continue.
26 ; Tell users ALL reasons every time invoked...
27 ;
28 ; Set necessary variables...
29 S YSD4OK=1 ; Assume all OK...
30 K YSD4REA ; Clean area holding reasons for process stoppage
31 S YSD4NREA=0 ; Number of reasons for process stoppage
32 ;
33 ; Now, call the various checks...
34 D DUZCK,VA200,PIMS,GMR
35 I 'YSD4OK D QUIT ;->
36 . K DIFQ
37 . W !!,"The installation of Mental Health 5.01 cannot continue for the following"
38 . W !,"reason(s)",$S(YSD4NREA>1:"s",1:""),":"
39 . F YSD4I=1:1:YSD4NREA W !,YSD4REA(+YSD4I)
40 QUIT
41 ;
42DUZCK ; DUZ, DUZ(2) check...
43 I $S('($D(DUZ)#2):1,'($D(DUZ(0))#2):1,'DUZ:1,1:0) D QUIT ;->
44 . S YSD4OK=0
45 . S YSD4NREA=YSD4NREA+1
46 . S YSD4REA(+YSD4NREA)=" "_YSD4NREA_". DUZ and DUZ(0) must be defined."
47 ;
48 I DUZ(0)'="@" D QUIT ;->
49 . S YSD4NREA=YSD4NREA+1
50 . S YSD4REA(+YSD4NREA)=" "_YSD4NREA_". Programmer access code must be set."
51 QUIT
52 ;
53VA200 ; New Person file check...
54 I '($D(^VA(200,0))#2) D QUIT ;->
55 . S YSD4OK=0
56 . S YSD4NREA=YSD4NREA+1
57 . S YSD4REA(+YSD4NREA)=" "_YSD4NREA_". NEW PERSON file not installed."
58 QUIT
59 ;
60PIMS ; PIMS version check...
61 I $S('$D(^DD(2,0,"VR")):1,^DD(2,0,"VR")<5.1:1,1:0) D QUIT ;->
62 . S YSD4OK=0
63 . S YSD4NREA=YSD4NREA+1
64 . S YSD4REA(+YSD4NREA)=" "_YSD4NREA_". PIMS 5.1 or higher required."
65 QUIT
66 ;
67GMR ; Gen Prog Notes check...
68 I $S('$D(^DD(121,0,"VR")):1,^DD(121,0,"VR")<2.2:1,1:0) D QUIT ;->
69 . S YSD4OK=0
70 . S YSD4NREA=YSD4NREA+1
71 . S YSD4REA(+YSD4NREA)=" "_YSD4NREA_". Generic Progress Notes 2.5 required."
72 QUIT
73 ;
74CLNUP I $D(^YSP(606))!($P(^GMR(121.99,1,"CONV"),U,3)'=1) D
75 . W !!!,?10,"*** MENTAL HEALTH - PROGRESS NOTE CLEAN-UP ***",!!
76 . W !,?5,"As part of the Pre-Init process the old Mental Health"
77 . W !,?5,"Progress Note functionality will be removed. The following"
78 . W !,?5,"will be purged at this time: ",!
79 . W !,?9,"1. Data and Data Dictionaries for File #606"
80 . W !,?9,"2. Data and Data Dictionaries for File #606.5"
81 . W !,?9,"3. All YSPN* options in the OPTION file #19"
82 . W !!,?5,"Please reference the Progress Notes Package 'Installation"
83 . W !,?5,"Guide' for instructions as to how to remove the Mental Health"
84 . W !,?5,"Progress Note routines. Make sure you have followed the"
85 . W !,?5,"Clean-Up instructions and have a backup of your Mental"
86 . W !,?5,"Health package before continuing this INIT process!!",!!
87 . D ASK
88 QUIT
89 ;
90ASK ; Are you sure you want to continue ... ?
91 K DIR S DIR(0)="Y",DIR("A")="Are you ready to continue the Pre-Init "
92 S DIR("?",1)="Enter YES if you are ready to do the clean-up;"
93 S DIR("?")="Enter NO to exit this Pre-Init."
94 D ^DIR
95 K DIR I $D(DIRUT)!(Y=0) K DIFQ G END
96 QUIT
97 ;
98PCKGE ;
99 ; Rename 'Mental Health System' package file entry, if exists...
100 W !!,"If your package file contains an entry named 'Mental Health System' "
101 W !,"it will be renamed 'Mental Health' ...",!!
102 QUIT
103 ;
104GMRDEL ;
105 N DA,DIK
106 S DIK="^DD(121,",DA=30,DA(1)=121
107 D ^DIK
108 QUIT
109 ;
110END ;
111 K ^DIC(627,310.1)
112 ; YS*5.01*6 - above line was added to delete this entry
113 K %,DA,DIE,DIK,DIR,DIU,DR,X,Y
114 K YSD451,YSD4COM,YSD4I,YSD4NREA,YSD4OK,YSD4REA,YSOPTION,YSPNOPT
115 QUIT
116 ;
117EOR ;YSD4PRE - Mental Health 5.01 Pre-init ; 4/10/94 9:20
Note: See TracBrowser for help on using the repository browser.