/** * Returns the interface code for the given local code, for use in the context * of the given interface. */ public String getInterfaceCode(String interfaceName, int hl7Table, String localCode) throws HL7Exception { String interfaceCode = null; try { Map<String, Map<String, String>> interfaceMap = localToInterface.get(interfaceName); interfaceCode = getCode(interfaceMap, hl7Table, localCode); } catch (NullPointerException npe) { if (this.throwIfNoMatch) throw new HL7Exception( "No interface mapping for the local code " + localCode + " for HL7 table " + hl7Table + " for the interface '" + interfaceName + "'", ErrorCode.TABLE_VALUE_NOT_FOUND); } return interfaceCode; }
/** * Returns the interface code for the given local code, for use in the context * of the given interface. */ public String getInterfaceCode(String interfaceName, int hl7Table, String localCode) throws HL7Exception { String interfaceCode = null; try { Map<String, Map<String, String>> interfaceMap = localToInterface.get(interfaceName); interfaceCode = getCode(interfaceMap, hl7Table, localCode); } catch (NullPointerException npe) { if (this.throwIfNoMatch) throw new HL7Exception( "No interface mapping for the local code " + localCode + " for HL7 table " + hl7Table + " for the interface '" + interfaceName + "'", ErrorCode.TABLE_VALUE_NOT_FOUND); } return interfaceCode; }
/** * Returns the local code for the given interface code as it appears in * the given interface. */ public String getLocalCode(String interfaceName, int hl7Table, String interfaceCode) throws HL7Exception { String localCode = null; try { Map<String, Map<String, String>> interfaceMap = interfaceToLocal.get(interfaceName); localCode = getCode(interfaceMap, hl7Table, interfaceCode); } catch (NullPointerException npe) { if (this.throwIfNoMatch) throw new HL7Exception( "No local mapping for the interface code " + interfaceCode + " for HL7 table " + hl7Table + " for the interface '" + interfaceName + "'", ErrorCode.TABLE_VALUE_NOT_FOUND); } return localCode; }
/** * Returns the local code for the given interface code as it appears in * the given interface. */ public String getLocalCode(String interfaceName, int hl7Table, String interfaceCode) throws HL7Exception { String localCode = null; try { Map<String, Map<String, String>> interfaceMap = interfaceToLocal.get(interfaceName); localCode = getCode(interfaceMap, hl7Table, interfaceCode); } catch (NullPointerException npe) { if (this.throwIfNoMatch) throw new HL7Exception( "No local mapping for the interface code " + interfaceCode + " for HL7 table " + hl7Table + " for the interface '" + interfaceName + "'", ErrorCode.TABLE_VALUE_NOT_FOUND); } return localCode; }