RGMSENV ;B'HAM/PTD-CIRN MESSAGING SUPPORT build environment check routine ;4/6/99
 ;;1.0; CLINICAL INFO RESOURCE NETWORK ;;30 Apr 99
 ;If this is a production account, ensure that HL*1.6*39 is installed.
 Q:XPDENV=1  ;do not run environment check at install time
 ;run environment check only during Load a Distribution
 ;Determine if this is a production account.  If NOT, quit.
DIR K DIR S DIR(0)="SAM^P:Production;T:Test;"
 S DIR("A",1)="Identify this account as 'Production' or 'Test'."
 S DIR("A")="This installation is taking place in which account? "
 S DIR("B")="TEST"
 S DIR("?")="Enter 'P' for Production or 'T' for Test"
 S DIR("??")="^D HLP^RGMSENV"
 D ^DIR G:$D(DIRUT) ABORT S RGANS=Y
 I RGANS="T" G END
 ;For production account, check for patch HL*1.6*39.
 S RGPCH=$$PATCH^XPDUTL("HL*1.6*39") I RGPCH=1 G END
 ;
ABORT ;Patch HL*1.6*39 missing; abort install; leave transport global.
 W !!,"You must have patch HL*1.6*39 installed."
 S XPDQUIT=2
 ;
END I '$D(XPDQUIT) W !!,"Environment check is ok.",!
 K DIR,DIRUT,DTOUT,DUOUT,RGANS,RGPCH,X,Y
 Q
 ;
HLP ;Help text.
 W !!,"Enter 'P' if this installation is taking place in your"
 W !,"PRODUCTION account.  This will require patch HL*1.6*39."
 W !,"Enter 'T' if this installation is taking place in your"
 W !,"TEST account.  HL*1.6*39 should NOT be installed in any"
 W !,"test account.",!
 Q
 ;
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGMSENV   1390     printed  Sep 23, 2025@19:18:13                                                                                                                                                                                                     Page 2
RGMSENV   ;B'HAM/PTD-CIRN MESSAGING SUPPORT build environment check routine ;4/6/99
 +1       ;;1.0; CLINICAL INFO RESOURCE NETWORK ;;30 Apr 99
 +2       ;If this is a production account, ensure that HL*1.6*39 is installed.
 +3       ;do not run environment check at install time
           if XPDENV=1
               QUIT 
 +4       ;run environment check only during Load a Distribution
 +5       ;Determine if this is a production account.  If NOT, quit.
DIR        KILL DIR
           SET DIR(0)="SAM^P:Production;T:Test;"
 +1        SET DIR("A",1)="Identify this account as 'Production' or 'Test'."
 +2        SET DIR("A")="This installation is taking place in which account? "
 +3        SET DIR("B")="TEST"
 +4        SET DIR("?")="Enter 'P' for Production or 'T' for Test"
 +5        SET DIR("??")="^D HLP^RGMSENV"
 +6        DO ^DIR
           if $DATA(DIRUT)
               GOTO ABORT
           SET RGANS=Y
 +7        IF RGANS="T"
               GOTO END
 +8       ;For production account, check for patch HL*1.6*39.
 +9        SET RGPCH=$$PATCH^XPDUTL("HL*1.6*39")
           IF RGPCH=1
               GOTO END
 +10      ;
ABORT     ;Patch HL*1.6*39 missing; abort install; leave transport global.
 +1        WRITE !!,"You must have patch HL*1.6*39 installed."
 +2        SET XPDQUIT=2
 +3       ;
END        IF '$DATA(XPDQUIT)
               WRITE !!,"Environment check is ok.",!
 +1        KILL DIR,DIRUT,DTOUT,DUOUT,RGANS,RGPCH,X,Y
 +2        QUIT 
 +3       ;
HLP       ;Help text.
 +1        WRITE !!,"Enter 'P' if this installation is taking place in your"
 +2        WRITE !,"PRODUCTION account.  This will require patch HL*1.6*39."
 +3        WRITE !,"Enter 'T' if this installation is taking place in your"
 +4        WRITE !,"TEST account.  HL*1.6*39 should NOT be installed in any"
 +5        WRITE !,"test account.",!
 +6        QUIT 
 +7       ;