testValueAgainstTable(profileID, codeSystem, value, exList);
}
}
protected void testValueAgainstTable(String profileID, String codeSystem, String value, List<HL7Exception> exList) {
CodeStore store = codeStore;
if (codeStore == null) {
store = getHapiContext().getCodeStoreRegistry().getCodeStore(profileID, codeSystem);
}
if (store == null) {
log.info(
"Not checking value {}: no code store was found for profile {} code system {}",
new Object[] { value, profileID, codeSystem });
} else {
if (!store.knowsCodes(codeSystem)) {
log.warn("Not checking value {}: Don't have a table for code system {}", value,
codeSystem);
} else if (!store.isValidCode(codeSystem, value)) {
exList.add(new ProfileNotFollowedException("Code '" + value + "' not found in table "
+ codeSystem + ", profile " + profileID));
}
}