Fix bug in terminology upload command and revert condition in validateCode

This commit is contained in:
Martha Mitran 2024-01-22 21:39:41 -08:00
parent 1b06f29c52
commit a7d4414a67
2 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,7 @@ import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.input.CountingInputStream;
import org.apache.commons.lang3.StringUtils;
@ -268,7 +269,7 @@ public class UploadTerminologyCommand extends BaseRequestGeneratingCommand {
byte[] bytes = theBytes;
String fileName = theFileName;
String suffix = fileName.substring(fileName.lastIndexOf("."));
String suffix = FilenameUtils.getExtension(fileName);
if (bytes.length > ourTransferSizeLimit) {
ourLog.info(

View File

@ -127,7 +127,7 @@ public class CommonCodeSystemsTerminologyService implements IValidationSupport {
if (!isBlank(valueSet)) {
final String expectSystem = getCodeSystemForValueSet(valueSet);
if (!isBlank(expectSystem) && !expectSystem.equals(system)) {
if (!isBlank(system) && !system.equals(expectSystem)) {
return getValidateCodeResultInError("mismatchCodeSystem", system, valueSet);
}
system = expectSystem;