Skip to content

Commit

Permalink
Merge branch 'master' into improve_jpa_indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesagnew committed Jun 27, 2018
2 parents 2b992cf + bbf4745 commit 050f993
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Options;
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 static org.apache.commons.lang3.StringUtils.isBlank;
Expand Down Expand Up @@ -82,10 +79,17 @@ public void run(CommandLine theCommandLine) throws ParseException {
IGenericClient client = super.newClient(theCommandLine);
IBaseParameters inputParameters;
if (ctx.getVersion().getVersion() == FhirVersionEnum.DSTU3) {
Parameters p = new Parameters();
p.addParameter().setName("url").setValue(new UriType(termUrl));
org.hl7.fhir.dstu3.model.Parameters p = new org.hl7.fhir.dstu3.model.Parameters();
p.addParameter().setName("url").setValue(new org.hl7.fhir.dstu3.model.UriType(termUrl));
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;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,15 +837,16 @@ public synchronized void saveDeferred() {
return;
} else if (myDeferredConcepts.isEmpty() && myConceptLinksToSaveLater.isEmpty()) {
processReindexing();
return;
}

TransactionTemplate tt = new TransactionTemplate(myTransactionMgr);
tt.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW);
tt.execute(t -> {
processDeferredConcepts();
return null;
});
if(!myDeferredConcepts.isEmpty() || !myConceptLinksToSaveLater.isEmpty()) {
tt.execute(t -> {
processDeferredConcepts();
return null;
});
}

if (myDeferredValueSets.size() > 0) {
tt.execute(t -> {
Expand Down
11 changes: 11 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@
unexpectedly resources could be left in a weird state. This has been
corrected.
</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 version="3.4.0" date="2018-05-28">
<action type="add">
Expand Down

0 comments on commit 050f993

Please sign in to comment.