source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSD4PRE0.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: 2.8 KB
RevLine 
[613]1YSD4PRE0 ;DALISC/LJA - Mental Health 5.01 Pre-init ;[ 04/10/94 10:39 AM ]
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;
4OUT ;Place out of order message on all DSM options
5 W !!,"Placing Options Out of Order" H 2
6 N DA,DIE,DR
7 S (DA,YSOPTION)=""
8 F YSOPTION="YSCENED","YSCENDIA","YSCENGED","YSCENMEDS","YSCENPP","YSCENTMHX","YSCENWL","YSDIAGE","YSDIAGP-DX","YSDIAGP-DXLS","YSPATPROF","YSPLDX" D
9 . S DA=+$O(^DIC(19,"B",YSOPTION,0)) QUIT:DA'>0
10 . I $P($G(^DIC(19,+DA,0)),U,3)="" D QUIT
11 . . S DIE=19,DR="2///Out of Order - Installing Mental Health V. 5.01"
12 . . D ^DIE
13 QUIT
14 ;
15PCKCHG ; Rename package file entry...
16 I $O(^DIC(9.4,"B","MENTAL HEALTH",0))>0&($O(^DIC(9.4,"B","MENTAL HEALTH SYSTEM",0))>0) D
17 . N DIE,DA,DR
18 . ;
19 . ; Get IEN
20 . S DA=+$O(^DIC(9.4,"B","MENTAL HEALTH",0))
21 . QUIT:DA'>0 ;->
22 . ;
23 . ; Set other variables and call DIE
24 . S DIE=9.4,DR=".01///OLD MENTAL HEALTH"
25 . D ^DIE
26 . ; I $P($G(^DIC(9.4,+DA,0)),U)="OLD MENTAL HEALTH" W " done..."
27 . N DIE,DA,DR
28 . W !!,"Renaming the 'Mental Health System' package file entry..."
29 . ;
30 . ; Get IEN
31 . S DA=+$O(^DIC(9.4,"B","MENTAL HEALTH SYSTEM",0))
32 . QUIT:DA'>0 ;->
33 . ;
34 . ; Set other variables and call DIE
35 . S DIE=9.4,DR=".01///MENTAL HEALTH"
36 . D ^DIE
37 . I $P($G(^DIC(9.4,+DA,0)),U)="MENTAL HEALTH" W " done..."
38 ;
39 I $O(^DIC(9.4,"B","MENTAL HEALTH SYSTEM",0))>0 D
40 . N DIE,DA,DR
41 . W !!,"Renaming the 'Mental Health System' package file entry..."
42 . ;
43 . ; Get IEN
44 . S DA=+$O(^DIC(9.4,"B","MENTAL HEALTH SYSTEM",0))
45 . QUIT:DA'>0 ;->
46 . ;
47 . ; Set other variables and call DIE
48 . S DIE=9.4,DR=".01///MENTAL HEALTH"
49 . D ^DIE
50 . I $P($G(^DIC(9.4,+DA,0)),U)="MENTAL HEALTH" W " done..."
51 QUIT
52 ;
53DELMHPN ; Delete files ..........
54 I $D(^YSP(606))!($P(^GMR(121.99,1,"CONV"),U,3)'=1) D
55 .
56 . W !!,"Deleting the Progress Note file, #606 ...."
57 . S DIU(0)="DST",DIU="^YSP(606," D EN^DIU2
58 .
59 . W !,"Deleting the Progress Note Type file, #606.5 ...."
60 . S DIU="^YSP(606.5," D EN^DIU2 K DIU
61 .
62 . ; Delete options ........
63 . W !,"Deleting YSPN* options .... "
64 . S YSPNOPT="YSPN",DIK="^DIC(19,",DA=""
65 . F S YSPNOPT=$O(^DIC(19,"B",YSPNOPT)) Q:$E(YSPNOPT,1,4)'="YSPN"!(YSPNOPT'="") D
66 . . F S DA=+$O(^DIC(19,"B",YSPNOPT,DA)) Q:DA'>0 D
67 . . . I $D(^DIC(19,"AC",+DA)) D QUIT
68 . . . . W !!,"The "_YSPNOPT_" option is being used by other options"
69 . . . . W " and cannot be deleted",!!
70 . . . I $D(^DIC(19,+DA,0)) D ^DIK W "."
71 . W !!?5,"*** Pre-Init Clean-Up is complete, remember to delete YSPN* routines ***",!
72 QUIT
73 ;
74ICD I '$D(^ICD9(0)) W !!,$C(7),"NOTE: " D H 3
75 . W "You are not required to have the ICD Diagnosis file #80 installed"
76 . W !,"but the Final Discharge Note within Progress Notes points to this file."
77 . W !,"If you wish to use this type of note, please install this file.",!
78 QUIT
79 ;
80EOR ;YSD4PRE0 - Mental Health 5.01 Pre-init ;4/10/94 9:25
Note: See TracBrowser for help on using the repository browser.