CIAVINP9 ;MSC/IND/PLS - EHR v1.1p9 Inits;21-Nov-2011 10:09;PLS
;;1.1;VUECENTRIC FRAMEWORK;;23-Oct-2006
;;Copyright 2000-2010, Medsphere Systems Corporation
;=================================================================
EC ;EP - Environment check
Q
PRE ;EP - Preinit
Q
POST ;EP - Postinit
N VER,FDA,PID,IEN,X,TYPE
D BMES^XPDUTL("Updating version numbers...")
F VER=0:1 S X=$P($T(VER+VER),";;",2) Q:'$L(X) D
.S PID=$$PRGID^CIAVMCFG($P(X,";"))
.S:PID FDA(19930.2,PID_",",2)=$P(X,";",2),FDA(19930.2,PID_",",7)=$P(X,";",3)
D:$D(FDA) FILE^DIE(,"FDA")
;W !!!
I $L($$GETLOGIN^CIAVUTIL),$$ASK^CIAU("Do you want to enable EHR logins","Y") D
.D SDABORT^CIAVUTIL(,1),BMES^XPDUTL("Application logins have been enabled.")
Q
;
UPDCHM ;EP-
Q
N CHM
F CHM=0:1 S X=$P($T(CHM+CHM),";;",2) Q:'$L(X) D
.S PID=$$PRGID^CIAVMCFG($P(X,";"))
.D AECHM(PID,$P(X))
D:$D(FDA) FILE^DIE(,"FDA")
W !!!
Q
;
AECHM(PID,OBJ) ;EP-
N LN
S LN=0
Q
; Attach Event Protocols to Event Types
EVTPRTL(TYPE) ;
N EVTNM,PRT,EVT,FDA
S EVTNM="CIAV "_TYPE_" EVENT"
S
EVT=$$EVENTIEN^CIANBEVT(TYPE)
Q:'EVT
S PRT=$$FIND1^DIC(101,,,EVTNM)
Q:'PRT
S FDA(19941.21,EVT_",",7)=PRT
D FILE^DIE(,"FDA")
Q
; Rename .01 field of BEH Measurement file
BEHMSR(X,Y) ;
N IEN,FDA
S IEN=$O(^BEHOVM(90460.01,"B",X,0))
Q:'IEN
S FDA(90460.01,IEN_",",.01)=Y
D FILE^DIE(,"FDA")
Q
VER ;;BEHNOTIFICATIONS.NOTIFICATIONS;5.1.6.15;D9485C7BA11CF2FD5F254F4716BEA85C
;;VCPRINT.VCPRINTX;1.1.4.27;64DCBBE30575C132727B735E1FB444AD
;;
CHM ;;BEHNOTIFICATIONS.NOTIFICATIONS;BEHNotifications.chm;2011.11.16.212337;33CF3EA4C28D2CCFD965B1087860EB23
;;BEHALLERGIES.ALLERGIES;BEHAllergies.chm;2011.11.16.212212;82A261F35386CE5AC60D63E9C5C24D01
;;BEHMEDS.MEDMANAGEMENT;BEHMeds.chm;2011.11.16.212237;72064860D00A7B930D1B838CD9DF9375
;;VCQUICKNOTE.QUICKNOTE;vcQuickNote.chm;2011.11.16.212235;49186C1FF2461F4F134A19DB7AF9A46C
;;INDIANHEALTHSERVICE.BEH.IBH.SUICIDE.CONTROLS.CTLSUICIDE_FORM;Suicide_Form.chm;2011.11.16.212225;F8AAB04D8622E3B3B87871CB5517394A
;;BEHCRISES.CRISES;BEHCrises.chm;2011.11.16.212239;614E9A297213703EC59829B445601A91
;;BEHCCDC32.BEHC32BUTTON;C32_Viewer_Launch_Button.chm;2011.11.16.212340;E4BD868E0890A1142D19F0BB27617229
;;BEHCCDC32.BEHKMRBUTTON;C32_Viewer_Launch_Button.chm;2011.11.16.212340;E4BD868E0890A1142D19F0BB27617229
;;BEHCHARTREVIEW.CHARTREVIEW;BEHChartReview.chm;2011.11.16.212241;631262CE72E82A17E154A858864DDF5E
;;
CIAVINP9 ;MSC/IND/PLS - EHR v1.1p9 Inits;21-Nov-2011 10:09;PLS
+1 ;;1.1;VUECENTRIC FRAMEWORK;;23-Oct-2006
+2 ;;Copyright 2000-2010, Medsphere Systems Corporation
+3 ;=================================================================
EC ;EP - Environment check
+1 QUIT
PRE ;EP - Preinit
+1 QUIT
POST ;EP - Postinit
+1 NEW VER,FDA,PID,IEN,X,TYPE
+2 DO BMES^XPDUTL("Updating version numbers...")
+3 FOR VER=0:1
SET X=$PIECE($TEXT(VER+VER),";;",2)
IF '$LENGTH(X)
QUIT
Begin DoDot:1
+4 SET PID=$$PRGID^CIAVMCFG($PIECE(X,";"))
+5 IF PID
SET FDA(19930.2,PID_",",2)=$PIECE(X,";",2)
SET FDA(19930.2,PID_",",7)=$PIECE(X,";",3)
End DoDot:1
+6 IF $DATA(FDA)
DO FILE^DIE(,"FDA")
+7 ;W !!!
+8 IF $LENGTH($$GETLOGIN^CIAVUTIL)
IF $$ASK^CIAU("Do you want to enable EHR logins","Y")
Begin DoDot:1
+9 DO SDABORT^CIAVUTIL(,1)
DO BMES^XPDUTL("Application logins have been enabled.")
End DoDot:1
+10 QUIT
+11 ;
UPDCHM ;EP-
+1 QUIT
+2 NEW CHM
+3 FOR CHM=0:1
SET X=$PIECE($TEXT(CHM+CHM),";;",2)
IF '$LENGTH(X)
QUIT
Begin DoDot:1
+4 SET PID=$$PRGID^CIAVMCFG($PIECE(X,";"))
+5 DO AECHM(PID,$PIECE(X))
End DoDot:1
+6 IF $DATA(FDA)
DO FILE^DIE(,"FDA")
+7 WRITE !!!
+8 QUIT
+9 ;
AECHM(PID,OBJ) ;EP-
+1 NEW LN
+2 SET LN=0
+3 QUIT
+4 ; Attach Event Protocols to Event Types
EVTPRTL(TYPE) ;
+1 NEW EVTNM,PRT,EVT,FDA
+2 SET EVTNM="CIAV "_TYPE_" EVENT"
+3 SET
+4
*** ERROR ***
+5 IF 'EVT
QUIT
+6 SET PRT=$$FIND1^DIC(101,,,EVTNM)
+7 IF 'PRT
QUIT
+8 SET FDA(19941.21,EVT_",",7)=PRT
+9 DO FILE^DIE(,"FDA")
+10 QUIT
+11 ; Rename .01 field of BEH Measurement file
BEHMSR(X,Y) ;
+1 NEW IEN,FDA
+2 SET IEN=$ORDER(^BEHOVM(90460.01,"B",X,0))
+3 IF 'IEN
QUIT
+4 SET FDA(90460.01,IEN_",",.01)=Y
+5 DO FILE^DIE(,"FDA")
+6 QUIT
VER ;;BEHNOTIFICATIONS.NOTIFICATIONS;5.1.6.15;D9485C7BA11CF2FD5F254F4716BEA85C
+1 ;;VCPRINT.VCPRINTX;1.1.4.27;64DCBBE30575C132727B735E1FB444AD
+2 ;;
CHM ;;BEHNOTIFICATIONS.NOTIFICATIONS;BEHNotifications.chm;2011.11.16.212337;33CF3EA4C28D2CCFD965B1087860EB23
+1 ;;BEHALLERGIES.ALLERGIES;BEHAllergies.chm;2011.11.16.212212;82A261F35386CE5AC60D63E9C5C24D01
+2 ;;BEHMEDS.MEDMANAGEMENT;BEHMeds.chm;2011.11.16.212237;72064860D00A7B930D1B838CD9DF9375
+3 ;;VCQUICKNOTE.QUICKNOTE;vcQuickNote.chm;2011.11.16.212235;49186C1FF2461F4F134A19DB7AF9A46C
+4 ;;INDIANHEALTHSERVICE.BEH.IBH.SUICIDE.CONTROLS.CTLSUICIDE_FORM;Suicide_Form.chm;2011.11.16.212225;F8AAB04D8622E3B3B87871CB5517394A
+5 ;;BEHCRISES.CRISES;BEHCrises.chm;2011.11.16.212239;614E9A297213703EC59829B445601A91
+6 ;;BEHCCDC32.BEHC32BUTTON;C32_Viewer_Launch_Button.chm;2011.11.16.212340;E4BD868E0890A1142D19F0BB27617229
+7 ;;BEHCCDC32.BEHKMRBUTTON;C32_Viewer_Launch_Button.chm;2011.11.16.212340;E4BD868E0890A1142D19F0BB27617229
+8 ;;BEHCHARTREVIEW.CHARTREVIEW;BEHChartReview.chm;2011.11.16.212241;631262CE72E82A17E154A858864DDF5E
+9 ;;