mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-16 18:05:19 +00:00
Fix bug in terminology upload command and revert condition in validateCode
This commit is contained in:
parent
1b06f29c52
commit
a7d4414a67
@ -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(
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user