@Test public void testValidateDiagnosisCodeCodeSystemInvalid() { boolean res = service.validateDiagnosisCode("A11", "does-not-exist"); assertFalse(res); }
@Override public boolean validateDiagnosisCode(String diagnosisCode, String codeSystemStr) { if (Strings.nullToEmpty(diagnosisCode).trim().isEmpty()) { LOG.debug("Could not validate code since it is null or empty"); return false; } Diagnoskodverk codeSystem = getDiagnoskodverk(codeSystemStr); return validateDiagnosisCode(diagnosisCode, codeSystem); }
DiagnosServiceImpl implements DiagnosService { @Override public boolean validateDiagnosisCode(String diagnosisCode, String codeSystemStr) { if (Strings.nullToEmpty(diagnosisCode).trim().isEmpty()) { LOG.debug("Could not validate code since it is null or empty"); return false; } Diagnoskodverk codeSystem = getDiagnoskodverk(codeSystemStr); return validateDiagnosisCode(diagnosisCode, codeSystem); } }
DiagnosServiceImpl implements DiagnosService { @Override public boolean validateDiagnosisCode(String diagnosisCode, String codeSystemStr) { if (Strings.nullToEmpty(diagnosisCode).trim().isEmpty()) { LOG.debug("Could not validate code since it is null or empty"); return false; } Diagnoskodverk codeSystem = getDiagnoskodverk(codeSystemStr); return validateDiagnosisCode(diagnosisCode, codeSystem); }  }
DiagnosServiceImpl implements DiagnosService { @Override public boolean validateDiagnosisCode(String diagnosisCode, String codeSystemStr) { if (Strings.nullToEmpty(diagnosisCode).trim().isEmpty()) { LOG.debug("Could not validate code since it is null or empty"); return false; } Diagnoskodverk codeSystem = getDiagnoskodverk(codeSystemStr); return validateDiagnosisCode(diagnosisCode, codeSystem); }  @PostConstruct void initDiagnosRepository(); @Override DiagnosResponse getDiagnosisByCode(String code, String codeSystemStr); @Override DiagnosResponse getDiagnosisByCode(String code, Diagnoskodverk codeSystem); @Override DiagnosResponse searchDiagnosisByCode(String codeFragment, String codeSystemStr, int nbrOfResults); @Override DiagnosResponse searchDiagnosisByDescription(String searchString, String codeSystemStr, int nbrOfResults); @Override boolean validateDiagnosisCode(String diagnosisCode, String codeSystemStr); }
DiagnosServiceImpl implements DiagnosService { @Override public boolean validateDiagnosisCode(String diagnosisCode, String codeSystemStr) { if (Strings.nullToEmpty(diagnosisCode).trim().isEmpty()) { LOG.debug("Could not validate code since it is null or empty"); return false; } Diagnoskodverk codeSystem = getDiagnoskodverk(codeSystemStr); return validateDiagnosisCode(diagnosisCode, codeSystem); }  @PostConstruct void initDiagnosRepository(); @Override DiagnosResponse getDiagnosisByCode(String code, String codeSystemStr); @Override DiagnosResponse getDiagnosisByCode(String code, Diagnoskodverk codeSystem); @Override DiagnosResponse searchDiagnosisByCode(String codeFragment, String codeSystemStr, int nbrOfResults); @Override DiagnosResponse searchDiagnosisByDescription(String searchString, String codeSystemStr, int nbrOfResults); @Override boolean validateDiagnosisCode(String diagnosisCode, String codeSystemStr);  }