- 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
- I $$VERSION^XPDUTL("PXRM")="2.0" S XPDABORT=1,TEXTI(1)="Reminders 2.0 has already been installed" D EN^DDIOL(.TEXTI) Q
- ;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
- ;
- 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 IF $$VERSION^XPDUTL("PXRM")="2.0"
- SET XPDABORT=1
- SET TEXTI(1)="Reminders 2.0 has already been installed"
- DO EN^DDIOL(.TEXTI)
- QUIT
- +5 ;Ask if this is a Legacy system, if it is then don't require the
- +6 ;index being built.
- +7 SET DIR(0)="Y"_U_"AO"
- SET DIR("B")="NO"
- +8 WRITE !,"Is this a Legacy system?"
- +9 DO ^DIR
- +10 IF Y
- QUIT
- +11 SET (NG,NI)=2
- +12 ;
- +13 ;LABORATORY TEST
- +14 DO CHECK(63,.NG,.TEXTG,.NI,.TEXTI)
- +15 ;
- +16 ;MENTAL HEALTH
- +17 ;D CHECK(601.2,.NG,.TEXTG,.NI,.TEXTI)
- +18 ;
- +19 ;ORDERS
- +20 DO CHECK(100,.NG,.TEXTG,.NI,.TEXTI)
- +21 ;
- +22 ;PTF
- +23 ;D CHECK(45,.NG,.TEXTG,.NI,.TEXTI)
- +24 ;
- +25 ;PHARMACY PATIENT
- +26 DO CHECK(55,.NG,.TEXTG,.NI,.TEXTI)
- +27 ;
- +28 ;PRESCRIPTION
- +29 DO CHECK(52,.NG,.TEXTG,.NI,.TEXTI)
- +30 ;
- +31 ;PROBLEM LIST
- +32 DO CHECK(9000011,.NG,.TEXTG,.NI,.TEXTI)
- +33 ;
- +34 ;RADIOLOGY
- +35 DO CHECK(70,.NG,.TEXTG,.NI,.TEXTI)
- +36 ;
- +37 ;V CPT
- +38 DO CHECK(9000010.18,.NG,.TEXTG,.NI,.TEXTI)
- +39 ;
- +40 ;V EXAM
- +41 DO CHECK(9000010.13,.NG,.TEXTG,.NI,.TEXTI)
- +42 ;
- +43 ;V IMMUNIZATION
- +44 DO CHECK(9000010.11,.NG,.TEXTG,.NI,.TEXTI)
- +45 ;
- +46 ;V PATIENT ED
- +47 DO CHECK(9000010.16,.NG,.TEXTG,.NI,.TEXTI)
- +48 ;
- +49 ;V POV
- +50 DO CHECK(9000010.07,.NG,.TEXTG,.NI,.TEXTI)
- +51 ;
- +52 ;V SKIN TEST
- +53 DO CHECK(9000010.12,.NG,.TEXTG,.NI,.TEXTI)
- +54 ;
- +55 ;VITAL MEASUREMENT
- +56 ;D CHECK(120.5,.NG,.TEXTG,.NI,.TEXTI)
- +57 ;
- +58 IF NI>2
- SET XPDABORT=1
- +59 IF $GET(XPDABORT)
- Begin DoDot:1
- +60 SET TEXTI(1)="Clinical Reminders v2.0 cannot be installed because the following indexes"
- +61 SET TEXTI(2)="are not built:"
- +62 DO EN^DDIOL(.TEXTI)
- End DoDot:1
- +63 IF '$TEST
- Begin DoDot:1
- +64 SET TEXTI(1)="Environment check passed, ok to install Clinical Reminders v2.0"
- +65 DO EN^DDIOL(.TEXTI)
- End DoDot:1
- +66 ;
- +67 IF NG>2
- Begin DoDot:1
- +68 SET TEXTG(1)=" "
- +69 IF NG=3
- SET TEXTG(2)="The following global does not have data or does not exist:"
- +70 IF NG>3
- SET TEXTG(2)="The following globals do not have data or do not exist:"
- +71 SET NG=NG+1
- SET TEXTG(NG)="Because of this Clinical Reminder evaluation may not operate correctly on your system!"
- +72 DO EN^DDIOL(.TEXTG)
- End DoDot:1
- +73 QUIT
- +74 ;
- +75 ;===============================================================
- 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 ;