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

CIAVIP11.m

Go to the documentation of this file.
CIAVIP11 ;MSC/IND/PLS - EHR v1.1p11 Inits;14-Apr-2013 11:59;DKM
 ;;1.1;VUECENTRIC FRAMEWORK;;23-Oct-2006
 ;;Copyright 2000-2012, 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
 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(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
VER ;;BEHORDERS.ORDERENTRY;27.1.0.5;A9C50FD2D4A15C1ACC9B74AF591D467C
 ;;BEHOPTIONS.OPTIONS;1.1.3.4;2792F5AEF7857B6E4A226903946FDCF5
 ;;VCQUICKNOTE.QUICKNOTE;1.1.3.3;2B3F220C050242905A1798097F31B5DA
 ;;BEHCOMMUNITYINFO.COMMUNITYINFO;1.1.0.63;70809FC22D09F548D1F2B983DC2EC078
 ;;BEHINFOBTNSVC.INFOBTNSVC;1.1.0.12;B7F85E0CF3C373F731FD881537F3C473
 ;;BEHVITALS.VITALDISPLAY;5.0.4.8;01555E8EE26B3512EFB1C55CA3CDC0CD
 ;;BEHPHARMED.PHARMED;1.0.2.2;4B8CEA693160D24EB2F0F8E791D576A9
 ;;BEHRXGENERATORSERVICE.RXGENERATOR;1.0.0.80;E3162BC71F6D5BBDDB0D7352046E7C22
 ;;BEHREMINDERSVIEW.REMINDERSVIEW;4.2.4.1;68E946EE3985D3AB685B86E0D038E0A2
 ;;BEHESIGREVIEW.REVIEW;20.1.2.5;23E9021E2FC30E2E6BEFAA203DE61432
 ;;BEHESIGSERVICE.ESIGSERVICE;20.1.3.18;BCDFADB96FCFB9384F968B4F40DEE404
 ;;BEHQOWIZARD.QOWIZARD;1.1.4.21;7C8AE5E57AC5BC26555598005A67DDA4
 ;;INDIANHEALTHSERVICE.BEH.IBH.SUICIDE.CONTROLS.CTLSUICIDE_FORM;1.1.4300.2;F6849E21244EBBF9F84F557AE23569D8
 ;;
CHM ;;BEHMEDLIST.MEDLIST;BEHMedList.chm;2012.10.29.215058;72C8EC7337BD69A9D284EEE59066F74E
 ;;BEHALLERGIES.ALLERGIES;BEHAllergies.chm;2012.10.24.155448;49EFC4DBBE8205C58E3E3689AB499273
 ;;BEHCONSULTS.CONSULTS;BEHConsults.chm;2012.10.4.160054;8EC0A6EDC13EFB7B63949B6E567F8F71
 ;;BEHCRISES.CRISES;BEHCrises.chm;2012.10.4.185004;861E9CBEED95DF9CA9F2071FA1DC0A40
 ;;BEHDCSUMM.DCSUMM;BEHDCSumm.chm;2012.8.2.175800;A29D4FAB537E129FF8E9206BBAFF2879
 ;;BEHENCOUNTERINFO.ENCOUNTERINFO;BEHEncounterInfo.chm;2012.10.30.202908;477DB472D586FF8BFA59CCAA3294B2B8
 ;;BEHLABORDERS.LABORDERS;BEHLabOrders.chm;2012.10.11.125714;84492C04C475006B8490607CC569A94B
 ;;BEHNOTIFICATIONS.NOTIFICATIONS;BEHNotifications.chm;2012.10.16.193300;FFFFBEF96BFF2A35C9075A144F4A13B0
 ;;BEHPATIENTID.PATIENTID;BEHPatientID.chm;2012.8.3.183300;29BE120BA3919494C91DFE3D44FA0814
 ;;BEHPROBLEMLIST.PROBLEMLIST;BEHProblemList.chm;2012.10.31.160410;D8E6F21DCF75BDB76E244F638196BD8C
 ;;BEHMEDS.MEDMANAGEMENT;BEHMeds.chm;2012.10.29.181542;E3E30BB0CE1A796557597AFFD798F28A
 ;;BEHLAB.LABVIEW;BEHLab.chm;2012.8.10.180500;0F6BF48B7F7FA5FBC40068F11A8BBF4A
 ;;CSS_PATIENT.PATIENT;CSSPatient.chm;2012.8.17.132800;8006B186338962D3C903CEC2F864D21C
 ;;BEHNOTES.PROGRESSNOTES;BEHNotes.chm;2012.10.25.141030;BC557DBDA27694075FFC01615072B066
 ;;BEHVISITS.VISITS;BEHVisits.chm;2012.10.4.155432;9A0233B409799928C27D84DA435892E1
 ;;BEHREMINDERS.REMINDERS;BEHReminders.chm;2012.10.18.131922;AFEEA09F88DCA09C26C445E0473D769F
 ;;BEHREPORTS.REPORTS;BEHReports.chm;2012.10.25.190120;D1E50B5A2717E698514C63D7BA48C517
 ;;BEHPHARMED.PHARMED;BEHPharmEd.chm;2012.8.24.183516;257E5DF919E6D3953A7C6AB1C76E86DA
 ;;BEHREMINDERSVIEW.REMINDERSVIEW;BEHRemindersView.chm;2012.8.28.153600;9B3CFAEEDF196552C1418AA41C1E82E9
 ;;BEHVITALS.VITALDISPLAY;BEHVitals.chm;2012.8.28.194700;FE7BBBA024F78191F7F8053A051B287B
 ;;BEHORDERS.ORDERENTRY;BEHOrders.chm;2012.10.24.151004;B9FC01A02F5244EB4301BE71B302A616
 ;;VCQUICKNOTE.QUICKNOTE;vcQuickNote.chm;2012.9.6.163852;F568208DF803F2991A9A16C0093B5310
 ;;INDIANHEALTHSERVICE.BEH.POCLAB.BEHLABPOC;Lab_POC_Data_Entry.chm;2012.9.10.171300;F07331F5B9E8F6C69166D3A095FD822F
 ;;BEHLAB.LABVIEW;BEHLab.chm;2012.9.10.205400;D51962ACDFFD26D9C3EDFA58C56636D2
 ;;