public abstract class CodeMapper extends Object
Maps local codes to interface codes and vice versa. The default implementation
of CodeMapper is FileCodeMapper. An instance of FileCodeMapper can be obtained
by calling CodeMapper.getInstance()
. See FileCodeMapper for instructions
on how to set up code map files.
Please note that this class is not intended for the purpose of enumerating valid codes.
If that is what you are looking for please see ca.uhn.hl7v2.TableRepository
Constructor and Description |
---|
CodeMapper() |
Modifier and Type | Method and Description |
---|---|
static CodeMapper |
getInstance()
Returns a singleton instance of CodeMapper.
|
static String |
getInt(String interfaceName,
int hl7Table,
String localCode)
A convenience method that returns an interface code from an underlying
CodeMapper instance by calling
CodeMapper.getInstance().getInterfaceCode(...) |
abstract String |
getInterfaceCode(String interfaceName,
int hl7Table,
String localCode)
Returns the interface code for the given local code, for use in the context
of the given interface.
|
static String |
getLocal(String interfaceName,
int hl7Table,
String interfaceCode)
A convenience method that returns a local code from an underlying
CodeMapper instance by calling
CodeMapper.getInstance().getLocalCode(...) |
abstract String |
getLocalCode(String interfaceName,
int hl7Table,
String interfaceCode)
Returns the local code for the given interface code as it appears in
the given interface.
|
abstract void |
refreshCache()
If values are cached in such a way that they are not guaranteed to be current, a call
to this method refreshes the values.
|
abstract void |
throwExceptionIfNoMatch(boolean throwException)
Determines what happens if no matching code is found during a lookup.
|
public CodeMapper()
public static CodeMapper getInstance() throws HL7Exception
HL7Exception
public static String getLocal(String interfaceName, int hl7Table, String interfaceCode) throws HL7Exception
CodeMapper.getInstance().getLocalCode(...)
HL7Exception
public static String getInt(String interfaceName, int hl7Table, String localCode) throws HL7Exception
CodeMapper.getInstance().getInterfaceCode(...)
HL7Exception
public abstract String getInterfaceCode(String interfaceName, int hl7Table, String localCode) throws HL7Exception
HL7Exception
public abstract String getLocalCode(String interfaceName, int hl7Table, String interfaceCode) throws HL7Exception
HL7Exception
public abstract void throwExceptionIfNoMatch(boolean throwException)
public abstract void refreshCache() throws HL7Exception
HL7Exception
Copyright © 2001–2017 University Health Network. All rights reserved.