/*******************************************************************************
 *  Copyright 2017 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *    http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.hl7282.utils;

import java.io.File;
import java.net.URL;

/**
 * This class is used for declaring a constants used in HL7.
 */

public class HL7Constants 
{
	/**
	 * This constant specifies byte array for Evaluation.
	 */
	public final static byte[] EVAL = getEVALArray();
	
	/**This string contains the path of shared jar files.*/
	public final static String JAR_ROUTE_PATH = getResourceLocation();

	/**This string contains the path of support files relative to location of shared jar files*/
	private final static String STR_RESOURCE_PATH = JAR_ROUTE_PATH + "../../SupportFiles/";

	/**Constant used for property file containing paths of test file */
	public static final String HL7_RESOURCE_PATH = STR_RESOURCE_PATH + "FilePath.properties";

	/**Constant used for Underscore */
	public static final String HL7_UNDERSCORE = "_";

	/** These are constants used for HL7 Data Types */
	public static final char HL7_CARRIAGE_RETURN = '\r'; 

	/** constant representing Data type AD */
	public static final int HL7_DT_AD = 101;

	/** constant representing Data type AUI */
	public static final int HL7_DT_AUI = 102;

	/** constant representing Data type CCD*/
	public static final int HL7_DT_CCD = 103;

	/** constant representing Data type CCP*/
	public static final int HL7_DT_CCP = 104;

	/**constant representing Data type CD*/
	public static final int HL7_DT_CD = 105;

	/** constant representing Data type CE*/
	//public static final int HL7_DT_CE = 106;

	/** constant representing Data type CF*/
	public static final int HL7_DT_CF = 107;

	/** constant representing Data type CNE*/
	public static final int HL7_DT_CNE = 108;

	/** constant representing Data type CNN*/
	public static final int HL7_DT_CNN = 109;

	/** constant representing Data type CP*/
	public static final int HL7_DT_CP = 110;

	/** constant representing Data type CQ*/
	public static final int HL7_DT_CQ = 111;

	/** constant representing Data type CSU*/
	public static final int HL7_DT_CSU = 112;

	/** constant representing Data type CWE*/
	public static final int HL7_DT_CWE = 113;

	/** constant representing Data type CX*/
	public static final int HL7_DT_CX = 114;

	/** constant representing Data type DDI*/
	public static final int HL7_DT_DDI = 115;

	/** constant representing Data type DIN*/
	public static final int HL7_DT_DIN = 116;

	/** constant representing Data type DLD*/
	public static final int HL7_DT_DLD = 117;

	/** constant representing Data type DLN*/
	public static final int HL7_DT_DLN = 118;

	/** constant representing Data type DLT*/
	public static final int HL7_DT_DLT = 119;

	/** constant representing Data type DR*/
	public static final int HL7_DT_DR = 120;

	/** constant representing Data type DT*/
	public static final int HL7_DT_DT = 121;

	/** constant representing Data type DTM*/
	public static final int HL7_DT_DTM = 122;

	/** constant representing Data type DTN*/
	public static final int HL7_DT_DTN = 123;

	/** constant representing Data type ED*/
	public static final int HL7_DT_ED = 124;

	/** constant representing Data type EI*/
	public static final int HL7_DT_EI = 125;

	/** constant representing Data type EIP*/
	public static final int HL7_DT_EIP = 126;

	/** constant representing Data type ELD*/
	//public static final int HL7_DT_ELD = 127;

	/** constant representing Data type ERL*/
	public static final int HL7_DT_ERL = 128;

	/** constant representing Data type FC*/
	public static final int HL7_DT_FC = 129;

	/** constant representing Data type FL*/
	public static final int HL7_DT_FT = 130;

	/** constant representing Data type FN*/
	public static final int HL7_DT_FN = 131;

	/** constant representing Data type GTS*/
	public static final int HL7_DT_GTS = 132;

	/** constant representing Data type HD*/
	public static final int HL7_DT_HD = 133;

	/** constant representing Data type ICD*/
	public static final int HL7_DT_ICD = 134;

	/** constant representing Data type ID*/
	public static final int HL7_DT_ID = 135;

	/** constant representing Data type IS*/
	public static final int HL7_DT_IS = 136;

	/** constant representing Data type JCC*/
	public static final int HL7_DT_JCC = 137;

	/** constant representing Data type LA1*/
	//public static final int HL7_DT_LA1 = 138;

	/** constant representing Data type LA2*/
	//public static final int HL7_DT_LA2 = 139;

	/** constant representing Data type MA*/
	public static final int HL7_DT_MA = 140;

	/** constant representing Data type MO*/
	public static final int HL7_DT_MO = 141;

	/** constant representing Data type MOC*/
	public static final int HL7_DT_MOC = 142;

	/** constant representing Data type MOP*/
	public static final int HL7_DT_MOP = 143;

	/** constant representing Data type MSG*/
	public static final int HL7_DT_MSG = 144;

	/** constant representing Data type NA*/
	public static final int HL7_DT_NA = 145;

	/** constant representing Data type NM*/
	public static final int HL7_DT_NM = 146;

	/** constant representing Data type NR*/
	public static final int HL7_DT_NR = 147;

	/** constant representing Data type OCD*/
	public static final int HL7_DT_OCD = 148;
	
	/** constant representing Data type OCD*/															//New dataType added by HImani
	public static final int HL7_DT_OG = 190;

	/** constant representing Data type OSD*/
	//public static final int HL7_DT_OSD = 149;

	/** constant representing Data type OSP*/
	public static final int HL7_DT_OSP = 150;

	/** constant representing Data type PIP*/
	public static final int HL7_DT_PIP = 151;

	/** constant representing Data type PL*/
	public static final int HL7_DT_PL = 152;

	/** constant representing Data type PLN*/
	public static final int HL7_DT_PLN = 153;

	/** constant representing Data type PPN*/
	public static final int HL7_DT_PPN = 154;

	/** constant representing Data type PRL*/
	public static final int HL7_DT_PRL = 155;

	/** constant representing Data type PT*/
	public static final int HL7_DT_PT = 156;

	/** constant representing Data type PTA*/
	public static final int HL7_DT_PTA = 157;

	/** constant representing Data type QIP*/
	public static final int HL7_DT_QIP = 158;

	/** constant representing Data type QSC*/
	public static final int HL7_DT_QSC = 159;

	/** constant representing Data type RCD*/
	public static final int HL7_DT_RCD = 160;

	/** constant representing Data type RFR*/
	public static final int HL7_DT_RFR = 161;

	/** constant representing Data type RI*/
	public static final int HL7_DT_RI = 162;

	/** constant representing Data type RMC*/
	public static final int HL7_DT_RMC = 163;

	/** constant representing Data type RP*/
	public static final int HL7_DT_RP = 164;

	/** constant representing Data type RPT*/
	public static final int HL7_DT_RPT = 165;

	/** constant representing Data type SAD*/
	public static final int HL7_DT_SAD = 166;

	/** constant representing Data type SCV*/
	public static final int HL7_DT_SCV = 167;

	/** constant representing Data type SI*/
	public static final int HL7_DT_SI = 168;

	/** constant representing Data type SN*/
	public static final int HL7_DT_SN =	169;
	
	/** constant representing Data type SN*/															//New dataType added by HImani
	public static final int HL7_DT_SNM = 191;

	/** constant representing Data type SPD*/
	public static final int HL7_DT_SPD = 170;

	/** constant representing Data type SPS*/
	//public static final int HL7_DT_SPS = 171;

	/** constant representing Data type SRT*/
	public static final int HL7_DT_SRT = 172;

	/** constant representing Data type ST*/
	public static final int HL7_DT_ST =	173;

	/** constant representing Data type TM*/
	public static final int HL7_DT_TM =	174;

	/** constant representing Data type TQ*/
	//public static final int HL7_DT_TQ =	175;

	/** constant representing Data type TS*/
	//public static final int HL7_DT_TS =	176;

	/** constant representing Data type TX*/
	public static final int HL7_DT_TX =	177;

	/** constant representing Data type UVC*/
	public static final int HL7_DT_UVC = 178;

	/** constant representing Data type VH*/
	public static final int HL7_DT_VH = 179;

	/** constant representing Data type VID*/
	public static final int HL7_DT_VID = 180;

	/** constant representing Data type VR*/
	public static final int HL7_DT_VR =	181;

	/** constant representing Data type WVI*/
	public static final int HL7_DT_WVI = 182;

	/** constant representing Data type WVS*/
	public static final int HL7_DT_WVS = 183;

	/** constant representing Data type XAD*/
	public static final int HL7_DT_XAD = 184;

	/** constant representing Data type XCN*/
	public static final int HL7_DT_XCN = 185;

	/** constant representing Data type XON*/
	public static final int HL7_DT_XON = 186;

	/** constant representing Data type XPN*/
	public static final int HL7_DT_XPN = 187;

	/** constant representing Data type XTN*/
	public static final int HL7_DT_XTN = 188;

	/** constant representing Data type UN*/
	public static final int HL7_DT_UN = 189;


	/** These are constants used for HL7 to identify the type of Component */
	public static final int HL7_COMPONENT = 1001;
	/** These are constants used for HL7 to identify the type of SubComponent */
	public static final int  HL7_SUBCOMPONENT = 1002;

	//This section contains integer constants related to stream

	/** if stream type is inputStream*/
	public static final int STREAM_TYPE_INPUT = 1;

	/** if stream type is OutputStream*/
	public static final int STREAM_TYPE_OUTPUT = 2;

	/** if stream type is inputStream as well as OutputStream*/
	public static final int STREAM_TYPE_INPUTOUTPUT = 3;

	/** if stream type is Invalid. */
	public static final int STREAM_TYPE_INVALID = 4;

	/**
	 * Constants used for returning the values from the function
	 * Depending on the result when return type is Integer. 
	 * SUCCESS if result is proper
	 */
	public static final int HL7_FUNCTION_SUCCESS = 5;

	/** FAIL if result is not proper*/
	public static final int HL7_FUNCTION_FAIL = -1;

	/** TABLE_NOT_FOUND if during validating for the datatypes table is not present*/
	public static final int HL7_TABLE_NOT_FOUND = 7;

	/** VALUE_NOT_FOUND if during validating for the datatypes value in the table is not present*/
	public static final int HL7_VALUE_NOT_FOUND = 8;
	
	/**INVALID_SEGMENT_TERMINATOR if during parsing Termination of Segment is not correct */
	public static final int HL7_INVALID_SEGMENT_TERMINATOR = 33;
	
	/**UNRECOGNIZED_FIELD while parsing unrecognized field encounter.*/
	public static final int HL7_WITHDRAWN_FIELD = -2;
	//Constants Decleared for the Segments

	/** Constants used for HL7 segment ACC. */
	public static final int HL7_SEG_ACC = 11;

	/** Constants used for HL7 segment AL1. */
	public static final int HL7_SEG_AL1 = 12;

	/** Constants used for HL7 segment DB1. */
	public static final int HL7_SEG_DB1 = 13;

	/** Constants used for HL7 segment DG1. */
	public static final int HL7_SEG_DG1 = 14;

	/** Constants used for HL7 segment DRG. */
	public static final int HL7_SEG_DRG = 15;

	/** Constants used for HL7 segment EVN. */
	public static final int HL7_SEG_EVN = 16;

	/** Constants used for HL7 segment GT1. */
	public static final int HL7_SEG_GT1 = 17;

	/** Constants used for HL7 segment IN1. */
	public static final int HL7_SEG_IN1 = 18;

	/** Constants used for HL7 segment IN2. */
	public static final int HL7_SEG_IN2 = 19;

	/** Constants used for HL7 segment IN3. */
	public static final int HL7_SEG_IN3 = 20;

	/** Constants used for HL7 segment MSH. */
	public static final int HL7_SEG_MSH = 21;

	/** Constants used for HL7 segment NK1. */
	public static final int HL7_SEG_NK1 = 22;

	/** Constants used for HL7 segment NPU. */
	public static final int HL7_SEG_NPU = 23;

	/** Constants used for HL7 segment OBX. */
	public static final int HL7_SEG_OBX = 24;

	/** Constants used for HL7 segment PD1. */
	public static final int HL7_SEG_PD1 = 25;

	/** Constants used for HL7 segment PDA. */
	public static final int HL7_SEG_PDA = 26;

	/** Constants used for HL7 segment PID. */
	public static final int HL7_SEG_PID = 27;

	/** Constants used for HL7 segment PR1. */
	public static final int HL7_SEG_PR1 = 28;

	/** Constants used for HL7 segment PV1. */
	public static final int HL7_SEG_PV1 = 29;

	/** Constants used for HL7 segment PV2. */
	public static final int HL7_SEG_PV2 = 30;

	/** Constants used for HL7 segment ROL. */
	public static final int HL7_SEG_ROL = 31;

	/** Constants used for HL7 segment SFT. */
	public static final int HL7_SEG_SFT = 32;

	/** Constants used for HL7 segment UB1. */
	public static final int HL7_SEG_UB1 = 33;

	/** Constants used for HL7 segment UB2. */
	public static final int HL7_SEG_UB2 = 34; 

	/** Constants used for HL7 segment MRG. */
	public static final int HL7_SEG_MRG = 35;

	/** Constants used for HL7 segment IAM. */
	public static final int HL7_SEG_IAM = 36;

	/** Constants used for HL7 segment QAK. */
	public static final int HL7_SEG_QAK = 37;

	/** Constants used for HL7 segment DSC. */
	public static final int HL7_SEG_DSC = 38;

	/** Constants used for HL7 segment QRD. */
	public static final int HL7_SEG_QRD = 39;

	/** Constants used for HL7 segment QRF. */
	public static final int HL7_SEG_QRF = 40;

	/** Constants used for HL7 segment QPD. */
	public static final int HL7_SEG_QPD = 41;

	/** Constants used for HL7 segment RPC. */
	public static final int HL7_SEG_RCP = 42;

	/** Constants used for HL7 segment BLG. */
	public static final int HL7_SEG_BLG = 43;

	/** Constants used for HL7 segment CTD. */
	public static final int HL7_SEG_CTD = 44;

	/** Constants used for HL7 segment CTI. */
	public static final int HL7_SEG_CTI = 45;

	/** Constants used for HL7 segment ERR. */
	public static final int HL7_SEG_ERR = 46;

	/** Constants used for HL7 segment FT1. */
	public static final int HL7_SEG_FT1 = 47;

	/** Constants used for HL7 segment MSA. */
	public static final int HL7_SEG_MSA = 48;

	/** Constants used for HL7 segment OBR. */
	public static final int HL7_SEG_OBR = 49;

	/** Constants used for HL7 segment ODS. */
	public static final int HL7_SEG_ODS = 50;

	/** Constants used for HL7 segment ODT. */
	public static final int HL7_SEG_ODT = 51;

	/** Constants used for HL7 segment ORC. */
	public static final int HL7_SEG_ORC = 52;

	/** Constants used for HL7 segment RQ1. */
	public static final int HL7_SEG_RQ1 = 53;

	/** Constants used for HL7 segment RQD. */
	public static final int HL7_SEG_RQD = 54;

	/** Constants used for HL7 segment RXO. */
	public static final int HL7_SEG_RXO = 55;

	/** Constants used for HL7 segment TQ1. */
	public static final int HL7_SEG_TQ1 = 56;

	/** Constants used for HL7 segment TQ2. */
	public static final int HL7_SEG_TQ2 = 57;

	/** Constants used for HL7 segment NTE. */
	public static final int HL7_SEG_NTE = 58;

	/** Constants used for HL7 segment RXE. */
	public static final int HL7_SEG_RXE = 59;

	/** Constants used for HL7 segment RXR. */
	public static final int HL7_SEG_RXR = 60;

	/** Constants used for HL7 segment RXC. */
	public static final int HL7_SEG_RXC = 61;

	/** Constants used for HL7 segment BPO. */
	public static final int HL7_SEG_BPO = 62;

	/** Constants used for HL7 segment BPX. */
	public static final int HL7_SEG_BPX = 63;

	/** Constants used for HL7 segment BTX. */
	public static final int HL7_SEG_BTX = 64;

	/** Constants used for HL7 segment IPC. */
	public static final int HL7_SEG_IPC = 65;

	/** Constants used for HL7 segment RXA. */
	public static final int HL7_SEG_RXA = 66;

	/** Constants used for HL7 segment RXD. */
	public static final int HL7_SEG_RXD = 67;

	/** Constants used for HL7 segment RXG. */
	public static final int HL7_SEG_RXG = 68;

	/** Constants used for HL7 segment SAC. */
	public static final int HL7_SEG_SAC = 69;

	/** Constants used for HL7 segment SPM. */
	public static final int HL7_SEG_SPM = 70;

	/** Constants used for HL7 segment TCD. */
	public static final int HL7_SEG_TCD = 71;

	/** Constants used for HL7 segment CM0. */
	public static final int HL7_SEG_CM0 = 72;

	/** Constants used for HL7 segment CM1. */
	public static final int HL7_SEG_CM1 = 73;

	/** Constants used for HL7 segment CM2. */
	public static final int HL7_SEG_CM2 = 74;

	/** Constants used for HL7 segment CSP. */
	public static final int HL7_SEG_CSP = 75;

	/** Constants used for HL7 segment CSR. */
	public static final int HL7_SEG_CSR = 76;

	/** Constants used for HL7 segment CSS. */
	public static final int HL7_SEG_CSS = 77;

	/** Constants used for HL7 segment FAC. */
	public static final int HL7_SEG_FAC = 78;

	/** Constants used for HL7 segment PCR. */
	public static final int HL7_SEG_PCR = 79;

	/** Constants used for HL7 segment PDC. */
	public static final int HL7_SEG_PDC = 80;

	/** Constants used for HL7 segment PEO. */
	public static final int HL7_SEG_PEO = 81;

	/** Constants used for HL7 segment PES. */
	public static final int HL7_SEG_PES = 82;

	/** Constants used for HL7 segment PSH. */
	public static final int HL7_SEG_PSH = 83;

	/** Constants used for HL7 segment SID. */
	public static final int HL7_SEG_SID = 84;

	/** Constants used for HL7 segment INV. */
	public static final int HL7_SEG_INV = 85;


	/** Constants used for HL7 segment PRB. */
	public static final int HL7_SEG_PRB = 86;

	/** Constants used for HL7 segment GP1. */
	public static final int HL7_SEG_GP1 = 87;

	/** Constants used for HL7 segment GP2. */
	public static final int HL7_SEG_GP2 = 88;  

	/** Constants used for HL7 segment BLC. */
	public static final int HL7_SEG_BLC = 89;  

	/** Constants used for HL7 segment RMI. */
	public static final int HL7_SEG_RMI = 90;  

	/** Constants used for HL7 segment ABS. */
	public static final int HL7_SEG_ABS = 91;

	/** Constants used for HL7 segment VAR. */
	public static final int HL7_SEG_VAR = 92;

	/** Constants used for HL7 segment PTH. */
	public static final int HL7_SEG_PTH = 93;

	/** Constants used for HL7 segment GOL. */
	public static final int HL7_SEG_GOL = 94;

	/** Constants used for HL7 segment RF1. */
	public static final int HL7_SEG_RF1 = 95;

	/** Constants used for HL7 segment AUT. */
	public static final int HL7_SEG_AUT = 96;

	/** Constants used for HL7 segment PRD. */
	public static final int HL7_SEG_PRD = 97;

	/** Constants used for HL7 segment DSP. */
	public static final int HL7_SEG_DSP = 98;

	/** Constants used for HL7 segment TXA. */
	public static final int HL7_SEG_TXA = 99;

	/** Constants used for HL7 segment CON. */
	public static final int HL7_SEG_CON = 100;

	/** Constants used for HL7 segment QID. */
	public static final int HL7_SEG_QID = 101;

	/** Constants used for HL7 segment RDF. */
	public static final int HL7_SEG_RDF = 102;

	/** Constants used for HL7 segment ARQ. */
	public static final int HL7_SEG_ARQ = 103;

	/** Constants used for HL7 segment SCH. */
	public static final int HL7_SEG_SCH = 104;

	/** Constants used for HL7 segment RGS. */
	public static final int HL7_SEG_RGS = 105;

	/** Constants used for HL7 segment QRI. */
	public static final int HL7_SEG_QRI = 106;

	/** Constants used for HL7 segment AIS. */
	public static final int HL7_SEG_AIS = 107;

	/** Constants used for HL7 segment AIG. */
	public static final int HL7_SEG_AIG = 108;

	/** Constants used for HL7 segment AIL. */
	public static final int HL7_SEG_AIL = 109;

	/** Constants used for HL7 segment AIP. */
	public static final int HL7_SEG_AIP = 110;

	/** Constants used for HL7 segment APR . */
	public static final int HL7_SEG_APR = 111;

	/** Constants used for HL7 segment OM1 . */
	public static final int HL7_SEG_OM1 = 112;

	/** Constants used for HL7 segment OM2 . */
	public static final int HL7_SEG_OM2 = 113;

	/** Constants used for HL7 segment OM3. */
	public static final int HL7_SEG_OM3 = 114;

	/** Constants used for HL7 segment OM4 . */
	public static final int HL7_SEG_OM4 = 115;

	/** Constants used for HL7 segment OM5 . */
	public static final int HL7_SEG_OM5 = 116;

	/** Constants used for HL7 segment OM6. */
	public static final int HL7_SEG_OM6 = 117;

	/** Constants used for HL7 segment OM7. */
	public static final int HL7_SEG_OM7 = 118;

	/** Constants used for HL7 segment MFI. */
	public static final int HL7_SEG_MFI = 119;

	/** Constants used for HL7 segment LDP. */
	public static final int HL7_SEG_LDP = 120;

	/** Constants used for HL7 segment LOC. */
	public static final int HL7_SEG_LOC = 121;

	/** Constants used for HL7 segment LCH. */
	public static final int HL7_SEG_LCH = 122;

	/** Constants used for HL7 segment LRL. */
	public static final int HL7_SEG_LRL = 123;

	/** Constants used for HL7 segment LCC. */
	public static final int HL7_SEG_LCC = 124;

	/** Constants used for HL7 segment CDM. */
	public static final int HL7_SEG_CDM = 125;

	/** Constants used for HL7 segment PRC. */ 
	public static final int HL7_SEG_PRC = 126;

	/** Constants used for HL7 segment MFE. */ 
	public static final int HL7_SEG_MFE = 127;

	/**Constants used for HL7 segment MFA. */ 
	public static final int HL7_SEG_MFA = 128;

	/**Constants used for HL7 segment IIM. */ 
	public static final int HL7_SEG_IIM = 129;

	/**Constants used for HL7 segment STF. */ 
	public static final int HL7_SEG_STF = 130;

	/**Constants used for HL7 segment AFF. */ 
	public static final int HL7_SEG_AFF = 131;

	/**Constants used for HL7 segment CER. */ 
	public static final int HL7_SEG_CER = 132;

	/**Constants used for HL7 segment PRA. */ 
	public static final int HL7_SEG_PRA = 133;

	/**Constants used for HL7 segment ORG. */ 
	public static final int HL7_SEG_ORG = 134;

	/**Constants used for HL7 segment LAN. */ 
	public static final int HL7_SEG_LAN = 135;

	/**Constants used for HL7 segment EDU. */ 
	public static final int HL7_SEG_EDU = 136;

	/**	Constants used for HL7 segment RDT. */ 
	public static final int HL7_SEG_RDT = 137;
	
	/**	Constants used for HL7 segment RFI. */ 
	public static final int HL7_SEG_RFI = 138;
	
	/**	Constants used for HL7 segment IVC. */ 
	public static final int HL7_SEG_IVC = 139;
	
	/**	Constants used for HL7 segment PYE. */ 
	public static final int HL7_SEG_PYE = 140;

	/**	Constants used for HL7 segment PSS. */ 
	public static final int HL7_SEG_PSS = 141;
	
	/**	Constants used for HL7 segment PSG. */ 
	public static final int HL7_SEG_PSG = 142;
	
	/**	Constants used for HL7 segment PSL. */ 
	public static final int HL7_SEG_PSL = 143;
	
	/**	Constants used for HL7 segment ADJ. */ 
	public static final int HL7_SEG_ADJ = 144;
	
	/**	Constants used for HL7 segment PMT. */ 
	public static final int HL7_SEG_PMT = 145;
	
	/**	Constants used for HL7 segment IPR. */ 
	public static final int HL7_SEG_IPR = 146;
	
	/**	Constants used for HL7 segment ITM. */ 
	public static final int HL7_SEG_ITM = 147;
	
	/**	Constants used for HL7 segment STZ. */ 
	public static final int HL7_SEG_STZ = 148;
	
	/**	Constants used for HL7 segment VND. */ 
	public static final int HL7_SEG_VND = 149;
	
	/**	Constants used for HL7 segment PKG. */ 
	public static final int HL7_SEG_PKG = 150;
	
	/**	Constants used for HL7 segment PCE. */ 
	public static final int HL7_SEG_PCE = 151;
	
	/**	Constants used for HL7 segment IVT. */ 
	public static final int HL7_SEG_IVT = 152;
	
	/**	Constants used for HL7 segment ILT. */ 
	public static final int HL7_SEG_ILT = 153;
	
	/**	Constants used for HL7 segment SCP. */ 
	public static final int HL7_SEG_SCP = 154;
	
	/**	Constants used for HL7 segment SLT. */ 
	public static final int HL7_SEG_SLT = 155;
	
	/**	Constants used for HL7 segment SDD. */ 
	public static final int HL7_SEG_SDD = 156;
	
	/**	Constants used for HL7 segment SCD. */ 
	public static final int HL7_SEG_SCD = 157;
	
	/** Constant used for indicate End of Stream */
	public static final int END_OF_STREAM = -1; 

	/**	Returns path of the location of shared jar.*/
	private static String getResourceLocation()
	{
		String strPath = null;
		URL tempURL = HL7Constants.class.getResource("HL7Constants.class");

		String strvfszip = tempURL.getProtocol();

		if(strvfszip.equalsIgnoreCase("vfszip"))
		{
			strPath = tempURL.getPath().substring(1, tempURL.getPath().length());

			int i = strPath.indexOf("hl7base282.jar");

			strPath = strPath.substring(0, i);

			System.out.println(strPath);
		}
		else
		{
			//URL contains '!' and path to the class in jar.
			int occur = tempURL.getPath().indexOf("!");
			strPath = tempURL.getPath().substring(0, occur);

			//String contains "file:/" trimming to remove that.
			strPath = strPath.substring(6,strPath.lastIndexOf("/")+1);
		}
		
		strPath = strPath.replace("%20", " ");

		String OsEnv = System.getProperty("os.name");

		if(OsEnv.toUpperCase().contains("LINUX")||OsEnv.toUpperCase().contains("MAC"))
		{
			strPath = File.separator + strPath;
		}

		return strPath;
	}
	
	//Returns the byte array for evaluation .
	private static byte[] getEVALArray()
	{
		return "EVAL".getBytes();
	}
}
