source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSD4POST.m@ 1474

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

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1YSD4POST ;DALISC/LJA -Post-init for the Mental Health 5.01 [ 04/10/94 12:43 PM ]
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;
4CTRL ;
5 D END
6 D START ; Give 'em a "starting" message
7 D OUT^YSD4PRE0 ; Place out of order message on all DSM options
8 D YSONIT ; Install the YS PATIENT MOVEMENT protocol
9 D DELOPT ; Delete obsolete options
10 D DELTEMP ; Delete obsolete 'YSPN*' templates
11 D SETP ; Update parameter data
12 D PROGMSG ; Progress message
13 D DSMCK^YSD4POS0 ; Check DSM conversion environment
14 ; (Note: YSD4OK var from DSMCK evaluated by DSMCONV...)
15 D DSMCONV ; Convert DSM data
16 D OUT ; Take out of order message off all DSM options
17 D KILLALL^YSD4UT01 ; Kill all variables used in the DSM conversion
18 D END
19 QUIT
20 ;
21START ; Start of Post Init Process
22 W !!,"Starting Post-init process..."
23 H 2
24 QUIT
25YSONIT ;
26 W !!,"Adding the YS PATIENT MOVEMENT to the DGPM MOVEMENT EVENTS protocol..."
27 D ^YSONIT
28 QUIT
29 ;
30DELOPT ; Delete obsolete options
31 N DA,DIK,YSNM,YSNO
32 W !!,"Deleting obsolete options..."
33 F YSNM="YSCENHX","YSCENPATL","YSCENPROB","YSCENTPT","YSCENUP","YSDIAGP","YSKEY","YS SITE-FILE 19" D
34 . S YSNO=+$O(^DIC(19,"B",YSNM,0)) QUIT:YSNO'>0
35 . I $D(^DIC(19,"AC",+YSNO)) D QUIT
36 . . W !!,"The ",YSNM," option is being used by other options and cannot be deleted",!!
37 . S DA=+YSNO,DIK="^DIC(19,"
38 . D ^DIK
39 QUIT
40 ;
41DELTEMP ; Delete obsolete templates
42 N DA,DIK,YSPNTEMP
43 W !!,"Deleting obsolete YSPN* print templates .... "
44 S YSPNTEMP="YSPN",DIK="^DIC(19,",DA=""
45 F S YSPNTEMP=$O(^DIPT("B",YSPNTEMP)) Q:$E(YSPNTEMP,1,4)'="YSPN"!(YSPNTEMP'="") D
46 . F S DA=$O(^DIPT("B",YSPNTEMP,DA)) Q:DA'>0 D
47 . . I $D(^DIPT(+DA,0)) D ^DIK W "."
48 QUIT
49 ;
50SETP ; Set Mental Health Parameters
51 W !!,"Setting MH Parameters data..."
52 S $P(^YSA(602,1,0),U,2)="5.01",$P(^(0),U,4)=0
53 QUIT
54 ;
55PROGMSG ;
56 W !!,"All post-init tasks have now been completed, except the conversion of DSM3"
57 W !,"and DSM-III-R data to the new DSM file. This will be done now..."
58 H 4
59 QUIT
60 ;
61DSMCONV ; Calls CTRL^YSD4DSM to convert DSM data
62 ;
63 ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
64 ; Note!!! Do NOT call this subroutine directly w/o setting YSD4OK
65 ; by calling DSMCK.
66 ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67 ;
68 I 'YSD4OK D QUIT ;->
69 . W !!,"Discontinuing the post-init conversion of DSM data..."
70 . H 2
71 ;
72 ; All OK. Continue with DSM conversion...
73 ;
74 D CONVERT^YSD4DSM ; Do the conversion!!!
75 QUIT
76 ;
77OUT ;Return options to service on all DSM options
78 W !!,"Returning Options to Service" H 2
79 N DA,DIE,DR
80 S (DA,YSOPTION)=""
81 F YSOPTION="YSCENED","YSCENDIA","YSCENGED","YSCENMEDS","YSCENPP","YSCENTMHX","YSCENWL","YSDIAGE","YSDIAGP-DX","YSDIAGP-DXLS","YSPATPROF","YSPLDX" D
82 . S DA=+$O(^DIC(19,"B",YSOPTION,0)) QUIT:DA'>0
83 . I $P($G(^DIC(19,+DA,0)),U,3)="Out of Order - Installing Mental Health V. 5.01" D QUIT
84 . . S DIE=19,DR="2///@"
85 . . D ^DIE
86 QUIT
87 ;
88END ;
89 K DA,DIK,DIR,Y
90 K YSD40,YSD4CNT3,YSD4CNTR,YSD4CONT,YSD4NO,YSD4OK,YSNM,YSNO
91 QUIT
92 ;
93EOR ;YSD4POST - Post-init for the Mental Health 5.01 ;4/11/94 11:40
Note: See TracBrowser for help on using the repository browser.