Merge branch 'master' into improve_jpa_indexes

This commit is contained in:
James Agnew 2018-06-27 10:44:18 -04:00
commit 050f9939ac
3 changed files with 27 additions and 11 deletions

View File

@ -28,9 +28,6 @@ import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Options; import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException; import org.apache.commons.cli.ParseException;
import org.hl7.fhir.dstu3.model.Parameters;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseParameters;
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isBlank;
@ -82,10 +79,17 @@ public class UploadTerminologyCommand extends BaseCommand {
IGenericClient client = super.newClient(theCommandLine); IGenericClient client = super.newClient(theCommandLine);
IBaseParameters inputParameters; IBaseParameters inputParameters;
if (ctx.getVersion().getVersion() == FhirVersionEnum.DSTU3) { if (ctx.getVersion().getVersion() == FhirVersionEnum.DSTU3) {
Parameters p = new Parameters(); org.hl7.fhir.dstu3.model.Parameters p = new org.hl7.fhir.dstu3.model.Parameters();
p.addParameter().setName("url").setValue(new UriType(termUrl)); p.addParameter().setName("url").setValue(new org.hl7.fhir.dstu3.model.UriType(termUrl));
for (String next : datafile) { for (String next : datafile) {
p.addParameter().setName("localfile").setValue(new StringType(next)); p.addParameter().setName("localfile").setValue(new org.hl7.fhir.dstu3.model.StringType(next));
}
inputParameters = p;
} else if (ctx.getVersion().getVersion() == FhirVersionEnum.R4) {
org.hl7.fhir.r4.model.Parameters p = new org.hl7.fhir.r4.model.Parameters();
p.addParameter().setName("url").setValue(new org.hl7.fhir.r4.model.UriType(termUrl));
for (String next : datafile) {
p.addParameter().setName("localfile").setValue(new org.hl7.fhir.r4.model.StringType(next));
} }
inputParameters = p; inputParameters = p;
} else { } else {

View File

@ -837,15 +837,16 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc,
return; return;
} else if (myDeferredConcepts.isEmpty() && myConceptLinksToSaveLater.isEmpty()) { } else if (myDeferredConcepts.isEmpty() && myConceptLinksToSaveLater.isEmpty()) {
processReindexing(); processReindexing();
return;
} }
TransactionTemplate tt = new TransactionTemplate(myTransactionMgr); TransactionTemplate tt = new TransactionTemplate(myTransactionMgr);
tt.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW); tt.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW);
tt.execute(t -> { if(!myDeferredConcepts.isEmpty() || !myConceptLinksToSaveLater.isEmpty()) {
processDeferredConcepts(); tt.execute(t -> {
return null; processDeferredConcepts();
}); return null;
});
}
if (myDeferredValueSets.size() > 0) { if (myDeferredValueSets.size() > 0) {
tt.execute(t -> { tt.execute(t -> {

View File

@ -108,6 +108,17 @@
unexpectedly resources could be left in a weird state. This has been unexpectedly resources could be left in a weird state. This has been
corrected. corrected.
</action> </action>
<action type="fix" issue="1015">
A bug was fixed in the JPA terminology uploader, where it was possible
in some cases for some ValueSets and ConceptMaps to not be saved because
of a premature short circuit during deferred uploading. Thanks to
Joel Schneider for the pull request!
</action>
<action type="fix" issue="969">
A bug in the HAPI FHIR CLI was fixed, where uploading terminology for R4
could cause an error about the incorrect FHIR version. Thanks to
Rob Hausam for the pull request!
</action>
</release> </release>
<release version="3.4.0" date="2018-05-28"> <release version="3.4.0" date="2018-05-28">
<action type="add"> <action type="add">