Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: CIAVIP13

CIAVIP13.m

Go to the documentation of this file.
CIAVIP13 ;MSC/IND/PLS - EHR v1.1p13 Inits;11-Sep-2014 14:35;PLS
 ;;1.1;VUECENTRIC FRAMEWORK;;23-Oct-2006
 ;;Copyright 2000-2013, 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.")
 D UPDCHM
 D REGRPC
 Q
 ;Register RPCs to context
REGRPC ;EP-
 I $$REGRPC^CIAURPC("MAGJ USER2","CIAV VUECENTRIC")
 I $$REGRPC^CIAURPC("MAGG CPRS RAD EXAM","CIAV VUECENTRIC")
 I $$REGRPC^CIAURPC("MAG3 CPRS TIU NOTE","CIAV VUECENTRIC")
 I $$REGRPC^CIAURPC("BEHWEB DEFSURL","CIAV VUECENTRIC")
 I $$REGRPC^CIAURPC("BEHWEB GETSITES","CIAV VUECENTRIC")
 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
 ;
UPDCHM ;EP-
 N CHM,PID
 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,";",2,99))
 W !!
 Q
 ;
AECHM(PID,VAL) ;EP-
 N LN,FN,IDX,TXT,ARY,CNT,IENS
 S FN=$P(VAL,";"),CNT=0
 S LN=0 F  S LN=$O(^CIAVOBJ(19930.2,PID,6,LN)) Q:'LN  D  Q:$G(IDX)
 .S TXT=^CIAVOBJ(19930.2,PID,6,LN,0)
 .S ARY(LN,0)=TXT,CNT=CNT+1
 .I $$UP^XLFSTR(TXT)[$$UP^XLFSTR($P(VAL,";")) S IDX=LN
 I $G(IDX) D
 .S ^CIAVOBJ(19930.2,PID,6,IDX,0)=VAL
 E  D
 .S ARY($S('CNT:1,1:CNT+1),0)=VAL
 .S IENS=PID_","
 .S FDA(19930.2,IENS,10)="ARY"
 .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
 ; Set DISABLED field of OBJ to VAL
DISABLED(OBJ,VAL) ;
 N PID,FDA
 S VAL=$G(VAL,0)
 S PID=$$PRGID^CIAVMCFG($G(OBJ))
 Q:'PID
 S FDA(19930.2,PID_",",13)=VAL
 D FILE^DIE(,"FDA")
 Q
VER ;;BEHINFOBTNSVC.INFOBTNSVC;1.1.5367.16976;7D480F92BFF24F7D0CDD526DD0BE18FC
 ;;INDIANHEALTHSERVICE.BEH.POCLAB.BEHLABPOC;1.0.5002.21863;7E82525AFD5BA78368DDCDFEB1C5AE3A
 ;;INDIANHEALTHSERVICE.BEH.IBH.SUICIDE.CONTROLS.CTLSUICIDE_FORM;1.1.4300.3;4A6065FF0D7387E8726F1E65A8BD0711
 ;;
CHM ;;BEHMEDS.MEDMANAGEMENT;BEHMeds.chm;2014.4.17.140122;C7AFFF1ECF8D21C04F964D14128A917F
 ;;BEHORDERS.ORDERENTRY;BEHOrders.chm;2014.4.23.182228;B59BED410178BBA5C6D4BF3BF3758ED3
 ;;INDIANHEALTHSERVICE.BEH.POCLAB.BEHLABPOC;Lab_POC_Data_Entry.chm;2014.4.7.150254;26056B5A8B183EFFB213AB831099A234
 ;;BEHCONSULTS.CONSULTS;BEHConsults.chm;2014.4.9.142240;939899C0F488DB19EB2486D6EF7DB497
 ;;BEHLAB.LABVIEW;BEHLab.chm;2014.4.22.130832;7246E5B1C1F624CEF7A2225765B65631
 ;;