PXRMV2E ; SLC/PKR - Environment check for PXRM*2.0. ;12/17/2004
;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
;
;===============================================================
ENVCHK ;Perform an environment check. Check for the existence of the globals
;that are indexed. If they exist then the index for that global must
;be built before v2.0 can be installed.
N DIR,DIROUT,DIRUT,DTOUT,DUOUT,GNAME,NE,NG,NI,TEXTG,TEXTI,X,Y
;Ask if this is a Legacy system, if it is then don't require the
;index being built.
S DIR(0)="Y"_U_"AO",DIR("B")="NO"
W !,"Is this a Legacy system?"
D ^DIR
I Y Q
S (NG,NI)=2
;
;LABORATORY TEST
D CHECK(63,.NG,.TEXTG,.NI,.TEXTI)
;
;MENTAL HEALTH
D CHECK(601.2,.NG,.TEXTG,.NI,.TEXTI)
;
;ORDERS
D CHECK(100,.NG,.TEXTG,.NI,.TEXTI)
;
;PTF
D CHECK(45,.NG,.TEXTG,.NI,.TEXTI)
;
;PHARMACY PATIENT
D CHECK(55,.NG,.TEXTG,.NI,.TEXTI)
;
;PRESCRIPTION
D CHECK(52,.NG,.TEXTG,.NI,.TEXTI)
;
;PROBLEM LIST
D CHECK(9000011,.NG,.TEXTG,.NI,.TEXTI)
;
;RADIOLOGY
D CHECK(70,.NG,.TEXTG,.NI,.TEXTI)
;
;V CPT
D CHECK(9000010.18,.NG,.TEXTG,.NI,.TEXTI)
;
;V EXAM
D CHECK(9000010.13,.NG,.TEXTG,.NI,.TEXTI)
;
;V IMMUNIZATION
D CHECK(9000010.11,.NG,.TEXTG,.NI,.TEXTI)
;
;V PATIENT ED
D CHECK(9000010.16,.NG,.TEXTG,.NI,.TEXTI)
;
;V POV
D CHECK(9000010.07,.NG,.TEXTG,.NI,.TEXTI)
;
;V SKIN TEST
D CHECK(9000010.12,.NG,.TEXTG,.NI,.TEXTI)
;
;VITAL MEASUREMENT
D CHECK(120.5,.NG,.TEXTG,.NI,.TEXTI)
;
I NI>2 S XPDABORT=1
I $G(XPDABORT) D
. S TEXTI(1)="Clinical Reminders v2.0 cannot be installed because the following indexes"
. S TEXTI(2)="are not built:"
. D EN^DDIOL(.TEXTI)
E D
. S TEXTI(1)="Environment check passed, ok to install Clinical Reminders v2.0"
. D EN^DDIOL(.TEXTI)
;
I NG>2 D
. S TEXTG(1)=" "
. I NG=3 S TEXTG(2)="The following global does not have data or does not exist:"
. I NG>3 S TEXTG(2)="The following globals do not have data or do not exist:"
. S NG=NG+1,TEXTG(NG)="Because of this Clinical Reminder evaluation may not operate correctly on your system!"
. D EN^DDIOL(.TEXTG)
Q
;
;===============================================================
CHECK(FNUM,NG,TEXTG,NI,TEXTI) ;
N GNAME,NE
S GNAME=$$GET1^DID(FNUM,"","","NAME")
S NE=$$GET1^DID(FNUM,"","","ENTRIES")
I NE="" S NG=NG+1,TEXTG(NG)=" "_GNAME_" does not exist"
I NE=0 S NG=NG+1,TEXTG(NG)=" "_GNAME_" does not have any data"
I (NE>0)&'$D(^PXRMINDX(FNUM,"DATE BUILT")) S NI=NI+1,TEXTI(NI)=" "_GNAME
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMV2E 2539 printed Nov 22, 2024@16:59:57 Page 2
PXRMV2E ; SLC/PKR - Environment check for PXRM*2.0. ;12/17/2004
+1 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
+2 ;
+3 ;===============================================================
ENVCHK ;Perform an environment check. Check for the existence of the globals
+1 ;that are indexed. If they exist then the index for that global must
+2 ;be built before v2.0 can be installed.
+3 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT,GNAME,NE,NG,NI,TEXTG,TEXTI,X,Y
+4 ;Ask if this is a Legacy system, if it is then don't require the
+5 ;index being built.
+6 SET DIR(0)="Y"_U_"AO"
SET DIR("B")="NO"
+7 WRITE !,"Is this a Legacy system?"
+8 DO ^DIR
+9 IF Y
QUIT
+10 SET (NG,NI)=2
+11 ;
+12 ;LABORATORY TEST
+13 DO CHECK(63,.NG,.TEXTG,.NI,.TEXTI)
+14 ;
+15 ;MENTAL HEALTH
+16 DO CHECK(601.2,.NG,.TEXTG,.NI,.TEXTI)
+17 ;
+18 ;ORDERS
+19 DO CHECK(100,.NG,.TEXTG,.NI,.TEXTI)
+20 ;
+21 ;PTF
+22 DO CHECK(45,.NG,.TEXTG,.NI,.TEXTI)
+23 ;
+24 ;PHARMACY PATIENT
+25 DO CHECK(55,.NG,.TEXTG,.NI,.TEXTI)
+26 ;
+27 ;PRESCRIPTION
+28 DO CHECK(52,.NG,.TEXTG,.NI,.TEXTI)
+29 ;
+30 ;PROBLEM LIST
+31 DO CHECK(9000011,.NG,.TEXTG,.NI,.TEXTI)
+32 ;
+33 ;RADIOLOGY
+34 DO CHECK(70,.NG,.TEXTG,.NI,.TEXTI)
+35 ;
+36 ;V CPT
+37 DO CHECK(9000010.18,.NG,.TEXTG,.NI,.TEXTI)
+38 ;
+39 ;V EXAM
+40 DO CHECK(9000010.13,.NG,.TEXTG,.NI,.TEXTI)
+41 ;
+42 ;V IMMUNIZATION
+43 DO CHECK(9000010.11,.NG,.TEXTG,.NI,.TEXTI)
+44 ;
+45 ;V PATIENT ED
+46 DO CHECK(9000010.16,.NG,.TEXTG,.NI,.TEXTI)
+47 ;
+48 ;V POV
+49 DO CHECK(9000010.07,.NG,.TEXTG,.NI,.TEXTI)
+50 ;
+51 ;V SKIN TEST
+52 DO CHECK(9000010.12,.NG,.TEXTG,.NI,.TEXTI)
+53 ;
+54 ;VITAL MEASUREMENT
+55 DO CHECK(120.5,.NG,.TEXTG,.NI,.TEXTI)
+56 ;
+57 IF NI>2
SET XPDABORT=1
+58 IF $GET(XPDABORT)
Begin DoDot:1
+59 SET TEXTI(1)="Clinical Reminders v2.0 cannot be installed because the following indexes"
+60 SET TEXTI(2)="are not built:"
+61 DO EN^DDIOL(.TEXTI)
End DoDot:1
+62 IF '$TEST
Begin DoDot:1
+63 SET TEXTI(1)="Environment check passed, ok to install Clinical Reminders v2.0"
+64 DO EN^DDIOL(.TEXTI)
End DoDot:1
+65 ;
+66 IF NG>2
Begin DoDot:1
+67 SET TEXTG(1)=" "
+68 IF NG=3
SET TEXTG(2)="The following global does not have data or does not exist:"
+69 IF NG>3
SET TEXTG(2)="The following globals do not have data or do not exist:"
+70 SET NG=NG+1
SET TEXTG(NG)="Because of this Clinical Reminder evaluation may not operate correctly on your system!"
+71 DO EN^DDIOL(.TEXTG)
End DoDot:1
+72 QUIT
+73 ;
+74 ;===============================================================
CHECK(FNUM,NG,TEXTG,NI,TEXTI) ;
+1 NEW GNAME,NE
+2 SET GNAME=$$GET1^DID(FNUM,"","","NAME")
+3 SET NE=$$GET1^DID(FNUM,"","","ENTRIES")
+4 IF NE=""
SET NG=NG+1
SET TEXTG(NG)=" "_GNAME_" does not exist"
+5 IF NE=0
SET NG=NG+1
SET TEXTG(NG)=" "_GNAME_" does not have any data"
+6 IF (NE>0)&'$DATA(^PXRMINDX(FNUM,"DATE BUILT"))
SET NI=NI+1
SET TEXTI(NI)=" "_GNAME
+7 QUIT
+8 ;