CIAVINP7 ;MSC/IND/PLS - EHR v1.1p7 Inits;18-Jan-2011 07:46;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 REGMENU^BEHUTIL("BEHORXED MAIN",,"MEC","BEHORX MAIN")
;D BMES^XPDUTL("Attaching event protocols...")
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
; 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 ;;BEHVITALENTRY.VITALENTRY;2.0.4.72;A1F7065ECF8F5F9FCFDE3BA19FEDD47E
;;BEHVITALENTRY.VITALENTRY2;2.0.4.72;A1F7065ECF8F5F9FCFDE3BA19FEDD47E
;;BEHVITALS.VITALDISPLAY;5.0.4.3;F288B6B43FADC4D8F2F60376D5BC4B62
;;INDIANHEALTHSERVICE.BEH.IBH.SUICIDE.CONTROLS.CTLSUICIDE_FORM;1.1.3923.11673;7BAD3145F0A644A2B72BB863789C6570
;;
CIAVINP7 ;MSC/IND/PLS - EHR v1.1p7 Inits;18-Jan-2011 07:46;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 ;D REGMENU^BEHUTIL("BEHORXED MAIN",,"MEC","BEHORX MAIN")
+3 ;D BMES^XPDUTL("Attaching event protocols...")
+4 DO BMES^XPDUTL("Updating version numbers...")
+5 FOR VER=0:1
SET X=$PIECE($TEXT(VER+VER),";;",2)
IF '$LENGTH(X)
QUIT
Begin DoDot:1
+6 SET PID=$$PRGID^CIAVMCFG($PIECE(X,";"))
+7 IF PID
SET FDA(19930.2,PID_",",2)=$PIECE(X,";",2)
SET FDA(19930.2,PID_",",7)=$PIECE(X,";",3)
End DoDot:1
+8 IF $DATA(FDA)
DO FILE^DIE(,"FDA")
+9 WRITE !!!
+10 IF $LENGTH($$GETLOGIN^CIAVUTIL)
IF $$ASK^CIAU("Do you want to enable EHR logins","Y")
Begin DoDot:1
+11 DO SDABORT^CIAVUTIL(,1)
DO BMES^XPDUTL("Application logins have been enabled.")
End DoDot:1
+12 QUIT
+13 ; Attach Event Protocols to Event Types
EVTPRTL(TYPE) ;
+1 NEW EVTNM,PRT,EVT,FDA
+2 SET EVTNM="CIAV "_TYPE_" EVENT"
+3 SET EVT=$$EVENTIEN^CIANBEVT(TYPE)
+4 IF 'EVT
QUIT
+5 SET PRT=$$FIND1^DIC(101,,,EVTNM)
+6 IF 'PRT
QUIT
+7 SET FDA(19941.21,EVT_",",7)=PRT
+8 DO FILE^DIE(,"FDA")
+9 QUIT
+10 ; 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 ;;BEHVITALENTRY.VITALENTRY;2.0.4.72;A1F7065ECF8F5F9FCFDE3BA19FEDD47E
+1 ;;BEHVITALENTRY.VITALENTRY2;2.0.4.72;A1F7065ECF8F5F9FCFDE3BA19FEDD47E
+2 ;;BEHVITALS.VITALDISPLAY;5.0.4.3;F288B6B43FADC4D8F2F60376D5BC4B62
+3 ;;INDIANHEALTHSERVICE.BEH.IBH.SUICIDE.CONTROLS.CTLSUICIDE_FORM;1.1.3923.11673;7BAD3145F0A644A2B72BB863789C6570
+4 ;;