Code example for Hashtable

Methods: get, put, size

0
			Hashtable<String, String> hashEmpiTemp = new Hashtable<String, String>();
			hashEmpiTemp.put("A:\\I401.txt", empiKey);
			empiHighEnc = new HighEncryption("A:\\I401.txt", hashEmpiTemp);
 
			// init high encryption with notes key 
			Hashtable<String, String> hashNotestemp = new Hashtable<String, String>();
			hashNotestemp.put("A:\\I401.txt", notesKey);
			notesHighEnc = new HighEncryption("A:\\I401.txt", hashNotestemp);
 
		} catch (Exception e) {
			e.printStackTrace();
		} 
	} 
 
	/** 
	 * Return encrypted encounter ide 
	 *  
	 * @param encounterIde 
	 * @return 
	 * @throws I2B2Exception  
	 */ 
	public String encryptEncounterIde(String encounterIde) throws I2B2Exception {
		return empiHighEnc.generic_encrypt(encounterIde);
	} 
 
	/** 
	 * Return encrypted patient ide. 
	 *  
	 * @param patientIde 
	 * @return 
	 */ 
	public String encryptPatientIde(String patientIde) {
		String encryptPatientIde = empiHighEnc.mrn_encrypt(patientIde, true,
				"EMPI"); 
		if (encryptPatientIde != null && encryptPatientIde.trim().length() > 0) {
			encryptPatientIde = '(' + encryptPatientIde;
		} 
		return encryptPatientIde;
	}