VENPCCME ; IHS/OIT/GIS - PCC+ ENVIRONMENT CHECKER ;
;;2.6;PCC+;;NOV 12, 2007
;
; CONTAINS 2.5 UPDATES
;
N OUT
D COMP(.OUT)
W !!,OUT
Q
;
COMP(OUT) ; EP-REQUIRED COMPONENT CHECK-UP
; PATCHED BY GIS/OIT 10/15/05 ; PCC+ 2.5 PATCH 1
N KIEN,TOT
S KIEN=$O(^XPD(9.6,"B","PCC+ 2.5",0))
I 'KIEN S OUT="Unable to find the KIDS installation record for PCC+ Version 2.5!" Q
S TOT=0
W ! I $$RTN S TOT=TOT+1
W ! I $$FILE S TOT=TOT+1
W ! I $$VR(KIEN) S TOT=TOT+1
W ! I $$VF(KIEN) S TOT=TOT+1
W ! I $$VOPT(KIEN) S TOT=TOT+1
W ! I $$VKEY(KIEN) S TOT=TOT+1
I TOT S OUT="PLEASE INSTALL THE MISSING COMPONENTS BEFORE PROCEEDING...." Q
S OUT="Everyting checks out OK..."
Q
;
RTN() ; EP-ENVIRONMENT CHECK
N X,Y,Z,N,I
S N=0
W !,"Checking Required RPMS routines...",!
S X="EN1^APCHS,^XBCLS,^XBKVAR,^XLFDT,^XBFMK,^AGVAR,^AGEDIT,^APCDALV,^BIRPC"
F I=1:1:$L(X,",") S Y=$P(X,",",I) D
. X ("S Z=$T("_Y_")")
. I '$L(Z) W !?3,"The routine "_$P(Y,U,2)_" is either missing or not the current version" S N=N+1
. Q
I N W "You must meed all prerequisites before installing PCC+ Ver. 2.5!" Q 1
W "All required RPMS routines seem to be present" Q 0
;
FILE() ; EP-CHECK FOR FILES
N X,Y,Z,N,A,I
S N=0
S X="^AUPNMCR;MEDICARE ELIGIBLE,^AUPNMCD;MEDICAID ELIGIBLE,^AUTNEMPL;EMPLOYER,^AUPNPRVT;PRIVATE INSURANCE ELIGIBLE,^AUTNINS;INSURER,^AUPN3PPH;POLICY HOLDER"
S X=X_",^AUPNBMSR;BIRTH MEASUREMNT,^BWDIAG;BW RESULTS/DIAGNOSIS,^BWPCD;BW PROCEDURE,^PSRX;PRESCRIPTION,^PSDRUG;DRUG"
W !,"Checking RPMS files...",!
F I=1:1:$L(X,",") S Y=$P(X,",",I) D
. S Z=$P(Y,";"),A=$P(Y,";",2)
. I '$D(@(Z_"(0)")) W !?3,"The file "_A_" is missing" S N=N+1
. Q
I N W "You must obtain the required RPMS files before proceeding!" Q 1
W "All required RPMS files seem to be present" Q 0
;
VF(KIEN) ; EP-CHECK FOR VEN 2.5 FILES VIA LATEST KIDS BUILD
N X,Y,Z,FIEN
S FIEN="",Z=0
W !,"Checking PCC+ files...",!
F S FIEN=$O(^XPD(9.6,KIEN,4,"B",FIEN)) Q:FIEN D
. S X=$P($G(^DIC(FIEN,"%D",0)),U,5)
. I X'<3050428 Q
. S Z=Z+1
. W "The PCC+ FILE "_FIEN_" is missing or not the current version",!
. S Z=Z+1
. Q
I Z W "You must install the current PCC+ package before proceeding!" Q 1
W "All required PCC+ files seem to be present and current" Q 0
;
VR(KIEN) ; EP-CHECK FOR VEN 2.5 ROUTINES
N X,Y,Z,NAME
S NAME="",Z=0
W !,"Checking PCC+ Routines...",!
F S NAME=$O(^XPD(9.6,KIEN,"KRN",9.8,"NM","B",NAME)) Q:NAME="" D
. S X="+2^"_NAME
. X "I $T("_X_")'["";2.5""" E Q
. W "The PCC+ routine "_NAME_" is missing or not the current version",!
. S Z=Z+1
. Q
I Z W "You must install the current PCC+ package before proceeding!" Q 1
W "All required PCC+ routines seem to be present and current" Q 0
;
VOPT(KIEN) ; EP-CHECK FOR VER 2.5 OPTIONS
N X,Y,Z,NAME
S NAME="",Z=0
W !,"Checking PCC+ Options...",!
F S NAME=$O(^XPD(9.6,KIEN,"KRN",19,"NM","B",NAME)) Q:NAME="" D
. S X=+$O(^DIC(19,"B",NAME,999999999),-1)
. I $D(^DIC(19,X,0)) Q
. W "The PCC+ Option / Menu item "_NAME_" is missing",!
. S Z=Z+1
. Q
I Z W "You must install the current PCC+ package before proceeding!" Q 1
W "All required PCC+ options seem to be present" Q 0
;
VKEY(KIEN) ; EP - CHECH FOR VER 2.5 KEYS
N X,Y,Z,NAME
S NAME="",Z=0
W !,"Checking PCC+ Security Keys...",!
F S NAME=$O(^XPD(9.6,KIEN,"KRN",19.1,"NM","B",NAME)) Q:NAME="" D
. S X=+$O(^DIC(19.1,"B",NAME,999999999),-1)
. I $D(^DIC(19.1,X,0)) Q ; PATCHED BY GIS/OIT 1/15/06 ; PCC+ 2.5 PATCH 2
. W "The PCC+ Security key "_NAME_" is missing",!
. S Z=Z+1
. Q
I Z W "You must install the current PCC+ package before proceeding!" Q 1
W "All required PCC+ security keys seem to be present" Q 0
;
OS() ; EP - RETURN THE OPERATING SYSTEM INFO
N V,O,X
X ("S X="_$C(36,90,86)) I '$L(X) S (V,O)="Unknown" D OS1(V,O) Q 1
S V=$S(X["MSM":"MSM",1:"CACHE")
S O=$S(X["UNIX":"UNIX",X["AIX":"AIX",1:"WINDOWS")
D OS1(V,O)
Q 0
;
OS1(V,O) ; EP - MORE OD INFO
W !,"Checking computing environment..."
W !?3,"PCC+ Version: ",+$P($T(+2^VENPCCME),";;",2)
W !?3,"MUMPS: ",V
W !?3,"Server Operating System: ",O
Q
;
CK(CFLG) ; EP - CHECK THE CONFIGURATION
S CFG=$$CFG^VENPCCU I 'CFG W !!,"NO PRIMARY CONFIGURATION DEFINED!!! SESSION TERMINATED" S CFLG=1 Q
S STG=$G(^VEN(7.5,CFG,0)) S IP=$G(^(11)) S SM=$G(^(4)) S VER=$P($G(^(13)),U)
S CDFN=$P(STG,U,2),TYPE=$P(STG,U,3),OS=$P(STG,U,4),MV=$P(STG,U,5)
S UNI=$P(STG,U,6),DEM=$P(STG,U,8),PULL=$P(STG,U,9),PHS=$P(STG,U,10)
S MON=$P(STG,U,11),BYP=$P(STG,U,12),GP=$P(STG,U,13),DP=$P(STG,U,14)
S CMED=$P(STG,U,16),BACK=$P(STG,U,17)
S EXRX=$P(STG,U,19),AUTO=$P(STG,U,21),ART=$P(STG,U,23)
S IP(1)=$P(IP,U,1),IP(2)=$P(IP,U,2),SOCK=$P(IP,U,3)
S PATH(1)=$G(^(1)),PATH(2)=$G(^(2)),PATH(3)=$G(^(3)),PATH(4)=$G(^(12))
CRES ; CONFIG RESULTS
RP ; REQUIRED PARAMETERS
; NO REQUIRED PIECES MISSING - YET...
I OS="" W !?5,"OPERATING SYSTEM IS UNSPECIFIED" S CFLG=1
I MV="" W !?5,"MUMPS VENDOR IS UNSPECIFIED" S CFLG=1
I 'CFLG D ; MAKE SURE OS AND MUMPS VENDOR ARE VALID IN CFG FILE
. S X=$C(83,32,37)_$C(61,36,90,86)
. X X S %=$$UP^XLFSTR(%)
. I OS=1,%'["UNIX",%'["AIX" S CFLG=1 W !?5,"Invalid OS in the PCC+ config file. Should be UNIX or AIX" Q
. I OS=0,%'["NT" S CFLG=1 W !?5,"Invalid OS in the PCC+ config file. Should be 'Windows NT'" Q
. I MV=2,%'["CACHE" S CFLG=1 W !?5,"Invalid MUMPS type in the config file" Q
. I MV=1,%'["MSM" S CFLG=1 W !?5,"Invalid MUMPS type in the config file" Q
. Q
I TYPE="" W !,?5,"FACILITY TYPE IS UNSPECIFIED" S CFLG=1
I MON W !?5,"THE CHECK IN PROCESS IS IN 'MONITOR MODE'. PLEASE TURN OFF MONITOR MODE NOW." S CFLG=1
I BYP W !?5,"THE PRINT DEAMON IS BEING BYPASSED. PLEASE TURN OFF 'BYPASS MODE' NOW." S CFLG=1
I '$D(^VA(200,+GP,0)) W !?5,"MISSING/INVALID GENERIC PROVIDER" S CFLAG=1
I '$D(^DPT(+DP,0)) W !?5,"MISSING/INVALID DEMO PATIENT" S CFLAG=1
I BACK S DIE="^VEN(7.5,",DA=CFG,DR=".17////0" L +^VEN(7.5,DA):0 D ^DIE L -^VEN(7.5,DA) ; FORCE NON-TASKMAN MODE
I 'CFLG W !?5,"DEMO patient validated",!?5,"Generic provider validated"
PATH S DA=CFG F I=1:1:4 S X=$G(PATH(I)) D
. I X="" W !?5,"THE PATH TO THE ",$P("PRINT (DATA)^HEADER^TEMPORARY^USER PREFERENCE",U,I)," FILE FOLDER IS MISSING" S CFLG=1 Q
. S Y=$$SLASH^VENPCCU(X) I Y=X Q
. W !?5,"INVALID PATH: ",X I Y="" Q
. W " SUGGESTED CORRECTION: ",Y
. Q
PVAL ; NOW CHECK INTEGRITY OF EA. PATH
F I=1:1:4 S PATH=PATH(I) D
. S %=$$OPN^VENPCCP(PATH,"itest.txt","W","W 123")
. I % S CFLG=1 W !?5,"Unable to access '"_PATH(I)_"'. Check path/permissions!" Q
. K X S %=$$OPN^VENPCCP(PATH,"itest.txt","R","R X")
. I % S CFLG=1 W !?5,"Unable to access '"_PATH(I)_"'. Check path/permissions!" Q
. I $G(X)'=123 W !?5,"Read/write failue in directory '"_PATH(I) S CFLG=1 Q
. D DEL^VENPCCP(PATH(I),"itest.txt") ; CLEANUP
. Q
I CFLG Q
W !?5,"PCC+ directories are valid"
;
I $L(SM) G AUTO
V25 ; VER25
I VER G SMINFO
W !!,"You have not converted to the PCC+ Ver. 2.5 data file format yet."
W !,"(This is RECOMMENDED if converting to Print Service, Ver. 2.5)" ; PATCHED BY GIS/OIT 10/15/05 ; PCC+ 2.5 PATCH 1
W !,"Do you want to make the conversion"
S %=1 D YN^DICN
I %=1 S DIE="^VEN(7.5,",DA=CFG,DR="13.01////1" L +^VEN(7.5,DA):0 D ^DIE L -^VEN(7.5,DA) S VER=1
SMINFO ; GET SITE MGR INFO
W !!,"You have not entered your brief site manager contact information yet"
W !,"Please enter it now (e.g., 'For assistance, please call Mary Jones at ext. 4321')"
S DIE="^VEN(7.5,",DA=CFG,DR=4
L +^VEN(7.5,DA):0 D ^DIE L -^VEN(7.5,DA)
S SM=$G(^VEN(7.5,CFG,4))
AUTO ; CHECK AUTO CLEAN UP FEATURE
I AUTO G CK2
W !?5,"The auto-cleanup feature for the pending document folder"
W !,"('\print' dirrectory) has not been activated yet."
W !,"Want to activate this feature now (RECOMMENDED)"
S %=1 D YN^DICN
I %'=1 G CK2
S DIE="^VEN(7.5,",DA=CFG,DR=".21////1"
L +^VEN(7.5,DA):0 D ^DIE L -^VEN(7.5,DA)
S AUTO=1
CK2 W !,"The primary configuration is valid."
W !!,"Additional configuration info: "
RX I '$O(^PSRX(0)) W !?5,"Your PRESCRIPTION FILE is not populated. Are you using a Viking System???"
I '$O(^PSRX(0)),$P($G(^VEN(7.5,CFG,0)),U,16) W !?10,"Unable to display chronic meds or other special Rx details"
I $O(^PSRX(0)),$P($G(^VEN(7.5,CFG,0)),U,16) W !?10,"Chronic med filter will be applied to all PCC+ templates"
I '$O(^PSRX(0)),$P($G(^VEN(7.5,CFG,0)),U,17) W !?10,"Unable to display expanded sigs"
I $O(^PSRX(0)),$P($G(^VEN(7.5,CFG,0)),U,17) W !?10,"Expanded sigs will be displayed on all PCC+ templates"
I $L(TYPE) W !?10,"FACILITY TYPE: ",$$GET1^DIQ(19707.5,(CFG_","),.03)
W !?10,"VER 2.5 DATA FILE FORMAT: ",$S(VER:"YES",1:"NO")
I $L(SM) W !?10,"SITE MANAGER MESSAGE: ",SM
W !?10,"AUTOMATIC CLEANUP OF PRINT FOLDER: ",$S(AUTO:"YES",1:"NO")
W !?10,"EDIT DEMOGRAPHICS DURING CHECK-IN: ",$S(DEM:"YES",1:"NO")
W !?10,"ASK TO PULL CHART DURING CHECK-IN: ",$S(PULL:"YES",1:"NO")
W !?10,"ALWAYS PRINT HEALTH SUMMARY IN MED RECORDS: ",$S(PHS:"YES",1:"NO")
W !?10,"USE THE ADVERSE REACTION TRACKING PKG TO MONITOR ALLERGIES: ",$S(ART:"YES",1:"NO")
Q
;
VENPCCME ; IHS/OIT/GIS - PCC+ ENVIRONMENT CHECKER ;
+1 ;;2.6;PCC+;;NOV 12, 2007
+2 ;
+3 ; CONTAINS 2.5 UPDATES
+4 ;
+5 NEW OUT
+6 DO COMP(.OUT)
+7 WRITE !!,OUT
+8 QUIT
+9 ;
COMP(OUT) ; EP-REQUIRED COMPONENT CHECK-UP
+1 ; PATCHED BY GIS/OIT 10/15/05 ; PCC+ 2.5 PATCH 1
+2 NEW KIEN,TOT
+3 SET KIEN=$ORDER(^XPD(9.6,"B","PCC+ 2.5",0))
+4 IF 'KIEN
SET OUT="Unable to find the KIDS installation record for PCC+ Version 2.5!"
QUIT
+5 SET TOT=0
+6 WRITE !
IF $$RTN
SET TOT=TOT+1
+7 WRITE !
IF $$FILE
SET TOT=TOT+1
+8 WRITE !
IF $$VR(KIEN)
SET TOT=TOT+1
+9 WRITE !
IF $$VF(KIEN)
SET TOT=TOT+1
+10 WRITE !
IF $$VOPT(KIEN)
SET TOT=TOT+1
+11 WRITE !
IF $$VKEY(KIEN)
SET TOT=TOT+1
+12 IF TOT
SET OUT="PLEASE INSTALL THE MISSING COMPONENTS BEFORE PROCEEDING...."
QUIT
+13 SET OUT="Everyting checks out OK..."
+14 QUIT
+15 ;
RTN() ; EP-ENVIRONMENT CHECK
+1 NEW X,Y,Z,N,I
+2 SET N=0
+3 WRITE !,"Checking Required RPMS routines...",!
+4 SET X="EN1^APCHS,^XBCLS,^XBKVAR,^XLFDT,^XBFMK,^AGVAR,^AGEDIT,^APCDALV,^BIRPC"
+5 FOR I=1:1:$LENGTH(X,",")
SET Y=$PIECE(X,",",I)
Begin DoDot:1
+6 XECUTE ("S Z=$T("_Y_")")
+7 IF '$LENGTH(Z)
WRITE !?3,"The routine "_$PIECE(Y,U,2)_" is either missing or not the current version"
SET N=N+1
+8 QUIT
End DoDot:1
+9 IF N
WRITE "You must meed all prerequisites before installing PCC+ Ver. 2.5!"
QUIT 1
+10 WRITE "All required RPMS routines seem to be present"
QUIT 0
+11 ;
FILE() ; EP-CHECK FOR FILES
+1 NEW X,Y,Z,N,A,I
+2 SET N=0
+3 SET X="^AUPNMCR;MEDICARE ELIGIBLE,^AUPNMCD;MEDICAID ELIGIBLE,^AUTNEMPL;EMPLOYER,^AUPNPRVT;PRIVATE INSURANCE ELIGIBLE,^AUTNINS;INSURER,^AUPN3PPH;POLICY HOLDER"
+4 SET X=X_",^AUPNBMSR;BIRTH MEASUREMNT,^BWDIAG;BW RESULTS/DIAGNOSIS,^BWPCD;BW PROCEDURE,^PSRX;PRESCRIPTION,^PSDRUG;DRUG"
+5 WRITE !,"Checking RPMS files...",!
+6 FOR I=1:1:$LENGTH(X,",")
SET Y=$PIECE(X,",",I)
Begin DoDot:1
+7 SET Z=$PIECE(Y,";")
SET A=$PIECE(Y,";",2)
+8 IF '$DATA(@(Z_"(0)"))
WRITE !?3,"The file "_A_" is missing"
SET N=N+1
+9 QUIT
End DoDot:1
+10 IF N
WRITE "You must obtain the required RPMS files before proceeding!"
QUIT 1
+11 WRITE "All required RPMS files seem to be present"
QUIT 0
+12 ;
VF(KIEN) ; EP-CHECK FOR VEN 2.5 FILES VIA LATEST KIDS BUILD
+1 NEW X,Y,Z,FIEN
+2 SET FIEN=""
SET Z=0
+3 WRITE !,"Checking PCC+ files...",!
+4 FOR
SET FIEN=$ORDER(^XPD(9.6,KIEN,4,"B",FIEN))
IF FIEN
QUIT
Begin DoDot:1
+5 SET X=$PIECE($GET(^DIC(FIEN,"%D",0)),U,5)
+6 IF X'<3050428
QUIT
+7 SET Z=Z+1
+8 WRITE "The PCC+ FILE "_FIEN_" is missing or not the current version",!
+9 SET Z=Z+1
+10 QUIT
End DoDot:1
+11 IF Z
WRITE "You must install the current PCC+ package before proceeding!"
QUIT 1
+12 WRITE "All required PCC+ files seem to be present and current"
QUIT 0
+13 ;
VR(KIEN) ; EP-CHECK FOR VEN 2.5 ROUTINES
+1 NEW X,Y,Z,NAME
+2 SET NAME=""
SET Z=0
+3 WRITE !,"Checking PCC+ Routines...",!
+4 FOR
SET NAME=$ORDER(^XPD(9.6,KIEN,"KRN",9.8,"NM","B",NAME))
IF NAME=""
QUIT
Begin DoDot:1
+5 SET X="+2^"_NAME
+6 XECUTE "I $T("_X_")'["";2.5"""
IF '$TEST
QUIT
+7 WRITE "The PCC+ routine "_NAME_" is missing or not the current version",!
+8 SET Z=Z+1
+9 QUIT
End DoDot:1
+10 IF Z
WRITE "You must install the current PCC+ package before proceeding!"
QUIT 1
+11 WRITE "All required PCC+ routines seem to be present and current"
QUIT 0
+12 ;
VOPT(KIEN) ; EP-CHECK FOR VER 2.5 OPTIONS
+1 NEW X,Y,Z,NAME
+2 SET NAME=""
SET Z=0
+3 WRITE !,"Checking PCC+ Options...",!
+4 FOR
SET NAME=$ORDER(^XPD(9.6,KIEN,"KRN",19,"NM","B",NAME))
IF NAME=""
QUIT
Begin DoDot:1
+5 SET X=+$ORDER(^DIC(19,"B",NAME,999999999),-1)
+6 IF $DATA(^DIC(19,X,0))
QUIT
+7 WRITE "The PCC+ Option / Menu item "_NAME_" is missing",!
+8 SET Z=Z+1
+9 QUIT
End DoDot:1
+10 IF Z
WRITE "You must install the current PCC+ package before proceeding!"
QUIT 1
+11 WRITE "All required PCC+ options seem to be present"
QUIT 0
+12 ;
VKEY(KIEN) ; EP - CHECH FOR VER 2.5 KEYS
+1 NEW X,Y,Z,NAME
+2 SET NAME=""
SET Z=0
+3 WRITE !,"Checking PCC+ Security Keys...",!
+4 FOR
SET NAME=$ORDER(^XPD(9.6,KIEN,"KRN",19.1,"NM","B",NAME))
IF NAME=""
QUIT
Begin DoDot:1
+5 SET X=+$ORDER(^DIC(19.1,"B",NAME,999999999),-1)
+6 ; PATCHED BY GIS/OIT 1/15/06 ; PCC+ 2.5 PATCH 2
IF $DATA(^DIC(19.1,X,0))
QUIT
+7 WRITE "The PCC+ Security key "_NAME_" is missing",!
+8 SET Z=Z+1
+9 QUIT
End DoDot:1
+10 IF Z
WRITE "You must install the current PCC+ package before proceeding!"
QUIT 1
+11 WRITE "All required PCC+ security keys seem to be present"
QUIT 0
+12 ;
OS() ; EP - RETURN THE OPERATING SYSTEM INFO
+1 NEW V,O,X
+2 XECUTE ("S X="_$CHAR(36,90,86))
IF '$LENGTH(X)
SET (V,O)="Unknown"
DO OS1(V,O)
QUIT 1
+3 SET V=$SELECT(X["MSM":"MSM",1:"CACHE")
+4 SET O=$SELECT(X["UNIX":"UNIX",X["AIX":"AIX",1:"WINDOWS")
+5 DO OS1(V,O)
+6 QUIT 0
+7 ;
OS1(V,O) ; EP - MORE OD INFO
+1 WRITE !,"Checking computing environment..."
+2 WRITE !?3,"PCC+ Version: ",+$PIECE($TEXT(+2^VENPCCME),";;",2)
+3 WRITE !?3,"MUMPS: ",V
+4 WRITE !?3,"Server Operating System: ",O
+5 QUIT
+6 ;
CK(CFLG) ; EP - CHECK THE CONFIGURATION
+1 SET CFG=$$CFG^VENPCCU
IF 'CFG
WRITE !!,"NO PRIMARY CONFIGURATION DEFINED!!! SESSION TERMINATED"
SET CFLG=1
QUIT
+2 SET STG=$GET(^VEN(7.5,CFG,0))
SET IP=$GET(^(11))
SET SM=$GET(^(4))
SET VER=$PIECE($GET(^(13)),U)
+3 SET CDFN=$PIECE(STG,U,2)
SET TYPE=$PIECE(STG,U,3)
SET OS=$PIECE(STG,U,4)
SET MV=$PIECE(STG,U,5)
+4 SET UNI=$PIECE(STG,U,6)
SET DEM=$PIECE(STG,U,8)
SET PULL=$PIECE(STG,U,9)
SET PHS=$PIECE(STG,U,10)
+5 SET MON=$PIECE(STG,U,11)
SET BYP=$PIECE(STG,U,12)
SET GP=$PIECE(STG,U,13)
SET DP=$PIECE(STG,U,14)
+6 SET CMED=$PIECE(STG,U,16)
SET BACK=$PIECE(STG,U,17)
+7 SET EXRX=$PIECE(STG,U,19)
SET AUTO=$PIECE(STG,U,21)
SET ART=$PIECE(STG,U,23)
+8 SET IP(1)=$PIECE(IP,U,1)
SET IP(2)=$PIECE(IP,U,2)
SET SOCK=$PIECE(IP,U,3)
+9 SET PATH(1)=$GET(^(1))
SET PATH(2)=$GET(^(2))
SET PATH(3)=$GET(^(3))
SET PATH(4)=$GET(^(12))
CRES ; CONFIG RESULTS
RP ; REQUIRED PARAMETERS
+1 ; NO REQUIRED PIECES MISSING - YET...
+2 IF OS=""
WRITE !?5,"OPERATING SYSTEM IS UNSPECIFIED"
SET CFLG=1
+3 IF MV=""
WRITE !?5,"MUMPS VENDOR IS UNSPECIFIED"
SET CFLG=1
+4 ; MAKE SURE OS AND MUMPS VENDOR ARE VALID IN CFG FILE
IF 'CFLG
Begin DoDot:1
+5 SET X=$CHAR(83,32,37)_$CHAR(61,36,90,86)
+6 XECUTE X
SET %=$$UP^XLFSTR(%)
+7 IF OS=1
IF %'["UNIX"
IF %'["AIX"
SET CFLG=1
WRITE !?5,"Invalid OS in the PCC+ config file. Should be UNIX or AIX"
QUIT
+8 IF OS=0
IF %'["NT"
SET CFLG=1
WRITE !?5,"Invalid OS in the PCC+ config file. Should be 'Windows NT'"
QUIT
+9 IF MV=2
IF %'["CACHE"
SET CFLG=1
WRITE !?5,"Invalid MUMPS type in the config file"
QUIT
+10 IF MV=1
IF %'["MSM"
SET CFLG=1
WRITE !?5,"Invalid MUMPS type in the config file"
QUIT
+11 QUIT
End DoDot:1
+12 IF TYPE=""
WRITE !,?5,"FACILITY TYPE IS UNSPECIFIED"
SET CFLG=1
+13 IF MON
WRITE !?5,"THE CHECK IN PROCESS IS IN 'MONITOR MODE'. PLEASE TURN OFF MONITOR MODE NOW."
SET CFLG=1
+14 IF BYP
WRITE !?5,"THE PRINT DEAMON IS BEING BYPASSED. PLEASE TURN OFF 'BYPASS MODE' NOW."
SET CFLG=1
+15 IF '$DATA(^VA(200,+GP,0))
WRITE !?5,"MISSING/INVALID GENERIC PROVIDER"
SET CFLAG=1
+16 IF '$DATA(^DPT(+DP,0))
WRITE !?5,"MISSING/INVALID DEMO PATIENT"
SET CFLAG=1
+17 ; FORCE NON-TASKMAN MODE
IF BACK
SET DIE="^VEN(7.5,"
SET DA=CFG
SET DR=".17////0"
LOCK +^VEN(7.5,DA):0
DO ^DIE
LOCK -^VEN(7.5,DA)
+18 IF 'CFLG
WRITE !?5,"DEMO patient validated",!?5,"Generic provider validated"
PATH SET DA=CFG
FOR I=1:1:4
SET X=$GET(PATH(I))
Begin DoDot:1
+1 IF X=""
WRITE !?5,"THE PATH TO THE ",$PIECE("PRINT (DATA)^HEADER^TEMPORARY^USER PREFERENCE",U,I)," FILE FOLDER IS MISSING"
SET CFLG=1
QUIT
+2 SET Y=$$SLASH^VENPCCU(X)
IF Y=X
QUIT
+3 WRITE !?5,"INVALID PATH: ",X
IF Y=""
QUIT
+4 WRITE " SUGGESTED CORRECTION: ",Y
+5 QUIT
End DoDot:1
PVAL ; NOW CHECK INTEGRITY OF EA. PATH
+1 FOR I=1:1:4
SET PATH=PATH(I)
Begin DoDot:1
+2 SET %=$$OPN^VENPCCP(PATH,"itest.txt","W","W 123")
+3 IF %
SET CFLG=1
WRITE !?5,"Unable to access '"_PATH(I)_"'. Check path/permissions!"
QUIT
+4 KILL X
SET %=$$OPN^VENPCCP(PATH,"itest.txt","R","R X")
+5 IF %
SET CFLG=1
WRITE !?5,"Unable to access '"_PATH(I)_"'. Check path/permissions!"
QUIT
+6 IF $GET(X)'=123
WRITE !?5,"Read/write failue in directory '"_PATH(I)
SET CFLG=1
QUIT
+7 ; CLEANUP
DO DEL^VENPCCP(PATH(I),"itest.txt")
+8 QUIT
End DoDot:1
+9 IF CFLG
QUIT
+10 WRITE !?5,"PCC+ directories are valid"
+11 ;
+12 IF $LENGTH(SM)
GOTO AUTO
V25 ; VER25
+1 IF VER
GOTO SMINFO
+2 WRITE !!,"You have not converted to the PCC+ Ver. 2.5 data file format yet."
+3 ; PATCHED BY GIS/OIT 10/15/05 ; PCC+ 2.5 PATCH 1
WRITE !,"(This is RECOMMENDED if converting to Print Service, Ver. 2.5)"
+4 WRITE !,"Do you want to make the conversion"
+5 SET %=1
DO YN^DICN
+6 IF %=1
SET DIE="^VEN(7.5,"
SET DA=CFG
SET DR="13.01////1"
LOCK +^VEN(7.5,DA):0
DO ^DIE
LOCK -^VEN(7.5,DA)
SET VER=1
SMINFO ; GET SITE MGR INFO
+1 WRITE !!,"You have not entered your brief site manager contact information yet"
+2 WRITE !,"Please enter it now (e.g., 'For assistance, please call Mary Jones at ext. 4321')"
+3 SET DIE="^VEN(7.5,"
SET DA=CFG
SET DR=4
+4 LOCK +^VEN(7.5,DA):0
DO ^DIE
LOCK -^VEN(7.5,DA)
+5 SET SM=$GET(^VEN(7.5,CFG,4))
AUTO ; CHECK AUTO CLEAN UP FEATURE
+1 IF AUTO
GOTO CK2
+2 WRITE !?5,"The auto-cleanup feature for the pending document folder"
+3 WRITE !,"('\print' dirrectory) has not been activated yet."
+4 WRITE !,"Want to activate this feature now (RECOMMENDED)"
+5 SET %=1
DO YN^DICN
+6 IF %'=1
GOTO CK2
+7 SET DIE="^VEN(7.5,"
SET DA=CFG
SET DR=".21////1"
+8 LOCK +^VEN(7.5,DA):0
DO ^DIE
LOCK -^VEN(7.5,DA)
+9 SET AUTO=1
CK2 WRITE !,"The primary configuration is valid."
+1 WRITE !!,"Additional configuration info: "
RX IF '$ORDER(^PSRX(0))
WRITE !?5,"Your PRESCRIPTION FILE is not populated. Are you using a Viking System???"
+1 IF '$ORDER(^PSRX(0))
IF $PIECE($GET(^VEN(7.5,CFG,0)),U,16)
WRITE !?10,"Unable to display chronic meds or other special Rx details"
+2 IF $ORDER(^PSRX(0))
IF $PIECE($GET(^VEN(7.5,CFG,0)),U,16)
WRITE !?10,"Chronic med filter will be applied to all PCC+ templates"
+3 IF '$ORDER(^PSRX(0))
IF $PIECE($GET(^VEN(7.5,CFG,0)),U,17)
WRITE !?10,"Unable to display expanded sigs"
+4 IF $ORDER(^PSRX(0))
IF $PIECE($GET(^VEN(7.5,CFG,0)),U,17)
WRITE !?10,"Expanded sigs will be displayed on all PCC+ templates"
+5 IF $LENGTH(TYPE)
WRITE !?10,"FACILITY TYPE: ",$$GET1^DIQ(19707.5,(CFG_","),.03)
+6 WRITE !?10,"VER 2.5 DATA FILE FORMAT: ",$SELECT(VER:"YES",1:"NO")
+7 IF $LENGTH(SM)
WRITE !?10,"SITE MANAGER MESSAGE: ",SM
+8 WRITE !?10,"AUTOMATIC CLEANUP OF PRINT FOLDER: ",$SELECT(AUTO:"YES",1:"NO")
+9 WRITE !?10,"EDIT DEMOGRAPHICS DURING CHECK-IN: ",$SELECT(DEM:"YES",1:"NO")
+10 WRITE !?10,"ASK TO PULL CHART DURING CHECK-IN: ",$SELECT(PULL:"YES",1:"NO")
+11 WRITE !?10,"ALWAYS PRINT HEALTH SUMMARY IN MED RECORDS: ",$SELECT(PHS:"YES",1:"NO")
+12 WRITE !?10,"USE THE ADVERSE REACTION TRACKING PKG TO MONITOR ALLERGIES: ",$SELECT(ART:"YES",1:"NO")
+13 QUIT
+14 ;