Demote PHI logging to debug or lower (#4430)

Ensure resource bodies are only logged at debug or lower.

* Drop possible-phi logs to debug.
* Demote request/response log bodies to debug since they may contain PHI.
* Demote job-param logging to debug.
* Add startup hook to App for test injection.
* Change terminology cli logging to avoid logging whole resource.
This commit is contained in:
michaelabuckley 2023-01-13 10:34:29 -05:00 committed by GitHub
parent a9ecc18986
commit 21b1820294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
162 changed files with 1275 additions and 1112 deletions

View File

@ -23,6 +23,7 @@ package ca.uhn.fhir.cli;
import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.system.HapiSystemProperties; import ca.uhn.fhir.system.HapiSystemProperties;
import ca.uhn.fhir.util.VersionUtil; import ca.uhn.fhir.util.VersionUtil;
import com.google.common.annotations.VisibleForTesting;
import com.helger.commons.io.file.FileHelper; import com.helger.commons.io.file.FileHelper;
import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.DefaultParser;
@ -43,6 +44,7 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.function.Consumer;
import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank;
import static org.fusesource.jansi.Ansi.ansi; import static org.fusesource.jansi.Ansi.ansi;
@ -63,6 +65,7 @@ public abstract class BaseApp {
ourLog = LoggerFactory.getLogger(App.class); ourLog = LoggerFactory.getLogger(App.class);
} }
private Consumer<BaseApp> myStartupHook = noop->{};
private MyShutdownHook myShutdownHook; private MyShutdownHook myShutdownHook;
private boolean myShutdownHookHasNotRun; private boolean myShutdownHookHasNotRun;
@ -256,6 +259,8 @@ public abstract class BaseApp {
ourDebugMode = true; ourDebugMode = true;
} }
myStartupHook.accept(this);
// Actually execute the command // Actually execute the command
command.run(parsedOptions); command.run(parsedOptions);
@ -331,6 +336,8 @@ public abstract class BaseApp {
private void exitDueToException(Throwable e) { private void exitDueToException(Throwable e) {
if (HapiSystemProperties.isTestModeEnabled()) { if (HapiSystemProperties.isTestModeEnabled()) {
ourLog.error("In test-mode - block exit with error status.");
ourLog.error("FAILURE: {}", e.getMessage());
if (e instanceof CommandFailureException) { if (e instanceof CommandFailureException) {
throw (CommandFailureException) e; throw (CommandFailureException) e;
} }
@ -358,6 +365,11 @@ public abstract class BaseApp {
} }
} }
@VisibleForTesting
public void setStartupHook(Consumer<BaseApp> theStartupHook) {
myStartupHook = theStartupHook;
}
private class MyShutdownHook extends Thread { private class MyShutdownHook extends Thread {
private final BaseCommand myFinalCommand; private final BaseCommand myFinalCommand;

View File

@ -144,7 +144,7 @@ public class BulkImportCommand extends BaseCommand {
.withAdditionalHeader(Constants.HEADER_PREFER, Constants.HEADER_PREFER_RESPOND_ASYNC) .withAdditionalHeader(Constants.HEADER_PREFER, Constants.HEADER_PREFER_RESPOND_ASYNC)
.execute(); .execute();
ourLog.info("Got response: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Got response: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
ourLog.info("Bulk import is now running. Do not terminate this command until all files have been uploaded."); ourLog.info("Bulk import is now running. Do not terminate this command until all files have been uploaded.");
checkJobComplete(outcome.getIdElement().toString(), client); checkJobComplete(outcome.getIdElement().toString(), client);

View File

@ -20,21 +20,25 @@ package ca.uhn.fhir.cli;
* #L% * #L%
*/ */
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
import ca.uhn.fhir.util.ParametersUtil; import ca.uhn.fhir.util.ParametersUtil;
import joptsimple.internal.Strings;
import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.ParseException; import org.apache.commons.cli.ParseException;
import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseParameters;
import org.hl7.fhir.r4.model.Parameters; import org.hl7.fhir.r4.model.Parameters;
import javax.annotation.Nonnull;
import java.util.List;
import java.util.Optional; import java.util.Optional;
import static ca.uhn.fhir.jpa.provider.BaseJpaSystemProvider.RESP_PARAM_SUCCESS; import static ca.uhn.fhir.jpa.provider.BaseJpaSystemProvider.RESP_PARAM_SUCCESS;
public class ReindexTerminologyCommand extends BaseRequestGeneratingCommand { public class ReindexTerminologyCommand extends BaseRequestGeneratingCommand {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ReindexTerminologyCommand.class); public static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ReindexTerminologyCommand.class);
static final String REINDEX_TERMINOLOGY = "reindex-terminology"; static final String REINDEX_TERMINOLOGY = "reindex-terminology";
@ -65,11 +69,11 @@ public class ReindexTerminologyCommand extends BaseRequestGeneratingCommand {
private void invokeOperation(IGenericClient theClient) { private void invokeOperation(IGenericClient theClient) {
IBaseParameters inputParameters = ParametersUtil.newInstance(myFhirCtx);
ourLog.info("Beginning freetext indexing - This may take a while..."); ourLog.info("Beginning freetext indexing - This may take a while...");
IBaseParameters response; IBaseParameters response;
// non-null errorMessage means failure
String errorMessage = null;
try { try {
response = theClient response = theClient
.operation() .operation()
@ -79,30 +83,40 @@ public class ReindexTerminologyCommand extends BaseRequestGeneratingCommand {
.execute(); .execute();
} catch (BaseServerResponseException e) { } catch (BaseServerResponseException e) {
int statusCode = e.getStatusCode();
errorMessage = e.getMessage();
if (e.getOperationOutcome() != null) { if (e.getOperationOutcome() != null) {
ourLog.error("Received the following response: {}{}", NL, errorMessage += " : " + e.getOperationOutcome().getFormatCommentsPre();
myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
} }
throw e; throw new CommandFailureException(Msg.code(2228) + "FAILURE: Received HTTP " + statusCode + ": " + errorMessage);
} }
Optional<String> isSuccessResponse = ParametersUtil.getNamedParameterValueAsString(myFhirCtx, response, RESP_PARAM_SUCCESS); Optional<String> isSuccessResponse = ParametersUtil.getNamedParameterValueAsString(myFhirCtx, response, RESP_PARAM_SUCCESS);
if ( ! isSuccessResponse.isPresent() ) { if ( ! isSuccessResponse.isPresent() ) {
ParametersUtil.addParameterToParametersBoolean(myFhirCtx, response, RESP_PARAM_SUCCESS, false); errorMessage = "Internal error. Command result unknown. Check system logs for details.";
ParametersUtil.addParameterToParametersString(myFhirCtx, response, "message", } else {
"Internal error. Command result unknown. Check system logs for details");
ourLog.error("Response:{}{}", NL, myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
return;
}
boolean succeeded = Boolean.parseBoolean( isSuccessResponse.get() ); boolean succeeded = Boolean.parseBoolean( isSuccessResponse.get() );
if ( ! succeeded) { if ( ! succeeded) {
ourLog.info("Response:{}{}", NL, myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); errorMessage = getResponseMessage(response);
return; }
} }
if (errorMessage != null) {
throw new CommandFailureException(Msg.code(2229) + "FAILURE: " + errorMessage);
} else {
ourLog.info("Recreation of terminology freetext indexes complete!"); ourLog.info("Recreation of terminology freetext indexes complete!");
ourLog.info("Response:{}{}", NL, myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.info("Response:{}{}", NL, getResponseMessage(response));
}
}
@Nonnull
private String getResponseMessage(IBaseParameters response) {
List<String> message = ParametersUtil.getNamedParameterValuesAsString(myFhirCtx, response, "message");
return Strings.join(message, NL);
} }

View File

@ -217,7 +217,7 @@ public class UploadTerminologyCommand extends BaseRequestGeneratingCommand {
ourLog.info("Beginning upload - This may take a while..."); ourLog.info("Beginning upload - This may take a while...");
if (ourLog.isDebugEnabled() || HapiSystemProperties.isTestModeEnabled()) { if (ourLog.isDebugEnabled() || HapiSystemProperties.isTestModeEnabled()) {
ourLog.info("Submitting parameters: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(inputParameters)); ourLog.debug("Submitting parameters: {}", myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(inputParameters));
} }
IBaseParameters response; IBaseParameters response;
@ -237,7 +237,7 @@ public class UploadTerminologyCommand extends BaseRequestGeneratingCommand {
ourLog.info("Upload complete!"); ourLog.info("Upload complete!");
ourLog.info("Response:\n{}", myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
} }
private void addFileToRequestBundle(IBaseParameters theInputParameters, String theFileName, byte[] theBytes) { private void addFileToRequestBundle(IBaseParameters theInputParameters, String theFileName, byte[] theBytes) {

View File

@ -66,7 +66,7 @@ public class ExportConceptMapToCsvCommandR4Test {
@ParameterizedTest @ParameterizedTest
@ValueSource(booleans = {true, false}) @ValueSource(booleans = {true, false})
public void testExportConceptMapToCsvCommand(boolean theIncludeTls) throws IOException { public void testExportConceptMapToCsvCommand(boolean theIncludeTls) throws IOException {
ourLog.info("ConceptMap:\n" + myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createConceptMap())); ourLog.debug("ConceptMap:\n" + myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createConceptMap()));
App.main(myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs( App.main(myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs(
new String[]{ new String[]{

View File

@ -145,7 +145,7 @@ public class ImportCsvToConceptMapCommandDstu3Test {
ConceptMap conceptMap = (ConceptMap) response.getEntryFirstRep().getResource(); ConceptMap conceptMap = (ConceptMap) response.getEntryFirstRep().getResource();
ourLog.info(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
assertEquals(myRestServerDstu3Helper.getBase() + "/ConceptMap/1/_history/1", conceptMap.getId()); assertEquals(myRestServerDstu3Helper.getBase() + "/ConceptMap/1/_history/1", conceptMap.getId());

View File

@ -155,7 +155,7 @@ public class ImportCsvToConceptMapCommandR4Test {
ConceptMap conceptMap = (ConceptMap) response.getEntryFirstRep().getResource(); ConceptMap conceptMap = (ConceptMap) response.getEntryFirstRep().getResource();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
assertEquals(myRestServerR4Helper.getBase() + "/ConceptMap/1/_history/1", conceptMap.getId()); assertEquals(myRestServerR4Helper.getBase() + "/ConceptMap/1/_history/1", conceptMap.getId());
@ -390,7 +390,7 @@ public class ImportCsvToConceptMapCommandR4Test {
ConceptMap conceptMap = (ConceptMap) response.getEntryFirstRep().getResource(); ConceptMap conceptMap = (ConceptMap) response.getEntryFirstRep().getResource();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
assertEquals(myRestServerR4Helper.getBase() + "/ConceptMap/1/_history/1", conceptMap.getId()); assertEquals(myRestServerR4Helper.getBase() + "/ConceptMap/1/_history/1", conceptMap.getId());

View File

@ -6,6 +6,9 @@ import ca.uhn.fhir.system.HapiSystemProperties;
import ca.uhn.fhir.test.utilities.RestServerR4Helper; import ca.uhn.fhir.test.utilities.RestServerR4Helper;
import ca.uhn.fhir.test.utilities.TlsAuthenticationTestHelper; import ca.uhn.fhir.test.utilities.TlsAuthenticationTestHelper;
import ca.uhn.fhir.util.ParametersUtil; import ca.uhn.fhir.util.ParametersUtil;
import ca.uhn.test.util.LogbackCaptureTestExtension;
import ch.qos.logback.classic.Logger;
import org.hamcrest.Matchers;
import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseParameters;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
@ -15,12 +18,13 @@ import org.junit.jupiter.params.provider.ValueSource;
import org.mockito.Spy; import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import java.io.ByteArrayOutputStream; import java.util.function.Consumer;
import java.io.PrintStream;
import static ca.uhn.fhir.jpa.provider.BaseJpaSystemProvider.RESP_PARAM_SUCCESS; import static ca.uhn.fhir.jpa.provider.BaseJpaSystemProvider.RESP_PARAM_SUCCESS;
import static ca.uhn.test.util.LogbackCaptureTestExtension.eventWithMessageContains;
import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.junit.jupiter.api.Assertions.fail; import static org.junit.jupiter.api.Assertions.fail;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doReturn;
@ -39,8 +43,8 @@ class ReindexTerminologyCommandTest {
@RegisterExtension @RegisterExtension
public TlsAuthenticationTestHelper myTlsAuthenticationTestHelper = new TlsAuthenticationTestHelper(); public TlsAuthenticationTestHelper myTlsAuthenticationTestHelper = new TlsAuthenticationTestHelper();
// Deliberately not registered - we manually run this later because App startup resets the logging.
private final ByteArrayOutputStream outputStreamCaptor = new ByteArrayOutputStream(); LogbackCaptureTestExtension myAppLogCapture;
static { static {
HapiSystemProperties.enableTestMode(); HapiSystemProperties.enableTestMode();
@ -54,21 +58,20 @@ class ReindexTerminologyCommandTest {
@ParameterizedTest @ParameterizedTest
@ValueSource(booleans = {true, false}) @ValueSource(booleans = {true, false})
public void testProviderMethodInvoked(boolean theIncludeTls) { public void testProviderMethodInvoked(boolean theIncludeTls) {
System.setOut(new PrintStream(outputStreamCaptor));
IBaseParameters retVal = ParametersUtil.newInstance(myContext); IBaseParameters retVal = ParametersUtil.newInstance(myContext);
ParametersUtil.addParameterToParametersBoolean(myContext, retVal, RESP_PARAM_SUCCESS, true); ParametersUtil.addParameterToParametersBoolean(myContext, retVal, RESP_PARAM_SUCCESS, true);
doReturn(retVal).when(myProvider).reindexTerminology(any()); doReturn(retVal).when(myProvider).reindexTerminology(any());
App.main(myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs( String[] args = myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs(
new String[]{ new String[]{
ReindexTerminologyCommand.REINDEX_TERMINOLOGY, ReindexTerminologyCommand.REINDEX_TERMINOLOGY,
"-v", "r4" "-v", "r4"
}, },
"-t", theIncludeTls, myRestServerR4Helper "-t", theIncludeTls, myRestServerR4Helper
)); );
runAppWithStartupHook(args, getLoggingStartupHook());
assertThat(outputStreamCaptor.toString().trim(), assertThat(myAppLogCapture.getLogEvents(), Matchers.not(hasItem(eventWithMessageContains("FAILURE"))));
outputStreamCaptor.toString().trim(), containsString("<valueBoolean value=\"true\"/>"));
} }
@ -79,13 +82,14 @@ class ReindexTerminologyCommandTest {
ParametersUtil.addParameterToParametersBoolean(myContext, retVal, RESP_PARAM_SUCCESS, true); ParametersUtil.addParameterToParametersBoolean(myContext, retVal, RESP_PARAM_SUCCESS, true);
doReturn(retVal).when(myProvider).reindexTerminology(any()); doReturn(retVal).when(myProvider).reindexTerminology(any());
try { String[] args = myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs(
App.main(myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs(
new String[]{ new String[]{
ReindexTerminologyCommand.REINDEX_TERMINOLOGY ReindexTerminologyCommand.REINDEX_TERMINOLOGY
}, },
"-t", theIncludeTls, myRestServerR4Helper "-t", theIncludeTls, myRestServerR4Helper
)); );
try {
App.main(args);
fail(); fail();
} catch (Error e) { } catch (Error e) {
assertThat(e.getMessage(), containsString("Missing required option: v")); assertThat(e.getMessage(), containsString("Missing required option: v"));
@ -118,49 +122,63 @@ class ReindexTerminologyCommandTest {
@ParameterizedTest @ParameterizedTest
@ValueSource(booleans = {true, false}) @ValueSource(booleans = {true, false})
public void testHandleUnexpectedResponse(boolean theIncludeTls) { public void testHandleUnexpectedResponse(boolean theIncludeTls) {
System.setOut(new PrintStream(outputStreamCaptor));
IBaseParameters retVal = ParametersUtil.newInstance(myContext); IBaseParameters retVal = ParametersUtil.newInstance(myContext);
doReturn(retVal).when(myProvider).reindexTerminology(any()); doReturn(retVal).when(myProvider).reindexTerminology(any());
App.main(myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs( String[] args = myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs(
new String[]{ new String[]{
ReindexTerminologyCommand.REINDEX_TERMINOLOGY, ReindexTerminologyCommand.REINDEX_TERMINOLOGY,
"-v", "r4" "-v", "r4"
}, },
"-t", theIncludeTls, myRestServerR4Helper "-t", theIncludeTls, myRestServerR4Helper
)); );
runAppWithStartupHook(args, getLoggingStartupHook());
assertThat(outputStreamCaptor.toString().trim(),
outputStreamCaptor.toString().trim(), containsString("<valueBoolean value=\"false\"/>"));
assertThat(outputStreamCaptor.toString().trim(),
outputStreamCaptor.toString().trim(), containsString("<valueString value=\"Internal error. " +
"Command result unknown. Check system logs for details\"/>"));
assertThat(myAppLogCapture.getLogEvents(), hasItem(eventWithMessageContains("FAILURE")));
assertThat(myAppLogCapture.getLogEvents(), hasItem(eventWithMessageContains("Internal error. Command result unknown. Check system logs for details")));
} }
@ParameterizedTest @ParameterizedTest
@ValueSource(booleans = {true, false}) @ValueSource(booleans = {true, false})
public void testHandleServiceError(boolean theIncludeTls) { public void testHandleServiceError(boolean theIncludeTls) {
System.setOut(new PrintStream(outputStreamCaptor));
IBaseParameters retVal = ParametersUtil.newInstance(myContext); IBaseParameters retVal = ParametersUtil.newInstance(myContext);
ParametersUtil.addParameterToParametersBoolean(myContext, retVal, RESP_PARAM_SUCCESS, false); ParametersUtil.addParameterToParametersBoolean(myContext, retVal, RESP_PARAM_SUCCESS, false);
ParametersUtil.addParameterToParametersString(myContext, retVal, "message", ParametersUtil.addParameterToParametersString(myContext, retVal, "message",
"Freetext service is not configured. Operation didn't run."); "Freetext service is not configured. Operation didn't run.");
doReturn(retVal).when(myProvider).reindexTerminology(any()); doReturn(retVal).when(myProvider).reindexTerminology(any());
App.main(myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs( // to keep logging verbose.
String[] args = myTlsAuthenticationTestHelper.createBaseRequestGeneratingCommandArgs(
new String[]{ new String[]{
ReindexTerminologyCommand.REINDEX_TERMINOLOGY, ReindexTerminologyCommand.REINDEX_TERMINOLOGY,
"-v", "r4" "-v", "r4",
"--debug" // to keep logging verbose.
}, },
"-t", theIncludeTls, myRestServerR4Helper "-t", theIncludeTls, myRestServerR4Helper
)); );
runAppWithStartupHook(args, getLoggingStartupHook());
assertThat(outputStreamCaptor.toString().trim(), assertThat(myAppLogCapture.getLogEvents(), hasItem(eventWithMessageContains("FAILURE")));
outputStreamCaptor.toString().trim(), containsString("<valueBoolean value=\"false\"/>")); assertThat(myAppLogCapture.getLogEvents(), hasItem(eventWithMessageContains("Freetext service is not configured. Operation didn't run.")));
assertThat(outputStreamCaptor.toString().trim(),
outputStreamCaptor.toString().trim(), containsString("<valueString value=\"Freetext service is not configured. Operation didn't run.\"/>"));
} }
static void runAppWithStartupHook(String[] args, Consumer<BaseApp> startupHook) {
App app = new App();
app.setStartupHook(startupHook);
try {
app.run(args);
} catch (CommandFailureException e) {
// expected
}
}
/**
* The CLI resets Logback logging, so our log hook needs to run inside the app.
*/
Consumer<BaseApp> getLoggingStartupHook() {
return (unused) -> {
myAppLogCapture = new LogbackCaptureTestExtension((Logger) BaseApp.ourLog);
myAppLogCapture.setUp();
};
}
} }

View File

@ -92,7 +92,7 @@ public class LoggingInterceptor implements IClientInterceptor {
try { try {
String content = theRequest.getRequestBodyFromStream(); String content = theRequest.getRequestBodyFromStream();
if (content != null) { if (content != null) {
myLog.info("Client request body:\n{}", content); myLog.debug("Client request body:\n{}", content);
} }
} catch (IllegalStateException | IOException e) { } catch (IllegalStateException | IOException e) {
myLog.warn("Failed to replay request contents (during logging attempt, actual FHIR call did not fail)", e); myLog.warn("Failed to replay request contents (during logging attempt, actual FHIR call did not fail)", e);
@ -154,7 +154,7 @@ public class LoggingInterceptor implements IClientInterceptor {
} catch (IllegalStateException e) { } catch (IllegalStateException e) {
throw new InternalErrorException(Msg.code(1405) + e); throw new InternalErrorException(Msg.code(1405) + e);
} }
myLog.info("Client response body:\n{}", new String(bytes, StandardCharsets.UTF_8)); myLog.debug("Client response body:\n{}", new String(bytes, StandardCharsets.UTF_8));
} else { } else {
myLog.info("Client response body: (none)"); myLog.info("Client response body: (none)");
} }

View File

@ -66,7 +66,7 @@ public class CreateCompositionAndGenerateDocument {
.returnResourceType(Bundle.class) .returnResourceType(Bundle.class)
.execute(); .execute();
ourLog.info("Document bundle: {}", ctx.newJsonParser().setPrettyPrint(true).encodeResourceToString(document)); ourLog.debug("Document bundle: {}", ctx.newJsonParser().setPrettyPrint(true).encodeResourceToString(document));
// END SNIPPET: CreateCompositionAndGenerateDocument // END SNIPPET: CreateCompositionAndGenerateDocument
} }

View File

@ -0,0 +1,5 @@
---
type: change
issue: 4430
title: "The ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor now logs request/response bodies at the DEBUG level.
This is changed from INFO level."

View File

@ -0,0 +1,4 @@
---
type: change
issue: 4430
title: "The cli reindex-terminology command reports errors with a simpler log message."

View File

@ -0,0 +1,79 @@
package ca.uhn.fhir.cql.r4;
import ca.uhn.fhir.cql.BaseCqlR4Test;
import ca.uhn.fhir.cql.common.provider.CqlProviderTestBase;
import ca.uhn.fhir.cql.r4.provider.MeasureOperationsProvider;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.Library;
import org.hl7.fhir.r4.model.Measure;
import org.hl7.fhir.r4.model.MeasureReport;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.IOException;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class CqlProviderR4Test extends BaseCqlR4Test implements CqlProviderTestBase {
private static final Logger ourLog = LoggerFactory.getLogger(CqlProviderR4Test.class);
private static final IdType measureId = new IdType("Measure", "measure-asf");
private static final String measure = "Measure/measure-asf";
private static final String patient = "Patient/Patient-6529";
private static final String periodStart = "2000-01-01";
private static final String periodEnd = "2019-12-31";
private static boolean bundlesLoaded = false;
@Autowired
IFhirResourceDao<Measure> myMeasureDao;
@Autowired
IFhirResourceDao<Library> myLibraryDao;
@Autowired
MeasureOperationsProvider myMeasureOperationsProvider;
public synchronized void loadBundles() throws IOException {
if (!bundlesLoaded) {
Bundle result = loadBundle("dstu3/hedis-ig/test-patient-6529-data.json");
bundlesLoaded = true;
}
}
@Test
public void testHedisIGEvaluateMeasureWithTimeframe() throws IOException {
loadBundles();
loadResource("r4/hedis-ig/library-asf-logic.json", myRequestDetails);
loadResource("r4/hedis-ig/measure-asf.json", myRequestDetails);
myPartitionHelper.clear();
MeasureReport report = myMeasureOperationsProvider.evaluateMeasure(measureId, periodStart, periodEnd, measure, "subject",
patient, null, null, null, null, null, null, myRequestDetails);
// Assert it worked
assertTrue(myPartitionHelper.wasCalled());
assertThat(report.getGroup(), hasSize(1));
assertThat(report.getGroup().get(0).getPopulation(), hasSize(3));
ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(report));
}
@Test
public void testHedisIGEvaluateMeasureNoTimeframe() throws IOException {
loadBundles();
loadResource("r4/hedis-ig/library-asf-logic.json", myRequestDetails);
loadResource("r4/hedis-ig/measure-asf.json", myRequestDetails);
myPartitionHelper.clear();
MeasureReport report = myMeasureOperationsProvider.evaluateMeasure(measureId, null, null, measure, "subject",
patient, null, null, null, null, null, null, myRequestDetails);
// Assert it worked
assertTrue(myPartitionHelper.wasCalled());
assertThat(report.getGroup(), hasSize(1));
assertThat(report.getGroup().get(0).getPopulation(), hasSize(3));
ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(report));
}
}

View File

@ -309,7 +309,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
obs2.setSubject(new Reference(patId.toString())); obs2.setSubject(new Reference(patId.toString()));
obs2.setEncounter(new Reference(encId.toString())); obs2.setEncounter(new Reference(encId.toString()));
obsId = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless(); obsId = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless();
//ourLog.info("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2)); //ourLog.debug("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2));
} }
{ {
//Search by chain //Search by chain
@ -368,7 +368,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
obs2.setStatus(Observation.ObservationStatus.FINAL); obs2.setStatus(Observation.ObservationStatus.FINAL);
obs2.setValue(new Quantity(81)); obs2.setValue(new Quantity(81));
id2 = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless(); id2 = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless();
//ourLog.info("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2)); //ourLog.debug("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2));
} }
{ {
Observation obs2b = new Observation(); Observation obs2b = new Observation();
@ -376,7 +376,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
obs2b.setStatus(Observation.ObservationStatus.FINAL); obs2b.setStatus(Observation.ObservationStatus.FINAL);
obs2b.setValue(new Quantity(81)); obs2b.setValue(new Quantity(81));
id2b = myObservationDao.create(obs2b, mySrd).getId().toUnqualifiedVersionless(); id2b = myObservationDao.create(obs2b, mySrd).getId().toUnqualifiedVersionless();
//ourLog.info("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2)); //ourLog.debug("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2));
} }
{ {
Observation obs3 = new Observation(); Observation obs3 = new Observation();
@ -385,7 +385,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
obs3.setStatus(Observation.ObservationStatus.FINAL); obs3.setStatus(Observation.ObservationStatus.FINAL);
obs3.setValue(new Quantity(81)); obs3.setValue(new Quantity(81));
id3 = myObservationDao.create(obs3, mySrd).getId().toUnqualifiedVersionless(); id3 = myObservationDao.create(obs3, mySrd).getId().toUnqualifiedVersionless();
//ourLog.info("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2)); //ourLog.debug("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2));
} }
{ {
// search just code // search just code
@ -433,7 +433,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
obs2.setStatus(Observation.ObservationStatus.FINAL); obs2.setStatus(Observation.ObservationStatus.FINAL);
obs2.setValue(new Quantity(81)); obs2.setValue(new Quantity(81));
id2 = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless(); id2 = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless();
//ourLog.info("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2)); //ourLog.debug("Observation {}", myFhirCtx.newJsonParser().encodeResourceToString(obs2));
} }
{ {
// don't look in the narrative when only searching code. // don't look in the narrative when only searching code.
@ -804,7 +804,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
ValueSet vs = loadResource(myFhirCtx, ValueSet.class, "/r4/expand-multi-vs-all.json"); ValueSet vs = loadResource(myFhirCtx, ValueSet.class, "/r4/expand-multi-vs-all.json");
ValueSet expanded = myValueSetDao.expand(vs, null); ValueSet expanded = myValueSetDao.expand(vs, null);
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
// All codes // All codes
List<String> codes = expanded List<String> codes = expanded
@ -828,7 +828,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
ValueSet expanded = myValueSetDao.expand(vs, null); ValueSet expanded = myValueSetDao.expand(vs, null);
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
// All codes // All codes
List<String> codes = expanded List<String> codes = expanded

View File

@ -591,7 +591,7 @@ abstract public class BaseMdmR4Test extends BaseJpaR4Test {
} }
for (IBaseResource r : theResource) { for (IBaseResource r : theResource) {
ourLog.info(myFhirContext.newJsonParser().encodeResourceToString(r)); ourLog.debug(myFhirContext.newJsonParser().encodeResourceToString(r));
} }
} }

View File

@ -2074,7 +2074,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test {
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2086,7 +2086,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test {
oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2098,7 +2098,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test {
oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2110,7 +2110,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test {
oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
@ -2841,7 +2841,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test {
myPatientDao.validate((Patient) parsedResource, null, rawResource, EncodingEnum.JSON, ValidationModeEnum.UPDATE, null, mySrd); myPatientDao.validate((Patient) parsedResource, null, rawResource, EncodingEnum.JSON, ValidationModeEnum.UPDATE, null, mySrd);
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
} }
} }

View File

@ -178,7 +178,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
assertEquals(2, resp.getEntry().size()); assertEquals(2, resp.getEntry().size());
assertEquals(BundleTypeEnum.BATCH_RESPONSE, resp.getTypeElement().getValueAsEnum()); assertEquals(BundleTypeEnum.BATCH_RESPONSE, resp.getTypeElement().getValueAsEnum());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
EntryResponse respEntry; EntryResponse respEntry;
// Bundle.entry[1] is create response // Bundle.entry[1] is create response
@ -214,7 +214,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, request); Bundle resp = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(18, resp.getEntry().size()); assertEquals(18, resp.getEntry().size());
} }
@ -1059,7 +1059,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertThat(resp.getEntry().get(0).getResponse().getLocation(), startsWith("Patient/a555-44-4444/_history/")); assertThat(resp.getEntry().get(0).getResponse().getLocation(), startsWith("Patient/a555-44-4444/_history/"));
assertThat(resp.getEntry().get(1).getResponse().getLocation(), startsWith("Patient/temp6789/_history/")); assertThat(resp.getEntry().get(1).getResponse().getLocation(), startsWith("Patient/temp6789/_history/"));
@ -1074,7 +1074,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
InputStream bundleRes = SystemProviderDstu2Test.class.getResourceAsStream("/simone_bundle3.xml"); InputStream bundleRes = SystemProviderDstu2Test.class.getResourceAsStream("/simone_bundle3.xml");
String bundle = IOUtils.toString(bundleRes); String bundle = IOUtils.toString(bundleRes);
Bundle output = mySystemDao.transaction(mySrd, myFhirContext.newXmlParser().parseResource(Bundle.class, bundle)); Bundle output = mySystemDao.transaction(mySrd, myFhirContext.newXmlParser().parseResource(Bundle.class, bundle));
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
} }
@Test @Test
@ -1086,7 +1086,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus());
assertEquals("201 Created", resp.getEntry().get(1).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(1).getResponse().getStatus());
@ -1147,7 +1147,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
} }
private void testTransactionOrderingValidateResponse(int pass, Bundle resp) { private void testTransactionOrderingValidateResponse(int pass, Bundle resp) {
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(4, resp.getEntry().size()); assertEquals(4, resp.getEntry().size());
assertEquals("200 OK", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", resp.getEntry().get(0).getResponse().getStatus());
if (pass == 0) { if (pass == 0) {
@ -1301,7 +1301,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, request); Bundle resp = mySystemDao.transaction(mySrd, request);
assertEquals(2, resp.getEntry().size()); assertEquals(2, resp.getEntry().size());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
Entry nextEntry = resp.getEntry().get(0); Entry nextEntry = resp.getEntry().get(0);
assertEquals("200 OK", nextEntry.getResponse().getStatus()); assertEquals("200 OK", nextEntry.getResponse().getStatus());
@ -1445,7 +1445,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle initialBundleResponse = mySystemDao.transaction(mySrd, request); Bundle initialBundleResponse = mySystemDao.transaction(mySrd, request);
assertEquals(1, initialBundleResponse.getEntry().size()); assertEquals(1, initialBundleResponse.getEntry().size());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(initialBundleResponse)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(initialBundleResponse));
Entry initialBundleResponseEntry = initialBundleResponse.getEntry().get(0); Entry initialBundleResponseEntry = initialBundleResponse.getEntry().get(0);
assertEquals("201 Created", initialBundleResponseEntry.getResponse().getStatus()); assertEquals("201 Created", initialBundleResponseEntry.getResponse().getStatus());
@ -1455,7 +1455,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle secondBundleResponse = mySystemDao.transaction(mySrd, request); Bundle secondBundleResponse = mySystemDao.transaction(mySrd, request);
assertEquals(1, secondBundleResponse.getEntry().size()); assertEquals(1, secondBundleResponse.getEntry().size());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(secondBundleResponse)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(secondBundleResponse));
Entry secondBundleResponseEntry = secondBundleResponse.getEntry().get(0); Entry secondBundleResponseEntry = secondBundleResponse.getEntry().get(0);
assertEquals("200 OK", secondBundleResponseEntry.getResponse().getStatus()); assertEquals("200 OK", secondBundleResponseEntry.getResponse().getStatus());
@ -1474,7 +1474,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle initialBundleResponse = mySystemDao.transaction(mySrd, request); Bundle initialBundleResponse = mySystemDao.transaction(mySrd, request);
assertEquals(1, initialBundleResponse.getEntry().size()); assertEquals(1, initialBundleResponse.getEntry().size());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(initialBundleResponse)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(initialBundleResponse));
Entry initialBundleResponseEntry = initialBundleResponse.getEntry().get(0); Entry initialBundleResponseEntry = initialBundleResponse.getEntry().get(0);
assertEquals("201 Created", initialBundleResponseEntry.getResponse().getStatus()); assertEquals("201 Created", initialBundleResponseEntry.getResponse().getStatus());
@ -1482,7 +1482,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle secondBundleResponse = mySystemDao.transaction(mySrd, request); Bundle secondBundleResponse = mySystemDao.transaction(mySrd, request);
assertEquals(1, secondBundleResponse.getEntry().size()); assertEquals(1, secondBundleResponse.getEntry().size());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(secondBundleResponse)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(secondBundleResponse));
Entry secondBundleResponseEntry = secondBundleResponse.getEntry().get(0); Entry secondBundleResponseEntry = secondBundleResponse.getEntry().get(0);
assertEquals("200 OK", secondBundleResponseEntry.getResponse().getStatus()); assertEquals("200 OK", secondBundleResponseEntry.getResponse().getStatus());
@ -1603,7 +1603,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input); Bundle inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input);
Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle); Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
} }
@Test @Test
@ -1667,7 +1667,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
//@formatter:on //@formatter:on
Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle); Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
assertEquals(3, outputBundle.getEntry().size()); assertEquals(3, outputBundle.getEntry().size());
IdDt id0 = new IdDt(outputBundle.getEntry().get(0).getResponse().getLocation()); IdDt id0 = new IdDt(outputBundle.getEntry().get(0).getResponse().getLocation());
@ -1692,7 +1692,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
String input = IOUtils.toString(getClass().getResource("/dstu3-post1.xml"), StandardCharsets.UTF_8); String input = IOUtils.toString(getClass().getResource("/dstu3-post1.xml"), StandardCharsets.UTF_8);
Bundle request = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle request = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle response = mySystemDao.transaction(mySrd, request); Bundle response = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals(1, response.getEntry().size()); assertEquals(1, response.getEntry().size());
assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus());
@ -1704,7 +1704,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
input = IOUtils.toString(getClass().getResource("/dstu3-post2.xml"), StandardCharsets.UTF_8); input = IOUtils.toString(getClass().getResource("/dstu3-post2.xml"), StandardCharsets.UTF_8);
request = myFhirContext.newXmlParser().parseResource(Bundle.class, input); request = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
response = mySystemDao.transaction(mySrd, request); response = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals(1, response.getEntry().size()); assertEquals(1, response.getEntry().size());
assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus());
@ -1713,7 +1713,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
assertEquals(id, id2); assertEquals(id, id2);
Patient patient = myPatientDao.read(new IdType(id), mySrd); Patient patient = myPatientDao.read(new IdType(id), mySrd);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals("Joshua", patient.getNameFirstRep().getGivenAsSingleString()); assertEquals("Joshua", patient.getNameFirstRep().getGivenAsSingleString());
} }
@ -1732,10 +1732,10 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
mo.setMedication(new ResourceReferenceDt(medId)); mo.setMedication(new ResourceReferenceDt(medId));
bundle.addEntry().setResource(mo).setFullUrl(mo.getId().getValue()).getRequest().setMethod(HTTPVerbEnum.POST); bundle.addEntry().setResource(mo).setFullUrl(mo.getId().getValue()).getRequest().setMethod(HTTPVerbEnum.POST);
ourLog.info("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
Bundle outcome = mySystemDao.transaction(mySrd, bundle); Bundle outcome = mySystemDao.transaction(mySrd, bundle);
ourLog.info("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
IdDt medId1 = new IdDt(outcome.getEntry().get(0).getResponse().getLocation()); IdDt medId1 = new IdDt(outcome.getEntry().get(0).getResponse().getLocation());
IdDt medOrderId1 = new IdDt(outcome.getEntry().get(1).getResponse().getLocation()); IdDt medOrderId1 = new IdDt(outcome.getEntry().get(1).getResponse().getLocation());
@ -1792,7 +1792,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, res); Bundle resp = mySystemDao.transaction(mySrd, res);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(BundleTypeEnum.TRANSACTION_RESPONSE, resp.getTypeElement().getValueAsEnum()); assertEquals(BundleTypeEnum.TRANSACTION_RESPONSE, resp.getTypeElement().getValueAsEnum());
assertEquals(3, resp.getEntry().size()); assertEquals(3, resp.getEntry().size());
@ -1833,7 +1833,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, res); Bundle resp = mySystemDao.transaction(mySrd, res);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(BundleTypeEnum.TRANSACTION_RESPONSE, resp.getTypeElement().getValueAsEnum()); assertEquals(BundleTypeEnum.TRANSACTION_RESPONSE, resp.getTypeElement().getValueAsEnum());
assertEquals(3, resp.getEntry().size()); assertEquals(3, resp.getEntry().size());
@ -1983,7 +1983,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
drEntry.setResource(dr).setFullUrl(dr.getId()).getRequest().setUrl("DiagnosticReport").setMethod(HTTPVerbEnum.POST); drEntry.setResource(dr).setFullUrl(dr.getId()).getRequest().setUrl("DiagnosticReport").setMethod(HTTPVerbEnum.POST);
transactionBundle.addEntry(drEntry); transactionBundle.addEntry(drEntry);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(transactionBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(transactionBundle));
Bundle transactionResp = mySystemDao.transaction(mySrd, transactionBundle); Bundle transactionResp = mySystemDao.transaction(mySrd, transactionBundle);

View File

@ -229,7 +229,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
String input = IOUtils.toString(getClass().getResourceAsStream("/basic-stu3.xml"), StandardCharsets.UTF_8); String input = IOUtils.toString(getClass().getResourceAsStream("/basic-stu3.xml"), StandardCharsets.UTF_8);
String respString = myClient.transaction().withBundle(input).prettyPrint().execute(); String respString = myClient.transaction().withBundle(input).prettyPrint().execute();
ourLog.info(respString); ourLog.debug(respString);
ca.uhn.fhir.model.dstu2.resource.Bundle bundle = myFhirContext.newXmlParser().parseResource(ca.uhn.fhir.model.dstu2.resource.Bundle.class, respString); ca.uhn.fhir.model.dstu2.resource.Bundle bundle = myFhirContext.newXmlParser().parseResource(ca.uhn.fhir.model.dstu2.resource.Bundle.class, respString);
IdDt id = new IdDt(bundle.getEntry().get(0).getResponse().getLocation()); IdDt id = new IdDt(bundle.getEntry().get(0).getResponse().getLocation());
@ -249,7 +249,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
ca.uhn.fhir.model.dstu2.resource.Bundle bundle = client.read().resource(ca.uhn.fhir.model.dstu2.resource.Bundle.class).withId(id).execute(); ca.uhn.fhir.model.dstu2.resource.Bundle bundle = client.read().resource(ca.uhn.fhir.model.dstu2.resource.Bundle.class).withId(id).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
} }
@Test @Test
@ -503,7 +503,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
assertEquals(201, response.getStatusLine().getStatusCode()); assertEquals(201, response.getStatusLine().getStatusCode());
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(response.toString()); ourLog.info(response.toString());
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, startsWith("<Patient xmlns=\"http://hl7.org/fhir\">")); assertThat(respString, startsWith("<Patient xmlns=\"http://hl7.org/fhir\">"));
assertThat(respString, endsWith("</Patient>")); assertThat(respString, endsWith("</Patient>"));
//assertThat(respString, containsString("<OperationOutcome xmlns=\"http://hl7.org/fhir\">")); //assertThat(respString, containsString("<OperationOutcome xmlns=\"http://hl7.org/fhir\">"));
@ -526,7 +526,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
assertEquals(201, response.getStatusLine().getStatusCode()); assertEquals(201, response.getStatusLine().getStatusCode());
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(response.toString()); ourLog.info(response.toString());
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, containsString("<OperationOutcome xmlns=\"http://hl7.org/fhir\">")); assertThat(respString, containsString("<OperationOutcome xmlns=\"http://hl7.org/fhir\">"));
} finally { } finally {
response.getEntity().getContent().close(); response.getEntity().getContent().close();
@ -621,7 +621,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(res)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(res));
assertEquals(3, res.getEntry().size()); assertEquals(3, res.getEntry().size());
assertEquals(1, BundleUtil.toListOfResourcesOfType(myFhirContext, res, Encounter.class).size()); assertEquals(1, BundleUtil.toListOfResourcesOfType(myFhirContext, res, Encounter.class).size());
@ -788,7 +788,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
} }
String resp = b.toString(); String resp = b.toString();
ourLog.info("Resp: {}", resp); ourLog.debug("Resp: {}", resp);
} catch (SocketTimeoutException e) { } catch (SocketTimeoutException e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
@ -1188,7 +1188,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
ca.uhn.fhir.model.dstu2.resource.Bundle resp = myClient.transaction().withBundle(b).execute(); ca.uhn.fhir.model.dstu2.resource.Bundle resp = myClient.transaction().withBundle(b).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
IdDt patientId = new IdDt(resp.getEntry().get(0).getResponse().getLocation()); IdDt patientId = new IdDt(resp.getEntry().get(0).getResponse().getLocation());
assertEquals("Patient", patientId.getResourceType()); assertEquals("Patient", patientId.getResourceType());
@ -2224,7 +2224,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2236,7 +2236,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2248,7 +2248,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2260,7 +2260,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
String uri = myServerBase + "/Observation?_sort=code-value-quantity"; String uri = myServerBase + "/Observation?_sort=code-value-quantity";
@ -2272,7 +2272,7 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
found = myFhirContext.newXmlParser().parseResource(Bundle.class, output); found = myFhirContext.newXmlParser().parseResource(Bundle.class, output);
} }
ourLog.info("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(found)); ourLog.debug("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(found));
List<IIdType> list = toUnqualifiedVersionlessIds(found); List<IIdType> list = toUnqualifiedVersionlessIds(found);
assertEquals(4, found.getEntry().size()); assertEquals(4, found.getEntry().size());

View File

@ -375,7 +375,7 @@ public class SystemProviderDstu2Test extends BaseJpaDstu2Test {
req.setType(BundleTypeEnum.TRANSACTION); req.setType(BundleTypeEnum.TRANSACTION);
req.addEntry().getRequest().setMethod(HTTPVerbEnum.GET).setUrl("Patient?"); req.addEntry().getRequest().setMethod(HTTPVerbEnum.GET).setUrl("Patient?");
Bundle resp = ourClient.transaction().withBundle(req).execute(); Bundle resp = ourClient.transaction().withBundle(req).execute();
ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(1, resp.getEntry().size()); assertEquals(1, resp.getEntry().size());
Bundle respSub = (Bundle) resp.getEntry().get(0).getResource(); Bundle respSub = (Bundle) resp.getEntry().get(0).getResource();
@ -399,7 +399,7 @@ public class SystemProviderDstu2Test extends BaseJpaDstu2Test {
req.setType(BundleTypeEnum.TRANSACTION); req.setType(BundleTypeEnum.TRANSACTION);
req.addEntry().getRequest().setMethod(HTTPVerbEnum.GET).setUrl("Patient?_summary=count"); req.addEntry().getRequest().setMethod(HTTPVerbEnum.GET).setUrl("Patient?_summary=count");
Bundle resp = ourClient.transaction().withBundle(req).execute(); Bundle resp = ourClient.transaction().withBundle(req).execute();
ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(1, resp.getEntry().size()); assertEquals(1, resp.getEntry().size());
Bundle respSub = (Bundle) resp.getEntry().get(0).getResource(); Bundle respSub = (Bundle) resp.getEntry().get(0).getResource();

View File

@ -130,7 +130,7 @@ public class SystemProviderTransactionSearchDstu2Test extends BaseJpaDstu2Test {
myDaoConfig.setMaximumSearchResultCountInTransaction(100); myDaoConfig.setMaximumSearchResultCountInTransaction(100);
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -153,7 +153,7 @@ public class SystemProviderTransactionSearchDstu2Test extends BaseJpaDstu2Test {
.setUrl("Patient?_count=5&_sort=name"); .setUrl("Patient?_count=5&_sort=name");
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -188,7 +188,7 @@ public class SystemProviderTransactionSearchDstu2Test extends BaseJpaDstu2Test {
} }
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(30, output.getEntry().size()); assertEquals(30, output.getEntry().size());
for (int i = 0; i < 30; i++) { for (int i = 0; i < 30; i++) {
@ -215,7 +215,7 @@ public class SystemProviderTransactionSearchDstu2Test extends BaseJpaDstu2Test {
myDaoConfig.setMaximumSearchResultCountInTransaction(100); myDaoConfig.setMaximumSearchResultCountInTransaction(100);
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -238,7 +238,7 @@ public class SystemProviderTransactionSearchDstu2Test extends BaseJpaDstu2Test {
.setUrl("Patient?_count=5&_sort=name"); .setUrl("Patient?_count=5&_sort=name");
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -273,7 +273,7 @@ public class SystemProviderTransactionSearchDstu2Test extends BaseJpaDstu2Test {
} }
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(30, output.getEntry().size()); assertEquals(30, output.getEntry().size());
for (int i = 0; i < 30; i++) { for (int i = 0; i < 30; i++) {

View File

@ -45,7 +45,7 @@ public class ValidatorAcrossVersionsTest {
resp.setAuthored(DateTimeDt.withCurrentTime()); resp.setAuthored(DateTimeDt.withCurrentTime());
ValidationResult result = val.validateWithResult(resp); ValidationResult result = val.validateWithResult(resp);
ourLog.info(ctxDstu2.newJsonParser().setPrettyPrint(true).encodeResourceToString(result.toOperationOutcome())); ourLog.debug(ctxDstu2.newJsonParser().setPrettyPrint(true).encodeResourceToString(result.toOperationOutcome()));
assertEquals(2, result.getMessages().size()); assertEquals(2, result.getMessages().size());
assertEquals("QuestionnaireResponse.status: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse)", result.getMessages().get(0).getMessage()); assertEquals("QuestionnaireResponse.status: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse)", result.getMessages().get(0).getMessage());

View File

@ -63,7 +63,7 @@ public class FhirResourceDaoDstu3ConceptMapTest extends BaseJpaDstu3Test {
public void testTranslateByCodeSystemsAndSourceCodeOneToMany() { public void testTranslateByCodeSystemsAndSourceCodeOneToMany() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override

View File

@ -37,7 +37,7 @@ public class FhirResourceDaoDstu3ContainedTest extends BaseJpaDstu3Test {
p2.addName().setFamily("MYFAMILY").addGiven("MYGIVEN"); p2.addName().setFamily("MYFAMILY").addGiven("MYGIVEN");
IIdType pid2 = myPatientDao.create(p2, mySrd).getId().toUnqualifiedVersionless(); IIdType pid2 = myPatientDao.create(p2, mySrd).getId().toUnqualifiedVersionless();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(o2)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(o2));
SearchParameterMap map = new SearchParameterMap(); SearchParameterMap map = new SearchParameterMap();

View File

@ -97,7 +97,7 @@ public class FhirResourceDaoDstu3PhoneticSearchNoFtTest extends BaseJpaDstu3Test
patient.addName().addGiven(GALE); patient.addName().addGiven(GALE);
patient.addAddress().addLine(ADDRESS); patient.addAddress().addLine(ADDRESS);
patient.addTelecom().setValue(PHONE); patient.addTelecom().setValue(PHONE);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
IIdType pId = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); IIdType pId = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless();
@ -151,7 +151,7 @@ public class FhirResourceDaoDstu3PhoneticSearchNoFtTest extends BaseJpaDstu3Test
searchParameter.addExtension() searchParameter.addExtension()
.setUrl(HapiExtensions.EXT_SEARCHPARAM_PHONETIC_ENCODER) .setUrl(HapiExtensions.EXT_SEARCHPARAM_PHONETIC_ENCODER)
.setValue(new StringType(theEncoder.name())); .setValue(new StringType(theEncoder.name()));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter));
mySearchParameterDao.create(searchParameter, mySrd).getId().toUnqualifiedVersionless(); mySearchParameterDao.create(searchParameter, mySrd).getId().toUnqualifiedVersionless();
} }

View File

@ -986,7 +986,7 @@ public class FhirResourceDaoDstu3SearchCustomSearchParamTest extends BaseJpaDstu
sp.setExpression("Observation.specimen.resolve().receivedTime"); sp.setExpression("Observation.specimen.resolve().receivedTime");
sp.setXpathUsage(SearchParameter.XPathUsageType.NORMAL); sp.setXpathUsage(SearchParameter.XPathUsageType.NORMAL);
sp.setStatus(Enumerations.PublicationStatus.ACTIVE); sp.setStatus(Enumerations.PublicationStatus.ACTIVE);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp));
mySearchParameterDao.create(sp); mySearchParameterDao.create(sp);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();

View File

@ -23,7 +23,7 @@ public class FhirResourceDaoDstu3StructureDefinitionTest extends BaseJpaDstu3Tes
assertEquals(0, sd.getSnapshot().getElement().size()); assertEquals(0, sd.getSnapshot().getElement().size());
StructureDefinition output = myStructureDefinitionDao.generateSnapshot(sd, "http://foo", null, "THE BEST PROFILE"); StructureDefinition output = myStructureDefinitionDao.generateSnapshot(sd, "http://foo", null, "THE BEST PROFILE");
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(54, output.getSnapshot().getElement().size()); assertEquals(54, output.getSnapshot().getElement().size());
} }

View File

@ -334,7 +334,7 @@ public class FhirResourceDaoDstu3TerminologyTest extends BaseJpaDstu3Test {
ValueSet result = myValueSetDao.expandByIdentifier("http://hl7.org/fhir/ValueSet/doc-typecodes", new ValueSetExpansionOptions().setFilter("")); ValueSet result = myValueSetDao.expandByIdentifier("http://hl7.org/fhir/ValueSet/doc-typecodes", new ValueSetExpansionOptions().setFilter(""));
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(result)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(result));
} }

View File

@ -2677,7 +2677,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test {
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2689,7 +2689,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test {
oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2701,7 +2701,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test {
oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -2713,7 +2713,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test {
oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }

View File

@ -78,9 +78,9 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
qr.addItem().setLinkId("A").addAnswer().setValue(new StringType("AAA")); qr.addItem().setLinkId("A").addAnswer().setValue(new StringType("AAA"));
MethodOutcome results = myQuestionnaireResponseDao.validate(qr, null, null, null, null, null, null); MethodOutcome results = myQuestionnaireResponseDao.validate(qr, null, null, null, null, null, null);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(results.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(results.getOperationOutcome()));
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
fail(e.toString()); fail(e.toString());
} }
@ -96,7 +96,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
qr.addItem().setLinkId("A").addAnswer().setValue(new StringType("AAA")); qr.addItem().setLinkId("A").addAnswer().setValue(new StringType("AAA"));
MethodOutcome results = myQuestionnaireResponseDao.validate(qr, null, null, null, null, null, null); MethodOutcome results = myQuestionnaireResponseDao.validate(qr, null, null, null, null, null, null);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(results.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(results.getOperationOutcome()));
ourLog.info("Clearing cache"); ourLog.info("Clearing cache");
myValidationSupport.invalidateCaches(); myValidationSupport.invalidateCaches();
@ -107,7 +107,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
myQuestionnaireResponseDao.validate(qr, null, null, null, null, null, null); myQuestionnaireResponseDao.validate(qr, null, null, null, null, null, null);
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
// good // good
} }
@ -123,7 +123,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
myValueSetDao.create(vs); myValueSetDao.create(vs);
ValueSet expansion = myValueSetDao.expandByIdentifier("http://ccim.on.ca/fhir/iar/ValueSet/iar-citizenship-status", null); ValueSet expansion = myValueSetDao.expandByIdentifier("http://ccim.on.ca/fhir/iar/ValueSet/iar-citizenship-status", null);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertThat(expansion.getExpansion().getContains().stream().map(t->t.getCode()).collect(Collectors.toList()), containsInAnyOrder( assertThat(expansion.getExpansion().getContains().stream().map(t->t.getCode()).collect(Collectors.toList()), containsInAnyOrder(
"CDN", "PR", "TR", "REF", "UNK", "ASKU" "CDN", "PR", "TR", "REF", "UNK", "ASKU"
@ -176,7 +176,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
try { try {
MethodOutcome outcome = myQuestionnaireResponseDao.validate(qr, null, null, null, ValidationModeEnum.CREATE, null, mySrd); MethodOutcome outcome = myQuestionnaireResponseDao.validate(qr, null, null, null, ValidationModeEnum.CREATE, null, mySrd);
OperationOutcome oo = (OperationOutcome) outcome.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) outcome.getOperationOutcome();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
OperationOutcome oo = (OperationOutcome) e.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) e.getOperationOutcome();
@ -190,7 +190,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
String raw = myFhirContext.newJsonParser().encodeResourceToString(qr); String raw = myFhirContext.newJsonParser().encodeResourceToString(qr);
MethodOutcome outcome = myQuestionnaireResponseDao.validate(qr, null, raw, EncodingEnum.JSON, ValidationModeEnum.CREATE, null, mySrd); MethodOutcome outcome = myQuestionnaireResponseDao.validate(qr, null, raw, EncodingEnum.JSON, ValidationModeEnum.CREATE, null, mySrd);
OperationOutcome oo = (OperationOutcome) outcome.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) outcome.getOperationOutcome();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
OperationOutcome oo = (OperationOutcome) e.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) e.getOperationOutcome();
@ -212,7 +212,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
try { try {
myStructureDefinitionDao.validate(sd, null, null, null, ValidationModeEnum.UPDATE, null, mySrd); myStructureDefinitionDao.validate(sd, null, null, null, ValidationModeEnum.UPDATE, null, mySrd);
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
} }
ourLog.info("Done validation"); ourLog.info("Done validation");
@ -237,11 +237,11 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
try { try {
MethodOutcome outcome = myBundleDao.validate(document, null, null, null, ValidationModeEnum.CREATE, null, mySrd); MethodOutcome outcome = myBundleDao.validate(document, null, null, null, ValidationModeEnum.CREATE, null, mySrd);
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
} }
ourLog.info("Done validation"); ourLog.info("Done validation");
// ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome.getOperationOutcome())); // ourLog.debug(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome.getOperationOutcome()));
} }
@Test @Test
@ -340,7 +340,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
try { try {
// Expected to throw exception // Expected to throw exception
MethodOutcome output = myObservationDao.validate(input, null, encoded, EncodingEnum.JSON, mode, null, mySrd); MethodOutcome output = myObservationDao.validate(input, null, encoded, EncodingEnum.JSON, mode, null, mySrd);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output.getOperationOutcome()));
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
OperationOutcome oo = (OperationOutcome) e.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) e.getOperationOutcome();
@ -473,10 +473,10 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
try { try {
MethodOutcome results = myQuestionnaireDao.validate(null, null, input, EncodingEnum.XML, ValidationModeEnum.UPDATE, null, mySrd); MethodOutcome results = myQuestionnaireDao.validate(null, null, input, EncodingEnum.XML, ValidationModeEnum.UPDATE, null, mySrd);
OperationOutcome oo = (OperationOutcome) results.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) results.getOperationOutcome();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
// this is a failure of the test // this is a failure of the test
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
throw e; throw e;
} }
} }
@ -501,7 +501,7 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
assertThat(encoded, containsString("No issues detected")); assertThat(encoded, containsString("No issues detected"));
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
// not expected, but let's log the error // not expected, but let's log the error
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
fail(e.toString()); fail(e.toString());
} }
} }

View File

@ -129,7 +129,7 @@ public class FhirResourceDaoDstu3ValueSetTest extends BaseJpaDstu3Test {
assertEquals("http://hl7.org/fhir/ValueSet/endpoint-payload-type", vs.getUrl()); assertEquals("http://hl7.org/fhir/ValueSet/endpoint-payload-type", vs.getUrl());
ValueSet expansion = myValueSetDao.expand(vs.getIdElement(), null, mySrd); ValueSet expansion = myValueSetDao.expand(vs.getIdElement(), null, mySrd);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expansion));
} }
@Test @Test

View File

@ -253,7 +253,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle response = mySystemDao.transaction(null, request); Bundle response = mySystemDao.transaction(null, request);
ourLog.info("Response:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
List<String> responseTypes = response List<String> responseTypes = response
.getEntry() .getEntry()
@ -292,7 +292,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
assertEquals("404 Not Found", response.getEntry().get(1).getResponse().getStatus()); assertEquals("404 Not Found", response.getEntry().get(1).getResponse().getStatus());
OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity()); assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity());
assertEquals(Msg.code(2001) + "Resource Patient/BABABABA is not known", oo.getIssue().get(0).getDiagnostics()); assertEquals(Msg.code(2001) + "Resource Patient/BABABABA is not known", oo.getIssue().get(0).getDiagnostics());
} }
@ -326,7 +326,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
assertEquals("400 Bad Request", response.getEntry().get(1).getResponse().getStatus()); assertEquals("400 Bad Request", response.getEntry().get(1).getResponse().getStatus());
OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity()); assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity());
assertThat(oo.getIssue().get(0).getDiagnostics(), containsString("Unknown search parameter")); assertThat(oo.getIssue().get(0).getDiagnostics(), containsString("Unknown search parameter"));
} }
@ -365,7 +365,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
.getRequest().setMethod(HTTPVerb.POST); .getRequest().setMethod(HTTPVerb.POST);
Bundle resp = mySystemDao.transaction(mySrd, inputBundle); Bundle resp = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
IdType epId = new IdType(resp.getEntry().get(0).getResponse().getLocation()); IdType epId = new IdType(resp.getEntry().get(0).getResponse().getLocation());
IdType condId = new IdType(resp.getEntry().get(1).getResponse().getLocation()); IdType condId = new IdType(resp.getEntry().get(1).getResponse().getLocation());
@ -397,9 +397,9 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
.getRequest().setMethod(HTTPVerb.DELETE) .getRequest().setMethod(HTTPVerb.DELETE)
.setUrl(condId.toUnqualifiedVersionless().getValue()); .setUrl(condId.toUnqualifiedVersionless().getValue());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(inputBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(inputBundle));
resp = mySystemDao.transaction(mySrd, inputBundle); resp = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
// They should now be deleted // They should now be deleted
try { try {
@ -421,7 +421,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
ourLog.info("Bundle has {} resources", bundle); ourLog.info("Bundle has {} resources", bundle);
Bundle output = mySystemDao.transaction(mySrd, bundle); Bundle output = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
} }
@ -434,11 +434,11 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle output = mySystemDao.transaction(mySrd, bundle); Bundle output = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
IdType id = new IdType(output.getEntry().get(1).getResponse().getLocation()); IdType id = new IdType(output.getEntry().get(1).getResponse().getLocation());
MedicationRequest mo = myMedicationRequestDao.read(id); MedicationRequest mo = myMedicationRequestDao.read(id);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(mo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(mo));
} }
@Test @Test
@ -636,7 +636,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle bundle = myFhirContext.newJsonParser().parseResource(Bundle.class, inputBundleString); Bundle bundle = myFhirContext.newJsonParser().parseResource(Bundle.class, inputBundleString);
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus());
} }
@ -657,7 +657,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
assertEquals(2, resp.getEntry().size()); assertEquals(2, resp.getEntry().size());
assertEquals(BundleType.BATCHRESPONSE, resp.getTypeElement().getValue()); assertEquals(BundleType.BATCHRESPONSE, resp.getTypeElement().getValue());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
BundleEntryResponseComponent respEntry; BundleEntryResponseComponent respEntry;
// Bundle.entry[0] is create response // Bundle.entry[0] is create response
@ -977,7 +977,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
assertEquals("404 Not Found", response.getEntry().get(1).getResponse().getStatus()); assertEquals("404 Not Found", response.getEntry().get(1).getResponse().getStatus());
OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity()); assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity());
assertEquals(Msg.code(2001) + "Resource Patient/BABABABA is not known", oo.getIssue().get(0).getDiagnostics()); assertEquals(Msg.code(2001) + "Resource Patient/BABABABA is not known", oo.getIssue().get(0).getDiagnostics());
} }
@ -1011,7 +1011,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
assertEquals("400 Bad Request", response.getEntry().get(1).getResponse().getStatus()); assertEquals("400 Bad Request", response.getEntry().get(1).getResponse().getStatus());
OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity()); assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity());
assertThat(oo.getIssue().get(0).getDiagnostics(), containsString("Unknown search parameter")); assertThat(oo.getIssue().get(0).getDiagnostics(), containsString("Unknown search parameter"));
} }
@ -1432,7 +1432,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
IBundleProvider history = mySystemDao.history(null, null, null, null); IBundleProvider history = mySystemDao.history(null, null, null, null);
Bundle list = toBundle(history); Bundle list = toBundle(history);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(list)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(list));
assertEquals(6, list.getEntry().size()); assertEquals(6, list.getEntry().size());
@ -1678,7 +1678,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertThat(resp.getEntry().get(0).getResponse().getLocation(), startsWith("Patient/a555-44-4444/_history/")); assertThat(resp.getEntry().get(0).getResponse().getLocation(), startsWith("Patient/a555-44-4444/_history/"));
assertThat(resp.getEntry().get(1).getResponse().getLocation(), startsWith("Patient/temp6789/_history/")); assertThat(resp.getEntry().get(1).getResponse().getLocation(), startsWith("Patient/temp6789/_history/"));
@ -1694,7 +1694,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle response = mySystemDao.transaction(mySrd, bundle); Bundle response = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus());
assertThat(response.getEntry().get(0).getResponse().getLocation(), matchesPattern("Practitioner/[0-9]+/_history/1")); assertThat(response.getEntry().get(0).getResponse().getLocation(), matchesPattern("Practitioner/[0-9]+/_history/1"));
@ -1705,7 +1705,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input); bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
response = mySystemDao.transaction(mySrd, bundle); response = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus());
assertThat(response.getEntry().get(0).getResponse().getLocation(), matchesPattern("Practitioner/[0-9]+/_history/1")); assertThat(response.getEntry().get(0).getResponse().getLocation(), matchesPattern("Practitioner/[0-9]+/_history/1"));
@ -1716,7 +1716,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
InputStream bundleRes = FhirSystemDaoDstu3Test.class.getResourceAsStream("/simone_bundle3.xml"); InputStream bundleRes = FhirSystemDaoDstu3Test.class.getResourceAsStream("/simone_bundle3.xml");
String bundle = IOUtils.toString(bundleRes, StandardCharsets.UTF_8); String bundle = IOUtils.toString(bundleRes, StandardCharsets.UTF_8);
Bundle output = mySystemDao.transaction(mySrd, myFhirContext.newXmlParser().parseResource(Bundle.class, bundle)); Bundle output = mySystemDao.transaction(mySrd, myFhirContext.newXmlParser().parseResource(Bundle.class, bundle));
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
} }
@Test @Test
@ -1728,7 +1728,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus());
assertEquals("201 Created", resp.getEntry().get(1).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(1).getResponse().getStatus());
@ -1825,7 +1825,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
} }
private void testTransactionOrderingValidateResponse(int pass, Bundle resp) { private void testTransactionOrderingValidateResponse(int pass, Bundle resp) {
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(4, resp.getEntry().size()); assertEquals(4, resp.getEntry().size());
assertEquals("200 OK", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", resp.getEntry().get(0).getResponse().getStatus());
if (pass == 0) { if (pass == 0) {
@ -1862,11 +1862,11 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle outputBundle; Bundle outputBundle;
inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input); inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input);
outputBundle = mySystemDao.transaction(mySrd, inputBundle); outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input); inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input);
outputBundle = mySystemDao.transaction(mySrd, inputBundle); outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
IBundleProvider allPatients = myPatientDao.search(new SearchParameterMap()); IBundleProvider allPatients = myPatientDao.search(new SearchParameterMap());
assertEquals(1, allPatients.size().intValue()); assertEquals(1, allPatients.size().intValue());
@ -2428,7 +2428,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle response = mySystemDao.transaction(mySrd, bundle); Bundle response = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
} }
@ -2494,7 +2494,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, inputBundleString); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, inputBundleString);
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus());
@ -2558,7 +2558,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
//@formatter:on //@formatter:on
Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle); Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
assertEquals(3, outputBundle.getEntry().size()); assertEquals(3, outputBundle.getEntry().size());
IdDt id0 = new IdDt(outputBundle.getEntry().get(0).getResponse().getLocation()); IdDt id0 = new IdDt(outputBundle.getEntry().get(0).getResponse().getLocation());
@ -2593,7 +2593,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle input2 = createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb.POST); Bundle input2 = createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb.POST);
Bundle output2 = mySystemDao.transaction(null, input2); Bundle output2 = mySystemDao.transaction(null, input2);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output2)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output2));
assertEquals("200 OK", output2.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", output2.getEntry().get(0).getResponse().getStatus());
assertEquals("200 OK", output2.getEntry().get(1).getResponse().getStatus()); assertEquals("200 OK", output2.getEntry().get(1).getResponse().getStatus());
@ -2623,7 +2623,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle input2 = createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb.PUT); Bundle input2 = createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb.PUT);
Bundle output2 = mySystemDao.transaction(null, input2); Bundle output2 = mySystemDao.transaction(null, input2);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output2)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output2));
assertEquals("200 OK", output2.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", output2.getEntry().get(0).getResponse().getStatus());
assertEquals("200 OK", output2.getEntry().get(1).getResponse().getStatus()); assertEquals("200 OK", output2.getEntry().get(1).getResponse().getStatus());
@ -2642,7 +2642,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
String input = IOUtils.toString(getClass().getResource("/dstu3-post1.xml"), StandardCharsets.UTF_8); String input = IOUtils.toString(getClass().getResource("/dstu3-post1.xml"), StandardCharsets.UTF_8);
Bundle request = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle request = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle response = mySystemDao.transaction(mySrd, request); Bundle response = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals(1, response.getEntry().size()); assertEquals(1, response.getEntry().size());
assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus());
@ -2654,7 +2654,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
input = IOUtils.toString(getClass().getResource("/dstu3-post2.xml"), StandardCharsets.UTF_8); input = IOUtils.toString(getClass().getResource("/dstu3-post2.xml"), StandardCharsets.UTF_8);
request = myFhirContext.newXmlParser().parseResource(Bundle.class, input); request = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
response = mySystemDao.transaction(mySrd, request); response = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals(1, response.getEntry().size()); assertEquals(1, response.getEntry().size());
assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus());
@ -2663,7 +2663,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
assertEquals(id, id2); assertEquals(id, id2);
Patient patient = myPatientDao.read(new IdType(id), mySrd); Patient patient = myPatientDao.read(new IdType(id), mySrd);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals("Joshua", patient.getNameFirstRep().getGivenAsSingleString()); assertEquals("Joshua", patient.getNameFirstRep().getGivenAsSingleString());
} }
@ -2682,7 +2682,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
request.addEntry().setResource(o).getRequest().setMethod(HTTPVerb.POST); request.addEntry().setResource(o).getRequest().setMethod(HTTPVerb.POST);
Bundle resp = mySystemDao.transaction(mySrd, request); Bundle resp = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
String patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless().getValue(); String patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless().getValue();
assertThat(patientId, startsWith("Patient/")); assertThat(patientId, startsWith("Patient/"));
@ -2709,10 +2709,10 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
mo.setMedication(new Reference(medId)); mo.setMedication(new Reference(medId));
bundle.addEntry().setResource(mo).setFullUrl(mo.getIdElement().getValue()).getRequest().setMethod(HTTPVerb.POST); bundle.addEntry().setResource(mo).setFullUrl(mo.getIdElement().getValue()).getRequest().setMethod(HTTPVerb.POST);
ourLog.info("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
Bundle outcome = mySystemDao.transaction(mySrd, bundle); Bundle outcome = mySystemDao.transaction(mySrd, bundle);
ourLog.info("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
IdType medId1 = new IdType(outcome.getEntry().get(0).getResponse().getLocation()); IdType medId1 = new IdType(outcome.getEntry().get(0).getResponse().getLocation());
IdType medOrderId1 = new IdType(outcome.getEntry().get(1).getResponse().getLocation()); IdType medOrderId1 = new IdType(outcome.getEntry().get(1).getResponse().getLocation());
@ -2762,7 +2762,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
request.addEntry().setResource(o).getRequest().setMethod(HTTPVerb.POST); request.addEntry().setResource(o).getRequest().setMethod(HTTPVerb.POST);
Bundle resp = mySystemDao.transaction(mySrd, request); Bundle resp = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
String patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless().getValue(); String patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless().getValue();
assertThat(patientId, startsWith("Patient/")); assertThat(patientId, startsWith("Patient/"));
@ -2796,7 +2796,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, res); Bundle resp = mySystemDao.transaction(mySrd, res);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue()); assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue());
assertEquals(3, resp.getEntry().size()); assertEquals(3, resp.getEntry().size());
@ -2837,7 +2837,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, res); Bundle resp = mySystemDao.transaction(mySrd, res);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue()); assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue());
assertEquals(3, resp.getEntry().size()); assertEquals(3, resp.getEntry().size());

View File

@ -99,7 +99,7 @@ public class NpmDstu3Test extends BaseJpaDstu3Test {
myConditionDao.validate(condition, null, null, null, ValidationModeEnum.CREATE, null, mySrd); myConditionDao.validate(condition, null, null, null, ValidationModeEnum.CREATE, null, mySrd);
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info("Fail Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug("Fail Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
OperationOutcome oo = (OperationOutcome) e.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) e.getOperationOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), assertThat(oo.getIssueFirstRep().getDiagnostics(),

View File

@ -116,7 +116,7 @@ public class CompositionDocumentDstu3Test extends BaseResourceProviderDstu3Test
String theUrl = myServerBase + "/" + compId + "/$document?_format=json"; String theUrl = myServerBase + "/" + compId + "/$document?_format=json";
Bundle bundle = fetchBundle(theUrl, EncodingEnum.JSON); Bundle bundle = fetchBundle(theUrl, EncodingEnum.JSON);
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
bundle.getEntry().stream() bundle.getEntry().stream()
.forEach(entry -> { .forEach(entry -> {

View File

@ -265,7 +265,7 @@ public class ResourceProviderCustomSearchParamDstu3Test extends BaseResourceProv
eyeColourSp.setXpathUsage(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NORMAL); eyeColourSp.setXpathUsage(org.hl7.fhir.dstu3.model.SearchParameter.XPathUsageType.NORMAL);
eyeColourSp.setStatus(org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.ACTIVE); eyeColourSp.setStatus(org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.ACTIVE);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(eyeColourSp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(eyeColourSp));
myClient myClient
.create() .create()
@ -279,7 +279,7 @@ public class ResourceProviderCustomSearchParamDstu3Test extends BaseResourceProv
p1.addExtension().setUrl("http://acme.org/eyecolour").setValue(new CodeType("blue")); p1.addExtension().setUrl("http://acme.org/eyecolour").setValue(new CodeType("blue"));
IIdType p1id = myPatientDao.create(p1).getId().toUnqualifiedVersionless(); IIdType p1id = myPatientDao.create(p1).getId().toUnqualifiedVersionless();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(p1)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(p1));
Patient p2 = new Patient(); Patient p2 = new Patient();
p2.setActive(true); p2.setActive(true);
@ -293,7 +293,7 @@ public class ResourceProviderCustomSearchParamDstu3Test extends BaseResourceProv
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
List<String> foundResources = toUnqualifiedVersionlessIdValues(bundle); List<String> foundResources = toUnqualifiedVersionlessIdValues(bundle);
assertThat(foundResources, contains(p1id.getValue())); assertThat(foundResources, contains(p1id.getValue()));

View File

@ -360,7 +360,7 @@ public class ResourceProviderDstu3CodeSystemTest extends BaseResourceProviderDst
inParams.addParameter().setName("code").setValue(new CodeType("1")); inParams.addParameter().setName("code").setValue(new CodeType("1"));
Parameters outcome = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute(); Parameters outcome = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
String message = outcome String message = outcome
.getParameter() .getParameter()

View File

@ -72,14 +72,14 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
public void testTranslateByCodeSystemsAndSourceCodeOneToMany() { public void testTranslateByCodeSystemsAndSourceCodeOneToMany() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_3)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_3));
inParams.addParameter().setName("code").setValue(new CodeType("12345")); inParams.addParameter().setName("code").setValue(new CodeType("12345"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -88,7 +88,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -140,7 +140,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -149,7 +149,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -188,7 +188,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -197,7 +197,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
// Should return v2 since v2 specified. // Should return v2 since v2 specified.
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -238,7 +238,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -247,7 +247,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
// Should return v1 since v1 specified. // Should return v1 since v1 specified.
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -287,7 +287,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -296,7 +296,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
// Should return v2 since v2 is the most recently updated version. // Should return v2 since v2 is the most recently updated version.
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -335,7 +335,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -344,7 +344,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
// Should return v2 since v2 is the most recently updated version. // Should return v2 since v2 is the most recently updated version.
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -383,7 +383,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -392,7 +392,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
// Should return v2 since v2 is the most recently updated version. // Should return v2 since v2 is the most recently updated version.
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -430,7 +430,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -439,7 +439,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertFalse(((BooleanType) param.getValue()).booleanValue()); assertFalse(((BooleanType) param.getValue()).booleanValue());
@ -462,7 +462,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
@ -472,7 +472,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -507,7 +507,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
@ -517,7 +517,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -552,7 +552,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
@ -562,7 +562,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -597,7 +597,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
@ -607,7 +607,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -647,7 +647,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
IIdType conceptMapId = myConceptMapDao.create(conceptMap, mySrd).getId().toUnqualifiedVersionless(); IIdType conceptMapId = myConceptMapDao.create(conceptMap, mySrd).getId().toUnqualifiedVersionless();
conceptMap = myConceptMapDao.read(conceptMapId); conceptMap = myConceptMapDao.read(conceptMapId);
ourLog.info("ConceptMap: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
} }
private void createReverseConceptMap(String url, String version, String sourceCode, String sourceDisplay) { private void createReverseConceptMap(String url, String version, String sourceCode, String sourceDisplay) {
@ -668,7 +668,7 @@ public class ResourceProviderDstu3ConceptMapTest extends BaseResourceProviderDst
IIdType conceptMapId = myConceptMapDao.create(conceptMap, mySrd).getId().toUnqualifiedVersionless(); IIdType conceptMapId = myConceptMapDao.create(conceptMap, mySrd).getId().toUnqualifiedVersionless();
ConceptMap conceptMap1 = myConceptMapDao.read(conceptMapId); ConceptMap conceptMap1 = myConceptMapDao.read(conceptMapId);
ourLog.info("ConceptMap : \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap1)); ourLog.debug("ConceptMap : \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap1));
} }
} }

View File

@ -380,7 +380,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
CloseableHttpResponse resp = ourHttpClient.execute(post); CloseableHttpResponse resp = ourHttpClient.execute(post);
try { try {
String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
assertEquals(400, resp.getStatusLine().getStatusCode()); assertEquals(400, resp.getStatusLine().getStatusCode());
} finally { } finally {
IOUtils.closeQuietly(resp); IOUtils.closeQuietly(resp);
@ -429,7 +429,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
String input = ClasspathUtil.loadResource("/basic-stu3.xml"); String input = ClasspathUtil.loadResource("/basic-stu3.xml");
String respString = myClient.transaction().withBundle(input).prettyPrint().execute(); String respString = myClient.transaction().withBundle(input).prettyPrint().execute();
ourLog.info(respString); ourLog.debug(respString);
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, respString); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, respString);
IdType id = new IdType(bundle.getEntry().get(0).getResponse().getLocation()); IdType id = new IdType(bundle.getEntry().get(0).getResponse().getLocation());
@ -482,7 +482,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
Bundle bundle = client.read().resource(Bundle.class).withId(id).execute(); Bundle bundle = client.read().resource(Bundle.class).withId(id).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
} }
@Test @Test
@ -972,7 +972,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
assertEquals(201, response.getStatusLine().getStatusCode()); assertEquals(201, response.getStatusLine().getStatusCode());
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(response.toString()); ourLog.info(response.toString());
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, startsWith("<Patient xmlns=\"http://hl7.org/fhir\">")); assertThat(respString, startsWith("<Patient xmlns=\"http://hl7.org/fhir\">"));
assertThat(respString, endsWith("</Patient>")); assertThat(respString, endsWith("</Patient>"));
} finally { } finally {
@ -994,7 +994,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
assertEquals(201, response.getStatusLine().getStatusCode()); assertEquals(201, response.getStatusLine().getStatusCode());
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(response.toString()); ourLog.info(response.toString());
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, containsString("<OperationOutcome xmlns=\"http://hl7.org/fhir\">")); assertThat(respString, containsString("<OperationOutcome xmlns=\"http://hl7.org/fhir\">"));
} finally { } finally {
response.getEntity().getContent().close(); response.getEntity().getContent().close();
@ -1294,7 +1294,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
} }
String resp = b.toString(); String resp = b.toString();
ourLog.info("Resp: {}", resp); ourLog.debug("Resp: {}", resp);
} catch (SocketTimeoutException e) { } catch (SocketTimeoutException e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
@ -1666,7 +1666,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
Bundle resp = myClient.transaction().withBundle(b).execute(); Bundle resp = myClient.transaction().withBundle(b).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
IdType patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()); IdType patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation());
assertEquals("Patient", patientId.getResourceType()); assertEquals("Patient", patientId.getResourceType());
@ -1789,7 +1789,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Parameters output = myClient.operation().onInstance(p1Id).named("everything").withParameters(parameters).execute(); Parameters output = myClient.operation().onInstance(p1Id).named("everything").withParameters(parameters).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
Bundle b = (Bundle) output.getParameter().get(0).getResource(); Bundle b = (Bundle) output.getParameter().get(0).getResource();
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
@ -1820,7 +1820,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute(); Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
Bundle b = (Bundle) output.getParameter().get(0).getResource(); Bundle b = (Bundle) output.getParameter().get(0).getResource();
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
@ -1859,7 +1859,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute(); Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
Bundle b = (Bundle) output.getParameter().get(0).getResource(); Bundle b = (Bundle) output.getParameter().get(0).getResource();
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
@ -2044,7 +2044,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
.returnResourceType(Bundle.class) .returnResourceType(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(responseBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(responseBundle));
List<String> ids = new ArrayList<String>(); List<String> ids = new ArrayList<String>();
for (BundleEntryComponent nextEntry : responseBundle.getEntry()) { for (BundleEntryComponent nextEntry : responseBundle.getEntry()) {
@ -2360,7 +2360,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
try { try {
myBundleDao.validate(history, null, null, null, null, null, mySrd); myBundleDao.validate(history, null, null, null, null, null, mySrd);
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
throw e; throw e;
} }
} }
@ -3147,7 +3147,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
CloseableHttpResponse resp = ourHttpClient.execute(httpPost); CloseableHttpResponse resp = ourHttpClient.execute(httpPost);
try { try {
String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, containsString("Invalid parameter chain: subject.id")); assertThat(respString, containsString("Invalid parameter chain: subject.id"));
assertEquals(400, resp.getStatusLine().getStatusCode()); assertEquals(400, resp.getStatusLine().getStatusCode());
} finally { } finally {
@ -3778,7 +3778,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -3790,7 +3790,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -3802,7 +3802,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -3814,7 +3814,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
String uri = myServerBase + "/Observation?_sort=code-value-date"; String uri = myServerBase + "/Observation?_sort=code-value-date";
@ -3826,7 +3826,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
found = myFhirContext.newXmlParser().parseResource(Bundle.class, output); found = myFhirContext.newXmlParser().parseResource(Bundle.class, output);
} }
ourLog.info("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(found)); ourLog.debug("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(found));
List<IIdType> list = toUnqualifiedVersionlessIds(found); List<IIdType> list = toUnqualifiedVersionlessIds(found);
assertEquals(4, found.getEntry().size()); assertEquals(4, found.getEntry().size());

View File

@ -697,7 +697,7 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3
try (CloseableHttpResponse resp = ourHttpClient.execute(post)) { try (CloseableHttpResponse resp = ourHttpClient.execute(post)) {
String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
ourLog.info(resp.toString()); ourLog.info(resp.toString());
@ -743,7 +743,7 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3
request.addHeader("Accept", "application/fhir+json"); request.addHeader("Accept", "application/fhir+json");
try (CloseableHttpResponse response = ourHttpClient.execute(request)) { try (CloseableHttpResponse response = ourHttpClient.execute(request)) {
String respString = IOUtils.toString(response.getEntity().getContent(), Charsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), Charsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
Parameters respParam = myFhirContext.newJsonParser().parseResource(Parameters.class, respString); Parameters respParam = myFhirContext.newJsonParser().parseResource(Parameters.class, respString);
assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue()); assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue());

View File

@ -925,7 +925,7 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertEquals(1, expanded.getExpansion().getContains().size()); assertEquals(1, expanded.getExpansion().getContains().size());
// Update the CodeSystem Version and Codes // Update the CodeSystem Version and Codes
@ -950,7 +950,7 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertEquals(1, expanded.getExpansion().getContains().size()); assertEquals(1, expanded.getExpansion().getContains().size());
} }
@ -962,14 +962,14 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
loadAndPersistCodeSystemAndValueSetWithDesignations(); loadAndPersistCodeSystemAndValueSetWithDesignations();
CodeSystem codeSystem_v1 = myCodeSystemDao.read(myExtensionalCsId_v1); CodeSystem codeSystem_v1 = myCodeSystemDao.read(myExtensionalCsId_v1);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v1)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v1));
CodeSystem codeSystem_v2 = myCodeSystemDao.read(myExtensionalCsId_v2); CodeSystem codeSystem_v2 = myCodeSystemDao.read(myExtensionalCsId_v2);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v2)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v2));
ValueSet valueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1); ValueSet valueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v1)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v1));
ValueSet valueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2); ValueSet valueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v2)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v2));
String initialValueSetName_v1 = valueSet_v1.getName(); String initialValueSetName_v1 = valueSet_v1.getName();
validateTermValueSetNotExpanded(initialValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1); validateTermValueSetNotExpanded(initialValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1);
@ -983,7 +983,7 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
updatedValueSet_v1.setName(valueSet_v1.getName().concat(" - MODIFIED")); updatedValueSet_v1.setName(valueSet_v1.getName().concat(" - MODIFIED"));
persistSingleValueSet(updatedValueSet_v1, HttpVerb.PUT); persistSingleValueSet(updatedValueSet_v1, HttpVerb.PUT);
updatedValueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1); updatedValueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v1)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v1));
String updatedValueSetName_v1 = valueSet_v1.getName(); String updatedValueSetName_v1 = valueSet_v1.getName();
validateTermValueSetNotExpanded(updatedValueSetName_v1,"1", myExtensionalVsIdOnResourceTable_v1); validateTermValueSetNotExpanded(updatedValueSetName_v1,"1", myExtensionalVsIdOnResourceTable_v1);
@ -992,7 +992,7 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
updatedValueSet_v2.setName(valueSet_v2.getName().concat(" - MODIFIED")); updatedValueSet_v2.setName(valueSet_v2.getName().concat(" - MODIFIED"));
persistSingleValueSet(updatedValueSet_v2, HttpVerb.PUT); persistSingleValueSet(updatedValueSet_v2, HttpVerb.PUT);
updatedValueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2); updatedValueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v2)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v2));
String updatedValueSetName_v2 = valueSet_v2.getName(); String updatedValueSetName_v2 = valueSet_v2.getName();
validateTermValueSetNotExpanded(updatedValueSetName_v2,"2", myExtensionalVsIdOnResourceTable_v2); validateTermValueSetNotExpanded(updatedValueSetName_v2,"2", myExtensionalVsIdOnResourceTable_v2);
@ -1010,14 +1010,14 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
loadAndPersistCodeSystemAndValueSetWithDesignations(); loadAndPersistCodeSystemAndValueSetWithDesignations();
CodeSystem codeSystem_v1 = myCodeSystemDao.read(myExtensionalCsId_v1); CodeSystem codeSystem_v1 = myCodeSystemDao.read(myExtensionalCsId_v1);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v1)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v1));
CodeSystem codeSystem_v2 = myCodeSystemDao.read(myExtensionalCsId_v2); CodeSystem codeSystem_v2 = myCodeSystemDao.read(myExtensionalCsId_v2);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v2)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v2));
ValueSet valueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1); ValueSet valueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v1)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v1));
ValueSet valueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2); ValueSet valueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v2)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v2));
String initialValueSetName_v1 = valueSet_v1.getName(); String initialValueSetName_v1 = valueSet_v1.getName();
validateTermValueSetNotExpanded(initialValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1); validateTermValueSetNotExpanded(initialValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1);
@ -1040,11 +1040,11 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
.getRequest() .getRequest()
.setMethod(Bundle.HTTPVerb.PUT) .setMethod(Bundle.HTTPVerb.PUT)
.setUrl("ValueSet/" + updatedValueSet_v1.getIdElement().getIdPart()); .setUrl("ValueSet/" + updatedValueSet_v1.getIdElement().getIdPart());
ourLog.info("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
myClient.transaction().withBundle(bundle).execute(); myClient.transaction().withBundle(bundle).execute();
updatedValueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1); updatedValueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v1)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v1));
String updatedValueSetName_v1 = valueSet_v1.getName(); String updatedValueSetName_v1 = valueSet_v1.getName();
validateTermValueSetNotExpanded(updatedValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1); validateTermValueSetNotExpanded(updatedValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1);
@ -1062,11 +1062,11 @@ public class ResourceProviderDstu3ValueSetVersionedTest extends BaseResourceProv
.getRequest() .getRequest()
.setMethod(Bundle.HTTPVerb.PUT) .setMethod(Bundle.HTTPVerb.PUT)
.setUrl("ValueSet/" + updatedValueSet_v2.getIdElement().getIdPart()); .setUrl("ValueSet/" + updatedValueSet_v2.getIdElement().getIdPart());
ourLog.info("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
myClient.transaction().withBundle(bundle).execute(); myClient.transaction().withBundle(bundle).execute();
updatedValueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2); updatedValueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v2)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v2));
String updatedValueSetName_v2 = valueSet_v2.getName(); String updatedValueSetName_v2 = valueSet_v2.getName();
validateTermValueSetNotExpanded(updatedValueSetName_v2, "2", myExtensionalVsIdOnResourceTable_v2); validateTermValueSetNotExpanded(updatedValueSetName_v2, "2", myExtensionalVsIdOnResourceTable_v2);

View File

@ -365,7 +365,7 @@ public class ResourceProviderExpungeDstu3Test extends BaseResourceProviderDstu3T
p.addParameter() p.addParameter()
.setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_DELETED_RESOURCES) .setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_DELETED_RESOURCES)
.setValue(new BooleanType(true)); .setValue(new BooleanType(true));
ourLog.info(myFhirContext.newJsonParser().encodeResourceToString(p)); ourLog.debug(myFhirContext.newJsonParser().encodeResourceToString(p));
} }

View File

@ -42,7 +42,7 @@ public class ServerDstu3Test extends BaseResourceProviderDstu3Test {
assertEquals(200, resp.getStatusLine().getStatusCode()); assertEquals(200, resp.getStatusLine().getStatusCode());
String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
CapabilityStatement cs = myFhirContext.newXmlParser().parseResource(CapabilityStatement.class, respString); CapabilityStatement cs = myFhirContext.newXmlParser().parseResource(CapabilityStatement.class, respString);

View File

@ -151,7 +151,7 @@ public class SystemProviderTransactionSearchDstu3Test extends BaseJpaDstu3Test {
myDaoConfig.setMaximumSearchResultCountInTransaction(100); myDaoConfig.setMaximumSearchResultCountInTransaction(100);
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -174,7 +174,7 @@ public class SystemProviderTransactionSearchDstu3Test extends BaseJpaDstu3Test {
.setUrl("Patient?_count=5&_sort=name"); .setUrl("Patient?_count=5&_sort=name");
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -221,7 +221,7 @@ public class SystemProviderTransactionSearchDstu3Test extends BaseJpaDstu3Test {
.getRequest().setUrl(pid1.getValue()).setMethod(HTTPVerb.PUT); .getRequest().setUrl(pid1.getValue()).setMethod(HTTPVerb.PUT);
Bundle bundle = ourClient.transaction().withBundle(input).execute(); Bundle bundle = ourClient.transaction().withBundle(input).execute();
ourLog.info("Response: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Response: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
//Validate over all bundle response entry contents. //Validate over all bundle response entry contents.
assertThat(bundle.getType(), is(equalTo(Bundle.BundleType.TRANSACTIONRESPONSE))); assertThat(bundle.getType(), is(equalTo(Bundle.BundleType.TRANSACTIONRESPONSE)));
@ -254,7 +254,7 @@ public class SystemProviderTransactionSearchDstu3Test extends BaseJpaDstu3Test {
myDaoConfig.setMaximumSearchResultCountInTransaction(100); myDaoConfig.setMaximumSearchResultCountInTransaction(100);
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -277,7 +277,7 @@ public class SystemProviderTransactionSearchDstu3Test extends BaseJpaDstu3Test {
.setUrl("Patient?_count=5&_sort=name"); .setUrl("Patient?_count=5&_sort=name");
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -312,7 +312,7 @@ public class SystemProviderTransactionSearchDstu3Test extends BaseJpaDstu3Test {
} }
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(30, output.getEntry().size()); assertEquals(30, output.getEntry().size());
for (int i = 0; i < 30; i++) { for (int i = 0; i < 30; i++) {
@ -335,7 +335,7 @@ public class SystemProviderTransactionSearchDstu3Test extends BaseJpaDstu3Test {
.setUrl("/Patient?_id="+patientId.getIdPart()); .setUrl("/Patient?_id="+patientId.getIdPart());
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertThat(output.getEntryFirstRep().getResponse().getStatus(), startsWith("200")); assertThat(output.getEntryFirstRep().getResponse().getStatus(), startsWith("200"));
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
List<String> actualIds = toIds(respBundle); List<String> actualIds = toIds(respBundle);

View File

@ -198,7 +198,7 @@ public class RestHookTestDstu3Test extends BaseResourceProviderDstu3Test {
public void testMemoryStrategyMeta() throws InterruptedException { public void testMemoryStrategyMeta() throws InterruptedException {
String inMemoryCriteria = "Observation?code=17861-6"; String inMemoryCriteria = "Observation?code=17861-6";
Subscription subscription = createSubscription(inMemoryCriteria, null, ourNotificationListenerServer); Subscription subscription = createSubscription(inMemoryCriteria, null, ourNotificationListenerServer);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(subscription)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(subscription));
List<Coding> tag = subscription.getMeta().getTag(); List<Coding> tag = subscription.getMeta().getTag();
assertEquals(HapiExtensions.EXT_SUBSCRIPTION_MATCHING_STRATEGY, tag.get(0).getSystem()); assertEquals(HapiExtensions.EXT_SUBSCRIPTION_MATCHING_STRATEGY, tag.get(0).getSystem());
assertEquals(SubscriptionMatchingStrategy.IN_MEMORY.toString(), tag.get(0).getCode()); assertEquals(SubscriptionMatchingStrategy.IN_MEMORY.toString(), tag.get(0).getCode());

View File

@ -82,7 +82,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test {
.setValue("LP7753-9"); .setValue("LP7753-9");
ValueSet expanded = myValueSetDao.expand(input, null); ValueSet expanded = myValueSetDao.expand(input, null);
Set<String> codes = toExpandedCodes(expanded); Set<String> codes = toExpandedCodes(expanded);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded));
ourLog.info("Codes: {}", codes); ourLog.info("Codes: {}", codes);
assertThat(codes, containsInAnyOrder("10013-1")); assertThat(codes, containsInAnyOrder("10013-1"));
@ -98,7 +98,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test {
.setValue("Qn"); .setValue("Qn");
expanded = myValueSetDao.expand(input, null); expanded = myValueSetDao.expand(input, null);
codes = toExpandedCodes(expanded); codes = toExpandedCodes(expanded);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertThat(codes, containsInAnyOrder("10013-1")); assertThat(codes, containsInAnyOrder("10013-1"));
// Search by something that doesn't match // Search by something that doesn't match
@ -113,7 +113,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test {
.setValue("Qn999"); .setValue("Qn999");
expanded = myValueSetDao.expand(input, null); expanded = myValueSetDao.expand(input, null);
codes = toExpandedCodes(expanded); codes = toExpandedCodes(expanded);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertThat(codes, empty()); assertThat(codes, empty());
} }
@ -145,7 +145,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test {
.setValue("EKG.MEAS"); .setValue("EKG.MEAS");
ValueSet expanded = myValueSetDao.expand(input, null); ValueSet expanded = myValueSetDao.expand(input, null);
Set<String> codes = toExpandedCodes(expanded); Set<String> codes = toExpandedCodes(expanded);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded));
ourLog.info("Codes: {}", codes); ourLog.info("Codes: {}", codes);
assertThat(codes, containsInAnyOrder("10013-1")); assertThat(codes, containsInAnyOrder("10013-1"));
} }
@ -159,7 +159,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test {
IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("10013-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd); IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("10013-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd);
Parameters parameters = (Parameters) result.toParameters(myFhirContext, null); Parameters parameters = (Parameters) result.toParameters(myFhirContext, null);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(parameters)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(parameters));
Optional<Coding> propertyValue = findProperty(parameters, "SCALE_TYP"); Optional<Coding> propertyValue = findProperty(parameters, "SCALE_TYP");
assertTrue(propertyValue.isPresent()); assertTrue(propertyValue.isPresent());
@ -189,7 +189,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test {
IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("10013-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd); IValidationSupport.LookupCodeResult result = myCodeSystemDao.lookupCode(new StringType("10013-1"), new StringType(ITermLoaderSvc.LOINC_URI), null, mySrd);
Parameters parameters = (Parameters) result.toParameters(myFhirContext, null); Parameters parameters = (Parameters) result.toParameters(myFhirContext, null);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(parameters)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(parameters));
Optional<Coding> propertyValue = findProperty(parameters, "COMPONENT"); Optional<Coding> propertyValue = findProperty(parameters, "COMPONENT");
assertTrue(propertyValue.isPresent()); assertTrue(propertyValue.isPresent());
@ -208,7 +208,7 @@ public class TerminologyLoaderSvcIntegrationDstu3Test extends BaseJpaDstu3Test {
List<? extends IPrimitiveType<String>> properties = Lists.newArrayList(new CodeType("SCALE_TYP")); List<? extends IPrimitiveType<String>> properties = Lists.newArrayList(new CodeType("SCALE_TYP"));
Parameters parameters = (Parameters) result.toParameters(myFhirContext, properties); Parameters parameters = (Parameters) result.toParameters(myFhirContext, properties);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(parameters)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(parameters));
Optional<Coding> propertyValueCoding = findProperty(parameters, "SCALE_TYP"); Optional<Coding> propertyValueCoding = findProperty(parameters, "SCALE_TYP");
assertTrue(propertyValueCoding.isPresent()); assertTrue(propertyValueCoding.isPresent());

View File

@ -1853,7 +1853,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test {
public void testStoreTermCodeSystemAndNestedChildren() { public void testStoreTermCodeSystemAndNestedChildren() {
IIdType codeSystemId = createCodeSystem(); IIdType codeSystemId = createCodeSystem();
CodeSystem codeSystemResource = myCodeSystemDao.read(codeSystemId); CodeSystem codeSystemResource = myCodeSystemDao.read(codeSystemId);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystemResource)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystemResource));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override

View File

@ -193,7 +193,7 @@ public class BulkDataExportProviderTest {
input.addParameter(JpaConstants.PARAM_EXPORT_SINCE, now); input.addParameter(JpaConstants.PARAM_EXPORT_SINCE, now);
input.addParameter(JpaConstants.PARAM_EXPORT_TYPE_FILTER, new StringType(filter)); input.addParameter(JpaConstants.PARAM_EXPORT_TYPE_FILTER, new StringType(filter));
ourLog.info(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
// test // test
HttpPost post = new HttpPost("http://localhost:" + myPort + "/" + JpaConstants.OPERATION_EXPORT); HttpPost post = new HttpPost("http://localhost:" + myPort + "/" + JpaConstants.OPERATION_EXPORT);
@ -493,7 +493,7 @@ public class BulkDataExportProviderTest {
input.addParameter(JpaConstants.PARAM_EXPORT_MDM, true); input.addParameter(JpaConstants.PARAM_EXPORT_MDM, true);
input.addParameter(JpaConstants.PARAM_EXPORT_TYPE_FILTER, obsTypeFilter); input.addParameter(JpaConstants.PARAM_EXPORT_TYPE_FILTER, obsTypeFilter);
ourLog.info(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
// call // call
HttpPost post = new HttpPost("http://localhost:" + myPort + "/" + GROUP_ID + "/" + JpaConstants.OPERATION_EXPORT); HttpPost post = new HttpPost("http://localhost:" + myPort + "/" + GROUP_ID + "/" + JpaConstants.OPERATION_EXPORT);
@ -642,7 +642,7 @@ public class BulkDataExportProviderTest {
input.addParameter(JpaConstants.PARAM_EXPORT_TYPE, new StringType("Patient")); input.addParameter(JpaConstants.PARAM_EXPORT_TYPE, new StringType("Patient"));
input.addParameter(JpaConstants.PARAM_EXPORT_TYPE_FILTER, new StringType("Patient?gender=male,Patient?gender=female")); input.addParameter(JpaConstants.PARAM_EXPORT_TYPE_FILTER, new StringType("Patient?gender=male,Patient?gender=female"));
ourLog.info(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
// call // call
HttpPost post = new HttpPost("http://localhost:" + myPort + "/" + JpaConstants.OPERATION_EXPORT); HttpPost post = new HttpPost("http://localhost:" + myPort + "/" + JpaConstants.OPERATION_EXPORT);
@ -704,7 +704,7 @@ public class BulkDataExportProviderTest {
input.addParameter(JpaConstants.PARAM_EXPORT_SINCE, now); input.addParameter(JpaConstants.PARAM_EXPORT_SINCE, now);
input.addParameter(JpaConstants.PARAM_EXPORT_TYPE_FILTER, new StringType("Immunization?vaccine-code=foo")); input.addParameter(JpaConstants.PARAM_EXPORT_TYPE_FILTER, new StringType("Immunization?vaccine-code=foo"));
ourLog.info(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
// call // call
HttpPost post = new HttpPost("http://localhost:" + myPort + "/Patient/" + JpaConstants.OPERATION_EXPORT); HttpPost post = new HttpPost("http://localhost:" + myPort + "/Patient/" + JpaConstants.OPERATION_EXPORT);

View File

@ -296,7 +296,7 @@ public class ChainingR4SearchTest extends BaseJpaR4Test {
obs.setValue(new Quantity(null, 67.1, "http://unitsofmeasure.org", "kg", "kg")); obs.setValue(new Quantity(null, 67.1, "http://unitsofmeasure.org", "kg", "kg"));
obs.getSubject().setReference("#pat"); obs.getSubject().setReference("#pat");
ourLog.info("Resource: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Resource: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();

View File

@ -211,7 +211,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
// Read the Observation // Read the Observation
Observation createdObs = myObservationDao.read(id); Observation createdObs = myObservationDao.read(id);
ourLog.info("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
/* /*
* Read the placeholder Patient referenced by the Observation * Read the placeholder Patient referenced by the Observation
@ -219,7 +219,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
*/ */
Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
IIdType placeholderPatId = placeholderPat.getIdElement(); IIdType placeholderPatId = placeholderPat.getIdElement();
ourLog.info("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat)); ourLog.debug("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat));
assertEquals(0, placeholderPat.getIdentifier().size()); assertEquals(0, placeholderPat.getIdentifier().size());
Extension extension = placeholderPat.getExtensionByUrl(HapiExtensions.EXT_RESOURCE_PLACEHOLDER); Extension extension = placeholderPat.getExtensionByUrl(HapiExtensions.EXT_RESOURCE_PLACEHOLDER);
assertNotNull(extension); assertNotNull(extension);
@ -237,7 +237,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
* Placeholder extension should not exist * Placeholder extension should not exist
*/ */
Patient updatedPat = myPatientDao.read(updatedPatId); Patient updatedPat = myPatientDao.read(updatedPatId);
ourLog.info("\nUpdated Patient:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedPat)); ourLog.debug("\nUpdated Patient:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedPat));
assertEquals(1, updatedPat.getIdentifier().size()); assertEquals(1, updatedPat.getIdentifier().size());
extension = updatedPat.getExtensionByUrl(HapiExtensions.EXT_RESOURCE_PLACEHOLDER); extension = updatedPat.getExtensionByUrl(HapiExtensions.EXT_RESOURCE_PLACEHOLDER);
assertNull(extension); assertNull(extension);
@ -256,10 +256,10 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
IIdType id = myObservationDao.create(obsToCreate, mySrd).getId(); IIdType id = myObservationDao.create(obsToCreate, mySrd).getId();
Observation createdObs = myObservationDao.read(id); Observation createdObs = myObservationDao.read(id);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
Patient patient = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); Patient patient = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(0, patient.getIdentifier().size()); assertEquals(0, patient.getIdentifier().size());
} }
@ -290,7 +290,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
//Read the Placeholder Patient //Read the Placeholder Patient
Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
ourLog.info("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
//Ensure the Obs has the right placeholder ID. //Ensure the Obs has the right placeholder ID.
IIdType placeholderPatId = placeholderPat.getIdElement(); IIdType placeholderPatId = placeholderPat.getIdElement();
@ -299,7 +299,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
/* /*
* Should have a single identifier populated. * Should have a single identifier populated.
*/ */
ourLog.info("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat)); ourLog.debug("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat));
assertEquals(1, placeholderPat.getIdentifier().size()); assertEquals(1, placeholderPat.getIdentifier().size());
List<Identifier> identifiers = placeholderPat.getIdentifier(); List<Identifier> identifiers = placeholderPat.getIdentifier();
Identifier identifier = identifiers.get(0); Identifier identifier = identifiers.get(0);
@ -335,7 +335,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
//Read the Placeholder Patient //Read the Placeholder Patient
Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
ourLog.info("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
//Ensure the Obs has the right placeholder ID. //Ensure the Obs has the right placeholder ID.
IIdType placeholderPatId = placeholderPat.getIdElement(); IIdType placeholderPatId = placeholderPat.getIdElement();
@ -344,7 +344,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
/* /*
* Should have a single identifier populated. * Should have a single identifier populated.
*/ */
ourLog.info("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat)); ourLog.debug("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat));
assertEquals(1, placeholderPat.getIdentifier().size()); assertEquals(1, placeholderPat.getIdentifier().size());
List<Identifier> identifiers = placeholderPat.getIdentifier(); List<Identifier> identifiers = placeholderPat.getIdentifier();
Identifier identifier = identifiers.get(0); Identifier identifier = identifiers.get(0);
@ -381,7 +381,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
//Read the Placeholder Patient //Read the Placeholder Patient
Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
ourLog.info("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
//Ensure the Obs has the right placeholder ID. //Ensure the Obs has the right placeholder ID.
IIdType placeholderPatId = placeholderPat.getIdElement(); IIdType placeholderPatId = placeholderPat.getIdElement();
@ -390,7 +390,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
/* /*
* Should have a single identifier populated. * Should have a single identifier populated.
*/ */
ourLog.info("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat)); ourLog.debug("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat));
assertEquals(1, placeholderPat.getIdentifier().size()); assertEquals(1, placeholderPat.getIdentifier().size());
List<Identifier> identifiers = placeholderPat.getIdentifier(); List<Identifier> identifiers = placeholderPat.getIdentifier();
Identifier identifier = identifiers.get(0); Identifier identifier = identifiers.get(0);
@ -428,7 +428,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
//Read the Placeholder Patient //Read the Placeholder Patient
Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
ourLog.info("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
//Ensure the Obs has the right placeholder ID. //Ensure the Obs has the right placeholder ID.
IIdType placeholderPatId = placeholderPat.getIdElement(); IIdType placeholderPatId = placeholderPat.getIdElement();
@ -437,7 +437,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
/* /*
* Placeholder Identifiers should both be populated since they were both provided, and did not match * Placeholder Identifiers should both be populated since they were both provided, and did not match
*/ */
ourLog.info("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat)); ourLog.debug("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat));
assertEquals(2, placeholderPat.getIdentifier().size()); assertEquals(2, placeholderPat.getIdentifier().size());
List<Identifier> identifiers = placeholderPat.getIdentifier(); List<Identifier> identifiers = placeholderPat.getIdentifier();
@ -458,7 +458,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
// Read the conditionally updated Patient // Read the conditionally updated Patient
Patient conditionalUpdatePat = myPatientDao.read(conditionalUpdatePatId); Patient conditionalUpdatePat = myPatientDao.read(conditionalUpdatePatId);
ourLog.info("\nConditionally updated Patient:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conditionalUpdatePat)); ourLog.debug("\nConditionally updated Patient:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conditionalUpdatePat));
assertEquals(1, conditionalUpdatePat.getIdentifier().size()); assertEquals(1, conditionalUpdatePat.getIdentifier().size());
/* /*
@ -466,7 +466,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
* ID of placeholder Patient should match ID of conditionally updated Patient * ID of placeholder Patient should match ID of conditionally updated Patient
*/ */
createdObs = myObservationDao.read(obsId); createdObs = myObservationDao.read(obsId);
ourLog.info("\nObservation read after Patient update:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("\nObservation read after Patient update:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
assertEquals(createdObs.getSubject().getReference(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString()); assertEquals(createdObs.getSubject().getReference(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString());
assertEquals(placeholderPatId.toUnqualifiedVersionless().getValueAsString(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString()); assertEquals(placeholderPatId.toUnqualifiedVersionless().getValueAsString(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString());
} }
@ -488,7 +488,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
// Read the Observation // Read the Observation
Observation createdObs = myObservationDao.read(obsId); Observation createdObs = myObservationDao.read(obsId);
ourLog.info("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("\nObservation created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
/* /*
* Read the placeholder Patient referenced by the Observation * Read the placeholder Patient referenced by the Observation
@ -496,7 +496,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
*/ */
Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
IIdType placeholderPatId = placeholderPat.getIdElement(); IIdType placeholderPatId = placeholderPat.getIdElement();
ourLog.info("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat)); ourLog.debug("\nPlaceholder Patient created:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat));
assertEquals(1, placeholderPat.getIdentifier().size()); assertEquals(1, placeholderPat.getIdentifier().size());
assertEquals(createdObs.getSubject().getReference(), placeholderPatId.toUnqualifiedVersionless().getValueAsString()); assertEquals(createdObs.getSubject().getReference(), placeholderPatId.toUnqualifiedVersionless().getValueAsString());
@ -508,7 +508,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
// Read the conditionally updated Patient // Read the conditionally updated Patient
Patient conditionalUpdatePat = myPatientDao.read(conditionalUpdatePatId); Patient conditionalUpdatePat = myPatientDao.read(conditionalUpdatePatId);
ourLog.info("\nConditionally updated Patient:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conditionalUpdatePat)); ourLog.debug("\nConditionally updated Patient:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conditionalUpdatePat));
assertEquals(1, conditionalUpdatePat.getIdentifier().size()); assertEquals(1, conditionalUpdatePat.getIdentifier().size());
/* /*
@ -516,7 +516,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
* ID of placeholder Patient should match ID of conditionally updated Patient * ID of placeholder Patient should match ID of conditionally updated Patient
*/ */
createdObs = myObservationDao.read(obsId); createdObs = myObservationDao.read(obsId);
ourLog.info("\nObservation read after Patient update:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("\nObservation read after Patient update:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
assertEquals(createdObs.getSubject().getReference(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString()); assertEquals(createdObs.getSubject().getReference(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString());
assertEquals(placeholderPatId.toUnqualifiedVersionless().getValueAsString(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString()); assertEquals(placeholderPatId.toUnqualifiedVersionless().getValueAsString(), conditionalUpdatePatId.toUnqualifiedVersionless().getValueAsString());
} }
@ -533,10 +533,10 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
IIdType id = myObservationDao.create(obsToCreate, mySrd).getId(); IIdType id = myObservationDao.create(obsToCreate, mySrd).getId();
Observation createdObs = myObservationDao.read(id); Observation createdObs = myObservationDao.read(id);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
Patient patient = myPatientDao.read(new IdType(createdObs.getSubject().getReference())); Patient patient = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(1, patient.getIdentifier().size()); assertEquals(1, patient.getIdentifier().size());
assertEquals("http://foo", patient.getIdentifier().get(0).getSystem()); assertEquals("http://foo", patient.getIdentifier().get(0).getSystem());
assertEquals("123", patient.getIdentifier().get(0).getValue()); assertEquals("123", patient.getIdentifier().get(0).getValue());
@ -556,7 +556,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
IIdType id = myAuditEventDao.create(eventToCreate, mySrd).getId(); IIdType id = myAuditEventDao.create(eventToCreate, mySrd).getId();
AuditEvent createdEvent = myAuditEventDao.read(id); AuditEvent createdEvent = myAuditEventDao.read(id);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEvent)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEvent));
} }
@Test @Test

View File

@ -507,7 +507,7 @@ public class FhirResourceDaoR4ComboUniqueParamIT extends BaseComboParamsR4Test {
.setValue(new BooleanType(true)); .setValue(new BooleanType(true));
mySearchParameterDao.create(sp); mySearchParameterDao.create(sp);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp));
// Now create matching/non-matching resources // Now create matching/non-matching resources
Patient pt = new Patient(); Patient pt = new Patient();
@ -995,7 +995,7 @@ public class FhirResourceDaoR4ComboUniqueParamIT extends BaseComboParamsR4Test {
"}"; "}";
Bundle inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input); Bundle inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inputBundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inputBundle));
mySystemDao.transaction(mySrd, inputBundle); mySystemDao.transaction(mySrd, inputBundle);
inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input); inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input);

View File

@ -84,7 +84,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateByCodeSystemsAndSourceCodeOneToMany() { public void testTranslateByCodeSystemsAndSourceCodeOneToMany() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -128,7 +128,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateByCodeSystemsAndSourceCodeOneToOne() { public void testTranslateByCodeSystemsAndSourceCodeOneToOne() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -163,7 +163,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateByCodeSystemsAndSourceCodeUnmapped() { public void testTranslateByCodeSystemsAndSourceCodeUnmapped() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -190,7 +190,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateUsingPredicatesWithCodeOnly() { public void testTranslateUsingPredicatesWithCodeOnly() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -241,7 +241,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateUsingPredicatesWithSourceAndTargetSystem2() { public void testTranslateUsingPredicatesWithSourceAndTargetSystem2() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -280,7 +280,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateUsingPredicatesWithSourceAndTargetSystem3() { public void testTranslateUsingPredicatesWithSourceAndTargetSystem3() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -327,7 +327,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateUsingPredicatesWithSourceSystem() { public void testTranslateUsingPredicatesWithSourceSystem() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -380,7 +380,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateUsingPredicatesWithSourceSystemAndVersion1() { public void testTranslateUsingPredicatesWithSourceSystemAndVersion1() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -419,7 +419,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateUsingPredicatesWithSourceSystemAndVersion3() { public void testTranslateUsingPredicatesWithSourceSystemAndVersion3() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -466,7 +466,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateUsingPredicatesWithSourceValueSet() { public void testTranslateUsingPredicatesWithSourceValueSet() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -519,7 +519,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateUsingPredicatesWithTargetValueSet() { public void testTranslateUsingPredicatesWithTargetValueSet() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -572,7 +572,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverse() { public void testTranslateWithReverse() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -720,7 +720,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseHavingEquivalence() { public void testTranslateWithReverseHavingEquivalence() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -761,7 +761,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseByCodeSystemsAndSourceCodeUnmapped() { public void testTranslateWithReverseByCodeSystemsAndSourceCodeUnmapped() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -789,7 +789,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseUsingPredicatesWithCodeOnly() { public void testTranslateWithReverseUsingPredicatesWithCodeOnly() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -834,7 +834,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseUsingPredicatesWithSourceAndTargetSystem1() { public void testTranslateWithReverseUsingPredicatesWithSourceAndTargetSystem1() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -875,7 +875,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseUsingPredicatesWithSourceAndTargetSystem4() { public void testTranslateWithReverseUsingPredicatesWithSourceAndTargetSystem4() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -916,7 +916,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseUsingPredicatesWithSourceSystem() { public void testTranslateWithReverseUsingPredicatesWithSourceSystem() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -963,7 +963,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseUsingPredicatesWithSourceSystemAndVersion() { public void testTranslateWithReverseUsingPredicatesWithSourceSystemAndVersion() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -1012,7 +1012,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseUsingPredicatesWithSourceValueSet() { public void testTranslateWithReverseUsingPredicatesWithSourceValueSet() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override
@ -1059,7 +1059,7 @@ public class FhirResourceDaoR4ConceptMapTest extends BaseJpaR4Test {
public void testTranslateWithReverseUsingPredicatesWithTargetValueSet() { public void testTranslateWithReverseUsingPredicatesWithTargetValueSet() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() { new TransactionTemplate(myTxManager).execute(new TransactionCallbackWithoutResult() {
@Override @Override

View File

@ -358,7 +358,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
// Make sure we saved the object // Make sure we saved the object
Patient patient = myPatientDao.read(new IdType("Patient/ABC")); Patient patient = myPatientDao.read(new IdType("Patient/ABC"));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(true, patient.getActive()); assertEquals(true, patient.getActive());
} }
@ -391,7 +391,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
// Make sure we saved the object // Make sure we saved the object
Patient patient = myPatientDao.read(new IdType("Patient/ABC")); Patient patient = myPatientDao.read(new IdType("Patient/ABC"));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(true, patient.getActive()); assertEquals(true, patient.getActive());
} }
@ -424,7 +424,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
// Make sure we saved the object // Make sure we saved the object
Patient patient = myPatientDao.read(new IdType("Patient/ABC")); Patient patient = myPatientDao.read(new IdType("Patient/ABC"));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(true, patient.getActive()); assertEquals(true, patient.getActive());
} }
@ -577,7 +577,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
// Make sure we saved the object // Make sure we saved the object
Patient patient = myPatientDao.read(new IdType("Patient/ABC")); Patient patient = myPatientDao.read(new IdType("Patient/ABC"));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(true, patient.getActive()); assertEquals(true, patient.getActive());
} }
@ -613,7 +613,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
// Make sure we saved the object // Make sure we saved the object
Patient patient = myPatientDao.read(new IdType("Patient/ABC")); Patient patient = myPatientDao.read(new IdType("Patient/ABC"));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(true, patient.getActive()); assertEquals(true, patient.getActive());
} }
@ -653,7 +653,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
// Make sure we saved the object // Make sure we saved the object
Patient patient = myPatientDao.read(new IdType("Patient/ABC")); Patient patient = myPatientDao.read(new IdType("Patient/ABC"));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(true, patient.getActive()); assertEquals(true, patient.getActive());
} }
@ -705,7 +705,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
// Make sure we saved the object // Make sure we saved the object
Patient patient = myPatientDao.read(pId); Patient patient = myPatientDao.read(pId);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals("6", patient.getMeta().getVersionId()); assertEquals("6", patient.getMeta().getVersionId());
} }
@ -756,7 +756,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
// Make sure we saved the object // Make sure we saved the object
Patient patient = myPatientDao.read(new IdType("Patient/ABC")); Patient patient = myPatientDao.read(new IdType("Patient/ABC"));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(true, patient.getActive()); assertEquals(true, patient.getActive());
} }

View File

@ -57,13 +57,13 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test {
obs.getCode().setText("Some Observation"); obs.getCode().setText("Some Observation");
obs.setSubject(new Reference(p)); obs.setSubject(new Reference(p));
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
IIdType id = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); IIdType id = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
Observation createdObs = myObservationDao.read(id); Observation createdObs = myObservationDao.read(id);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
runInTransaction(()->{ runInTransaction(()->{
ourLog.info("String indexes:\n * {}", myResourceIndexedSearchParamStringDao.findAll().stream().map(t->t.toString()).collect(Collectors.joining("\n * "))); ourLog.info("String indexes:\n * {}", myResourceIndexedSearchParamStringDao.findAll().stream().map(t->t.toString()).collect(Collectors.joining("\n * ")));
@ -93,13 +93,13 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test {
obs.getContained().add(p); obs.getContained().add(p);
obs.getSubject().setReference("#fooId"); obs.getSubject().setReference("#fooId");
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
IIdType id = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); IIdType id = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
Observation createdObs = myObservationDao.read(id); Observation createdObs = myObservationDao.read(id);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
runInTransaction(()->{ runInTransaction(()->{
Long i = myEntityManager Long i = myEntityManager
@ -153,13 +153,13 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test {
patient.addGeneralPractitioner().setReference("#org1"); patient.addGeneralPractitioner().setReference("#org1");
patient.getManagingOrganization().setReference("#org2"); patient.getManagingOrganization().setReference("#org2");
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
IIdType id = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); IIdType id = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless();
Patient createdPatient = myPatientDao.read(id); Patient createdPatient = myPatientDao.read(id);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdPatient)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdPatient));
runInTransaction(()->{ runInTransaction(()->{
Long i = myEntityManager Long i = myEntityManager
@ -224,13 +224,13 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test {
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
IIdType id = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); IIdType id = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(id); Encounter createdEncounter = myEncounterDao.read(id);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
runInTransaction(()->{ runInTransaction(()->{
// The practitioner // The practitioner

View File

@ -648,11 +648,11 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
.getRequest() .getRequest()
.setMethod(Bundle.HTTPVerb.POST); .setMethod(Bundle.HTTPVerb.POST);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(input));
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertThat(output.getEntry().get(0).getResponse().getLocation(), matchesPattern("Organization/[a-z0-9]{8}-.*")); assertThat(output.getEntry().get(0).getResponse().getLocation(), matchesPattern("Organization/[a-z0-9]{8}-.*"));
assertThat(output.getEntry().get(1).getResponse().getLocation(), matchesPattern("Patient/[a-z0-9]{8}-.*")); assertThat(output.getEntry().get(1).getResponse().getLocation(), matchesPattern("Patient/[a-z0-9]{8}-.*"));
@ -720,7 +720,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
q.setCode("cm"); q.setCode("cm");
obs.setValue(q); obs.setValue(q);
ourLog.info("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
assertTrue(myObservationDao.create(obs).getCreated()); assertTrue(myObservationDao.create(obs).getCreated());
@ -760,7 +760,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
q.setCode("mm"); q.setCode("mm");
obs.setValue(q); obs.setValue(q);
ourLog.info("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
assertTrue(myObservationDao.create(obs).getCreated()); assertTrue(myObservationDao.create(obs).getCreated());
@ -837,7 +837,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
q.setCode("mm"); q.setCode("mm");
obs.setValue(q); obs.setValue(q);
ourLog.info("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
assertTrue(myObservationDao.create(obs).getCreated()); assertTrue(myObservationDao.create(obs).getCreated());
@ -872,7 +872,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
assertEquals(1, ids.size()); assertEquals(1, ids.size());
ourLog.info("Observation2: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resources.get(0))); ourLog.debug("Observation2: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resources.get(0)));
} }
@ -889,7 +889,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
q.setCode("kg/dL"); q.setCode("kg/dL");
obs.setValue(q); obs.setValue(q);
ourLog.info("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
assertTrue(myObservationDao.create(obs).getCreated()); assertTrue(myObservationDao.create(obs).getCreated());
@ -929,7 +929,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
q.setCode("kg/dL"); q.setCode("kg/dL");
obs.setValue(q); obs.setValue(q);
ourLog.info("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
assertTrue(myObservationDao.create(obs).getCreated()); assertTrue(myObservationDao.create(obs).getCreated());
@ -976,7 +976,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
q.setCode("mm"); q.setCode("mm");
obs.setValue(q); obs.setValue(q);
ourLog.info("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
assertTrue(myObservationDao.create(obs).getCreated()); assertTrue(myObservationDao.create(obs).getCreated());
@ -1109,7 +1109,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
q.setCode("mm"); q.setCode("mm");
obs.setValue(q); obs.setValue(q);
ourLog.info("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation1: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
assertTrue(myObservationDao.create(obs).getCreated()); assertTrue(myObservationDao.create(obs).getCreated());

View File

@ -124,7 +124,7 @@ public class FhirResourceDaoR4DeleteTest extends BaseJpaR4Test {
.setUrl("Organization"); .setUrl("Organization");
Bundle createResponse = mySystemDao.transaction(mySrd, createTransaction); Bundle createResponse = mySystemDao.transaction(mySrd, createTransaction);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createResponse)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createResponse));
IdType orgId1 = new IdType(createResponse.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless(); IdType orgId1 = new IdType(createResponse.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless();
IdType orgId2 = new IdType(createResponse.getEntry().get(1).getResponse().getLocation()).toUnqualifiedVersionless(); IdType orgId2 = new IdType(createResponse.getEntry().get(1).getResponse().getLocation()).toUnqualifiedVersionless();
@ -154,7 +154,7 @@ public class FhirResourceDaoR4DeleteTest extends BaseJpaR4Test {
.getRequest() .getRequest()
.setMethod(Bundle.HTTPVerb.DELETE) .setMethod(Bundle.HTTPVerb.DELETE)
.setUrl(orgId2.getValue()); .setUrl(orgId2.getValue());
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(deleteTransaction)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(deleteTransaction));
mySystemDao.transaction(mySrd, deleteTransaction); mySystemDao.transaction(mySrd, deleteTransaction);
// Make sure they were deleted // Make sure they were deleted

View File

@ -83,7 +83,7 @@ public class FhirResourceDaoR4MetaTest extends BaseJpaR4Test {
IIdType id = myBundleDao.create(bundle).getId(); IIdType id = myBundleDao.create(bundle).getId();
bundle = myBundleDao.read(id); bundle = myBundleDao.read(id);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
patient = (Patient) bundle.getEntryFirstRep().getResource(); patient = (Patient) bundle.getEntryFirstRep().getResource();
assertTrue(patient.getActive()); assertTrue(patient.getActive());
assertEquals(1, patient.getMeta().getExtensionsByUrl("http://foo").size()); assertEquals(1, patient.getMeta().getExtensionsByUrl("http://foo").size());

View File

@ -1274,7 +1274,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) bb.getBundle()); Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) bb.getBundle());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(0, myCaptureQueriesListener.countSelectQueries()); assertEquals(0, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1321,7 +1321,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle outcome = mySystemDao.transaction(mySrd, input.get()); Bundle outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(1, myCaptureQueriesListener.countSelectQueries()); assertEquals(1, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1336,7 +1336,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(5, myCaptureQueriesListener.countSelectQueries()); assertEquals(5, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1352,7 +1352,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(5, myCaptureQueriesListener.countSelectQueries()); assertEquals(5, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1403,7 +1403,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle outcome = mySystemDao.transaction(mySrd, input.get()); Bundle outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
// Search for IDs and Search for tag definition // Search for IDs and Search for tag definition
assertEquals(3, myCaptureQueriesListener.countSelectQueries()); assertEquals(3, myCaptureQueriesListener.countSelectQueries());
@ -1419,7 +1419,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(9, myCaptureQueriesListener.countSelectQueries()); assertEquals(9, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1435,7 +1435,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(7, myCaptureQueriesListener.countSelectQueries()); assertEquals(7, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1698,7 +1698,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle outcome = mySystemDao.transaction(mySrd, input.get()); Bundle outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(1, myCaptureQueriesListener.countSelectQueries()); assertEquals(1, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1713,7 +1713,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(8, myCaptureQueriesListener.countSelectQueries()); assertEquals(8, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1730,7 +1730,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(7, myCaptureQueriesListener.countSelectQueries()); assertEquals(7, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1745,7 +1745,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
assertEquals(6, myCaptureQueriesListener.countSelectQueries()); assertEquals(6, myCaptureQueriesListener.countSelectQueries());
myCaptureQueriesListener.logInsertQueries(); myCaptureQueriesListener.logInsertQueries();
@ -1913,7 +1913,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread());
@ -1949,7 +1949,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
output = mySystemDao.transaction(mySrd, input); output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertEquals(3, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(3, myCaptureQueriesListener.countSelectQueriesForCurrentThread());
@ -2017,7 +2017,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertEquals(0, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(0, myCaptureQueriesListener.countSelectQueriesForCurrentThread());
@ -2072,7 +2072,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// Lookup the two existing IDs to make sure they are legit // Lookup the two existing IDs to make sure they are legit
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2110,7 +2110,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
output = mySystemDao.transaction(mySrd, input); output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// Lookup the two existing IDs to make sure they are legit // Lookup the two existing IDs to make sure they are legit
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2160,7 +2160,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// Lookup the two existing IDs to make sure they are legit // Lookup the two existing IDs to make sure they are legit
myCaptureQueriesListener.logInsertQueriesForCurrentThread(); myCaptureQueriesListener.logInsertQueriesForCurrentThread();
@ -2199,7 +2199,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
output = mySystemDao.transaction(mySrd, input); output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// Lookup the two existing IDs to make sure they are legit // Lookup the two existing IDs to make sure they are legit
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2252,7 +2252,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// Lookup the two existing IDs to make sure they are legit // Lookup the two existing IDs to make sure they are legit
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2290,7 +2290,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
output = mySystemDao.transaction(mySrd, input); output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// We do not need to resolve the target IDs a second time // We do not need to resolve the target IDs a second time
assertEquals(0, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(0, myCaptureQueriesListener.countSelectQueriesForCurrentThread());
@ -2340,7 +2340,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// Lookup the two existing IDs to make sure they are legit // Lookup the two existing IDs to make sure they are legit
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2378,7 +2378,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
output = mySystemDao.transaction(mySrd, input); output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// We do not need to resolve the target IDs a second time // We do not need to resolve the target IDs a second time
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2453,7 +2453,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// Lookup the two existing IDs to make sure they are legit // Lookup the two existing IDs to make sure they are legit
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2512,7 +2512,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
output = mySystemDao.transaction(mySrd, input); output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
// Lookup the two existing IDs to make sure they are legit // Lookup the two existing IDs to make sure they are legit
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2591,7 +2591,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
ValueSet expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet(); ValueSet expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(7, expansion.getExpansion().getContains().size()); assertEquals(7, expansion.getExpansion().getContains().size());
assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size()); assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size());
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2605,7 +2605,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
// Second time - Should reuse cache // Second time - Should reuse cache
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet(); expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(7, expansion.getExpansion().getContains().size()); assertEquals(7, expansion.getExpansion().getContains().size());
assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size()); assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size());
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2631,7 +2631,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
ValueSet expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet(); ValueSet expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(7, expansion.getExpansion().getContains().size()); assertEquals(7, expansion.getExpansion().getContains().size());
assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size()); assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size());
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2645,7 +2645,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
// Second time - Should reuse cache // Second time - Should reuse cache
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet(); expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(7, expansion.getExpansion().getContains().size()); assertEquals(7, expansion.getExpansion().getContains().size());
assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size()); assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size());
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2675,7 +2675,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
ValueSet expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet(); ValueSet expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(7, expansion.getExpansion().getContains().size()); assertEquals(7, expansion.getExpansion().getContains().size());
assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size()); assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size());
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
@ -2689,7 +2689,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseResourceProviderR4Test
// Second time - Should reuse cache // Second time - Should reuse cache
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet(); expansion = (ValueSet) myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), new ValueSetExpansionOptions(), valueSet).getValueSet();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(7, expansion.getExpansion().getContains().size()); assertEquals(7, expansion.getExpansion().getContains().size());
assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size()); assertEquals(1, expansion.getExpansion().getContains().stream().filter(t->t.getCode().equals("A")).findFirst().orElseThrow(()->new IllegalArgumentException()).getDesignation().size());
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();

View File

@ -325,7 +325,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test
fooSp.setXpathUsage(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL); fooSp.setXpathUsage(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL);
fooSp.setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE); fooSp.setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(fooSp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(fooSp));
mySearchParameterDao.create(fooSp, mySrd); mySearchParameterDao.create(fooSp, mySrd);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();
@ -341,7 +341,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test
bundle.setType(Bundle.BundleType.DOCUMENT); bundle.setType(Bundle.BundleType.DOCUMENT);
bundle.addEntry().setResource(composition); bundle.addEntry().setResource(composition);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
String bundleId = myBundleDao.create(bundle).getId().toUnqualifiedVersionless().getValue(); String bundleId = myBundleDao.create(bundle).getId().toUnqualifiedVersionless().getValue();
SearchParameterMap map; SearchParameterMap map;
@ -532,7 +532,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test
sp.setExpression("Bundle.entry.resource.as(MessageHeader).id"); sp.setExpression("Bundle.entry.resource.as(MessageHeader).id");
sp.setXpathUsage(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL); sp.setXpathUsage(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL);
sp.setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE); sp.setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp));
mySearchParameterDao.create(sp); mySearchParameterDao.create(sp);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();
@ -545,7 +545,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test
bundle.addEntry() bundle.addEntry()
.setResource(messageHeader); .setResource(messageHeader);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
myBundleDao.create(bundle); myBundleDao.create(bundle);
SearchParameterMap params = new SearchParameterMap(); SearchParameterMap params = new SearchParameterMap();
@ -1514,7 +1514,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test
sp.setExpression("Observation.specimen.resolve().receivedTime"); sp.setExpression("Observation.specimen.resolve().receivedTime");
sp.setXpathUsage(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL); sp.setXpathUsage(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL);
sp.setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE); sp.setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp));
mySearchParameterDao.create(sp); mySearchParameterDao.create(sp);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();
@ -1527,7 +1527,7 @@ public class FhirResourceDaoR4SearchCustomSearchParamTest extends BaseJpaR4Test
o.getContained().add(specimen); o.getContained().add(specimen);
o.setStatus(Observation.ObservationStatus.FINAL); o.setStatus(Observation.ObservationStatus.FINAL);
o.setSpecimen(new Reference("#FOO")); o.setSpecimen(new Reference("#FOO"));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(o)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(o));
myObservationDao.update(o); myObservationDao.update(o);
specimen = new Specimen(); specimen = new Specimen();

View File

@ -5335,7 +5335,7 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test {
sp.addExtension() sp.addExtension()
.setUrl(HapiExtensions.EXT_SEARCHPARAM_TOKEN_SUPPRESS_TEXT_INDEXING) .setUrl(HapiExtensions.EXT_SEARCHPARAM_TOKEN_SUPPRESS_TEXT_INDEXING)
.setValue(new BooleanType(true)); .setValue(new BooleanType(true));
ourLog.info("SP:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp)); ourLog.debug("SP:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(sp));
mySearchParameterDao.update(sp); mySearchParameterDao.update(sp);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();
} }
@ -5569,11 +5569,11 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test {
// Matches // Matches
Encounter e1 = new Encounter(); Encounter e1 = new Encounter();
e1.setPeriod(new Period().setStartElement(new DateTimeType("2020-09-14T12:00:00Z")).setEndElement(new DateTimeType("2020-09-14T12:00:00Z"))); e1.setPeriod(new Period().setStartElement(new DateTimeType("2020-09-14T12:00:00Z")).setEndElement(new DateTimeType("2020-09-14T12:00:00Z")));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e1)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e1));
String e1Id = myEncounterDao.create(e1).getId().toUnqualifiedVersionless().getValue(); String e1Id = myEncounterDao.create(e1).getId().toUnqualifiedVersionless().getValue();
Communication c1 = new Communication(); Communication c1 = new Communication();
c1.getEncounter().setReference(e1Id); c1.getEncounter().setReference(e1Id);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(c1)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(c1));
String c1Id = myCommunicationDao.create(c1).getId().toUnqualifiedVersionless().getValue(); String c1Id = myCommunicationDao.create(c1).getId().toUnqualifiedVersionless().getValue();
// Doesn't match (wrong date) // Doesn't match (wrong date)

View File

@ -110,7 +110,7 @@ public class FhirResourceDaoR4SearchSqlTest extends BaseJpaR4Test {
myDaoConfig.setMarkResourcesForReindexingUponSearchParameterChange(false); myDaoConfig.setMarkResourcesForReindexingUponSearchParameterChange(false);
SearchParameter searchParameter = FhirResourceDaoR4TagsTest.createSearchParamForInlineResourceProfile(); SearchParameter searchParameter = FhirResourceDaoR4TagsTest.createSearchParamForInlineResourceProfile();
ourLog.info("SearchParam:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter)); ourLog.debug("SearchParam:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter));
mySearchParameterDao.update(searchParameter, mySrd); mySearchParameterDao.update(searchParameter, mySrd);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();

View File

@ -177,14 +177,14 @@ public class FhirResourceDaoR4SearchWithHSearchDisabledTest extends BaseJpaTest
// Explicit expand // Explicit expand
ValueSet outcome = myValueSetDao.expand(vs, null); ValueSet outcome = myValueSetDao.expand(vs, null);
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("CODEA", outcome.getExpansion().getContains().get(0).getCode()); assertEquals("CODEA", outcome.getExpansion().getContains().get(0).getCode());
// Deferred expand // Deferred expand
IIdType id = myValueSetDao.create(vs).getId().toUnqualifiedVersionless(); IIdType id = myValueSetDao.create(vs).getId().toUnqualifiedVersionless();
myTermSvc.preExpandDeferredValueSetsToTerminologyTables(); myTermSvc.preExpandDeferredValueSetsToTerminologyTables();
outcome = myValueSetDao.expand(id, null, mySrd); outcome = myValueSetDao.expand(id, null, mySrd);
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("CODEA", outcome.getExpansion().getContains().get(0).getCode()); assertEquals("CODEA", outcome.getExpansion().getContains().get(0).getCode());
} }
@ -302,7 +302,7 @@ public class FhirResourceDaoR4SearchWithHSearchDisabledTest extends BaseJpaTest
myValueSetDao.create(vs); myValueSetDao.create(vs);
ValueSet expansion = myValueSetDao.expandByIdentifier("http://ccim.on.ca/fhir/iar/ValueSet/iar-citizenship-status", null); ValueSet expansion = myValueSetDao.expandByIdentifier("http://ccim.on.ca/fhir/iar/ValueSet/iar-citizenship-status", null);
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(6, expansion.getExpansion().getContains().size()); assertEquals(6, expansion.getExpansion().getContains().size());
@ -326,12 +326,12 @@ public class FhirResourceDaoR4SearchWithHSearchDisabledTest extends BaseJpaTest
myValueSetDao.create(vs2); myValueSetDao.create(vs2);
ValueSet expansion = myValueSetDao.expandByIdentifier("http://ccim.on.ca/fhir/iar/ValueSet/iar-citizenship-status", null); ValueSet expansion = myValueSetDao.expandByIdentifier("http://ccim.on.ca/fhir/iar/ValueSet/iar-citizenship-status", null);
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(5, expansion.getExpansion().getContains().size()); assertEquals(5, expansion.getExpansion().getContains().size());
ValueSet expansion2 = myValueSetDao.expandByIdentifier("http://www.healthintersections.com.au/fhir/ValueSet/extensional-case-2", null); ValueSet expansion2 = myValueSetDao.expandByIdentifier("http://www.healthintersections.com.au/fhir/ValueSet/extensional-case-2", null);
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion2)); ourLog.debug(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion2));
assertEquals(22, expansion2.getExpansion().getContains().size()); assertEquals(22, expansion2.getExpansion().getContains().size());

View File

@ -41,7 +41,7 @@ public class FhirResourceDaoR4StructureDefinitionTest extends BaseJpaR4Test {
String webUrl = null; String webUrl = null;
String name = "Foo Profile"; String name = "Foo Profile";
StructureDefinition output = myStructureDefinitionDao.generateSnapshot(differential, url, webUrl, name); StructureDefinition output = myStructureDefinitionDao.generateSnapshot(differential, url, webUrl, name);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(54, output.getSnapshot().getElement().size()); assertEquals(54, output.getSnapshot().getElement().size());
} }
@ -60,7 +60,7 @@ public class FhirResourceDaoR4StructureDefinitionTest extends BaseJpaR4Test {
myStructureDefinitionDao.update(sd2); myStructureDefinitionDao.update(sd2);
StructureDefinition snapshotted = myStructureDefinitionDao.generateSnapshot(sd2, null, null, null); StructureDefinition snapshotted = myStructureDefinitionDao.generateSnapshot(sd2, null, null, null);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(snapshotted)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(snapshotted));
assertTrue(snapshotted.getSnapshot().getElement().size() > 0); assertTrue(snapshotted.getSnapshot().getElement().size() > 0);
} }

View File

@ -412,7 +412,7 @@ public class FhirResourceDaoR4TagsTest extends BaseResourceProviderR4Test {
myDaoConfig.setTagStorageMode(DaoConfig.TagStorageModeEnum.INLINE); myDaoConfig.setTagStorageMode(DaoConfig.TagStorageModeEnum.INLINE);
SearchParameter searchParameter = createResourceTagSearchParameter(); SearchParameter searchParameter = createResourceTagSearchParameter();
ourLog.info("SearchParam:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter)); ourLog.debug("SearchParam:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter));
mySearchParameterDao.update(searchParameter, mySrd); mySearchParameterDao.update(searchParameter, mySrd);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();
@ -477,7 +477,7 @@ public class FhirResourceDaoR4TagsTest extends BaseResourceProviderR4Test {
myDaoConfig.setTagStorageMode(DaoConfig.TagStorageModeEnum.INLINE); myDaoConfig.setTagStorageMode(DaoConfig.TagStorageModeEnum.INLINE);
SearchParameter searchParameter = createSearchParamForInlineResourceProfile(); SearchParameter searchParameter = createSearchParamForInlineResourceProfile();
ourLog.info("SearchParam:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter)); ourLog.debug("SearchParam:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter));
mySearchParameterDao.update(searchParameter, mySrd); mySearchParameterDao.update(searchParameter, mySrd);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();
@ -505,7 +505,7 @@ public class FhirResourceDaoR4TagsTest extends BaseResourceProviderR4Test {
searchParameter.setCode("_security"); searchParameter.setCode("_security");
searchParameter.setName("Security"); searchParameter.setName("Security");
searchParameter.setExpression("meta.security"); searchParameter.setExpression("meta.security");
ourLog.info("SearchParam:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter)); ourLog.debug("SearchParam:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(searchParameter));
mySearchParameterDao.update(searchParameter, mySrd); mySearchParameterDao.update(searchParameter, mySrd);
mySearchParamRegistry.forceRefresh(); mySearchParamRegistry.forceRefresh();

View File

@ -638,7 +638,7 @@ public class FhirResourceDaoR4TerminologyTest extends BaseJpaR4Test {
ValueSet result = myValueSetDao.expandByIdentifier("http://hl7.org/fhir/ValueSet/doc-typecodes", new ValueSetExpansionOptions().setFilter("")); ValueSet result = myValueSetDao.expandByIdentifier("http://hl7.org/fhir/ValueSet/doc-typecodes", new ValueSetExpansionOptions().setFilter(""));
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(result)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(result));
} }
@Test @Test

View File

@ -320,7 +320,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
patient = myPatientDao.read(id); patient = myPatientDao.read(id);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals(2, patient.getContained().size()); assertEquals(2, patient.getContained().size());
@ -3163,7 +3163,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
myBundleDao.update(inputBundle); myBundleDao.update(inputBundle);
Bundle outputBundle = myBundleDao.read(new IdType("cftest")); Bundle outputBundle = myBundleDao.read(new IdType("cftest"));
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
for (BundleEntryComponent next : outputBundle.getEntry()) { for (BundleEntryComponent next : outputBundle.getEntry()) {
assertTrue(next.getResource().getIdElement().hasIdPart()); assertTrue(next.getResource().getIdElement().hasIdPart());
@ -3193,7 +3193,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -3205,7 +3205,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -3217,7 +3217,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -3229,7 +3229,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }

View File

@ -768,7 +768,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
// Non-existent target // Non-existent target
obs.setSubject(new Reference("Group/123")); obs.setSubject(new Reference("Group/123"));
oo = validateAndReturnOutcome(obs); oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
Coding expectedIssueCode = new Coding(); Coding expectedIssueCode = new Coding();
expectedIssueCode.setSystem(JAVA_VALIDATOR_DETAILS_SYSTEM).setCode(I18nConstants.REFERENCE_REF_CANTRESOLVE); expectedIssueCode.setSystem(JAVA_VALIDATOR_DETAILS_SYSTEM).setCode(I18nConstants.REFERENCE_REF_CANTRESOLVE);
assertTrue(expectedIssueCode.equalsDeep(oo.getIssueFirstRep().getDetails().getCodingFirstRep()), encode(oo)); assertTrue(expectedIssueCode.equalsDeep(oo.getIssueFirstRep().getDetails().getCodingFirstRep()), encode(oo));
@ -777,13 +777,13 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
// Target of wrong type // Target of wrong type
obs.setSubject(new Reference("Group/ABC")); obs.setSubject(new Reference("Group/ABC"));
oo = validateAndReturnOutcome(obs); oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals("Invalid Resource target type. Found Group, but expected one of ([Patient])", oo.getIssueFirstRep().getDiagnostics(), encode(oo)); assertEquals("Invalid Resource target type. Found Group, but expected one of ([Patient])", oo.getIssueFirstRep().getDiagnostics(), encode(oo));
// Target of right type // Target of right type
obs.setSubject(new Reference("Patient/DEF")); obs.setSubject(new Reference("Patient/DEF"));
oo = validateAndReturnOutcome(obs); oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encode(oo)); assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encode(oo));
} }
@ -838,7 +838,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
// Non-existent target // Non-existent target
obs.setSubject(new Reference("Group/123")); obs.setSubject(new Reference("Group/123"));
oo = validateAndReturnOutcome(obs); oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
Coding expectedIssueCode = new Coding(); Coding expectedIssueCode = new Coding();
expectedIssueCode.setSystem(JAVA_VALIDATOR_DETAILS_SYSTEM).setCode(I18nConstants.REFERENCE_REF_CANTRESOLVE); expectedIssueCode.setSystem(JAVA_VALIDATOR_DETAILS_SYSTEM).setCode(I18nConstants.REFERENCE_REF_CANTRESOLVE);
assertTrue(expectedIssueCode.equalsDeep(oo.getIssueFirstRep().getDetails().getCodingFirstRep()), encode(oo)); assertTrue(expectedIssueCode.equalsDeep(oo.getIssueFirstRep().getDetails().getCodingFirstRep()), encode(oo));
@ -847,13 +847,13 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
// Target of wrong type // Target of wrong type
obs.setSubject(new Reference("Group/ABC")); obs.setSubject(new Reference("Group/ABC"));
oo = validateAndReturnOutcome(obs); oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals("Unable to find a match for profile Group/ABC (by type) among choices: ; [CanonicalType[http://hl7.org/fhir/StructureDefinition/Patient]]", oo.getIssueFirstRep().getDiagnostics(), encode(oo)); assertEquals("Unable to find a match for profile Group/ABC (by type) among choices: ; [CanonicalType[http://hl7.org/fhir/StructureDefinition/Patient]]", oo.getIssueFirstRep().getDiagnostics(), encode(oo));
// Target of right type // Target of right type
obs.setSubject(new Reference("Patient/DEF")); obs.setSubject(new Reference("Patient/DEF"));
oo = validateAndReturnOutcome(obs); oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encode(oo)); assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encode(oo));
} }
@ -907,7 +907,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
// Non-existent target // Non-existent target
obs.setSubject(new Reference("Group/123")); obs.setSubject(new Reference("Group/123"));
OperationOutcome oo = validateAndReturnOutcome(obs); OperationOutcome oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
Coding expectedIssueCode = new Coding(); Coding expectedIssueCode = new Coding();
expectedIssueCode.setSystem(JAVA_VALIDATOR_DETAILS_SYSTEM).setCode(I18nConstants.REFERENCE_REF_CANTRESOLVE); expectedIssueCode.setSystem(JAVA_VALIDATOR_DETAILS_SYSTEM).setCode(I18nConstants.REFERENCE_REF_CANTRESOLVE);
assertTrue(expectedIssueCode.equalsDeep(oo.getIssueFirstRep().getDetails().getCodingFirstRep()), encode(oo)); assertTrue(expectedIssueCode.equalsDeep(oo.getIssueFirstRep().getDetails().getCodingFirstRep()), encode(oo));
@ -916,13 +916,13 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
// Target of wrong type // Target of wrong type
obs.setSubject(new Reference("Group/ABC")); obs.setSubject(new Reference("Group/ABC"));
oo = validateAndReturnOutcome(obs); oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encode(oo)); assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encode(oo));
// Target of right type // Target of right type
obs.setSubject(new Reference("Patient/DEF")); obs.setSubject(new Reference("Patient/DEF"));
oo = validateAndReturnOutcome(obs); oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encode(oo)); assertEquals("No issues detected during validation", oo.getIssueFirstRep().getDiagnostics(), encode(oo));
} }
@ -975,7 +975,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
ValueSet vs = myFhirContext.newJsonParser().parseResource(ValueSet.class, input); ValueSet vs = myFhirContext.newJsonParser().parseResource(ValueSet.class, input);
OperationOutcome oo = validateAndReturnOutcome(vs); OperationOutcome oo = validateAndReturnOutcome(vs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals("The code 123 is not valid in the system https://bb", oo.getIssue().get(0).getDiagnostics()); assertEquals("The code 123 is not valid in the system https://bb", oo.getIssue().get(0).getDiagnostics());
} }
@ -1031,7 +1031,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
obs.getCode().getCodingFirstRep().setCode("foo-foo"); obs.getCode().getCodingFirstRep().setCode("foo-foo");
obs.getCode().getCodingFirstRep().setDisplay("Some Code"); obs.getCode().getCodingFirstRep().setDisplay("Some Code");
outcome = (OperationOutcome) myObservationDao.validate(obs, null, null, null, ValidationModeEnum.CREATE, "http://example.com/structuredefinition", mySrd).getOperationOutcome(); outcome = (OperationOutcome) myObservationDao.validate(obs, null, null, null, ValidationModeEnum.CREATE, "http://example.com/structuredefinition", mySrd).getOperationOutcome();
ourLog.info("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("Unknown code in fragment CodeSystem 'http://example.com/codesystem#foo-foo' for in-memory expansion of ValueSet 'http://example.com/valueset'", outcome.getIssueFirstRep().getDiagnostics()); assertEquals("Unknown code in fragment CodeSystem 'http://example.com/codesystem#foo-foo' for in-memory expansion of ValueSet 'http://example.com/valueset'", outcome.getIssueFirstRep().getDiagnostics());
assertEquals(OperationOutcome.IssueSeverity.WARNING, outcome.getIssueFirstRep().getSeverity()); assertEquals(OperationOutcome.IssueSeverity.WARNING, outcome.getIssueFirstRep().getSeverity());
@ -1040,7 +1040,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
obs.getCode().getCodingFirstRep().setCode("some-code"); obs.getCode().getCodingFirstRep().setCode("some-code");
obs.getCode().getCodingFirstRep().setDisplay("Some Code"); obs.getCode().getCodingFirstRep().setDisplay("Some Code");
outcome = (OperationOutcome) myObservationDao.validate(obs, null, null, null, ValidationModeEnum.CREATE, "http://example.com/structuredefinition", mySrd).getOperationOutcome(); outcome = (OperationOutcome) myObservationDao.validate(obs, null, null, null, ValidationModeEnum.CREATE, "http://example.com/structuredefinition", mySrd).getOperationOutcome();
ourLog.info("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("No issues detected during validation", outcome.getIssueFirstRep().getDiagnostics()); assertEquals("No issues detected during validation", outcome.getIssueFirstRep().getDiagnostics());
assertEquals(OperationOutcome.IssueSeverity.INFORMATION, outcome.getIssueFirstRep().getSeverity()); assertEquals(OperationOutcome.IssueSeverity.INFORMATION, outcome.getIssueFirstRep().getSeverity());
@ -1050,13 +1050,13 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
obs.getCode().getCodingFirstRep().setDisplay("Some Code"); obs.getCode().getCodingFirstRep().setDisplay("Some Code");
try { try {
outcome = (OperationOutcome) myObservationDao.validate(obs, null, null, null, ValidationModeEnum.CREATE, "http://example.com/structuredefinition", mySrd).getOperationOutcome(); outcome = (OperationOutcome) myObservationDao.validate(obs, null, null, null, ValidationModeEnum.CREATE, "http://example.com/structuredefinition", mySrd).getOperationOutcome();
ourLog.info("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("", outcome.getIssueFirstRep().getDiagnostics()); assertEquals("", outcome.getIssueFirstRep().getDiagnostics());
assertEquals(OperationOutcome.IssueSeverity.INFORMATION, outcome.getIssueFirstRep().getSeverity()); assertEquals(OperationOutcome.IssueSeverity.INFORMATION, outcome.getIssueFirstRep().getSeverity());
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
outcome = (OperationOutcome) e.getOperationOutcome(); outcome = (OperationOutcome) e.getOperationOutcome();
ourLog.info("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertThat(outcome.getIssueFirstRep().getDiagnostics(), assertThat(outcome.getIssueFirstRep().getDiagnostics(),
containsString("None of the codings provided are in the value set 'MessageCategory'")); containsString("None of the codings provided are in the value set 'MessageCategory'"));
assertEquals(OperationOutcome.IssueSeverity.ERROR, outcome.getIssueFirstRep().getSeverity()); assertEquals(OperationOutcome.IssueSeverity.ERROR, outcome.getIssueFirstRep().getSeverity());
@ -1267,7 +1267,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
obs.getCode().getCodingFirstRep().setSystem("http://FOO").setCode("CODE99999").setDisplay("Display 3"); obs.getCode().getCodingFirstRep().setSystem("http://FOO").setCode("CODE99999").setDisplay("Display 3");
OperationOutcome oo = validateAndReturnOutcome(obs); OperationOutcome oo = validateAndReturnOutcome(obs);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals("Error MY ERROR validating Coding: java.lang.NullPointerException: MY ERROR", oo.getIssueFirstRep().getDiagnostics()); assertEquals("Error MY ERROR validating Coding: java.lang.NullPointerException: MY ERROR", oo.getIssueFirstRep().getDiagnostics());
assertEquals(OperationOutcome.IssueSeverity.ERROR, oo.getIssueFirstRep().getSeverity()); assertEquals(OperationOutcome.IssueSeverity.ERROR, oo.getIssueFirstRep().getSeverity());
} }
@ -1284,7 +1284,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
.setText("This is text") .setText("This is text")
.setAuthor(new Reference("Patient/123")); .setAuthor(new Reference("Patient/123"));
ourLog.info(myFhirContext.newJsonParser().encodeResourceToString(allergy)); ourLog.debug(myFhirContext.newJsonParser().encodeResourceToString(allergy));
OperationOutcome oo = validateAndReturnOutcome(allergy); OperationOutcome oo = validateAndReturnOutcome(allergy);
assertThat(encode(oo), containsString("None of the codings provided are in the value set 'AllergyIntolerance Clinical Status Codes' (http://hl7.org/fhir/ValueSet/allergyintolerance-clinical|4.0.1)")); assertThat(encode(oo), containsString("None of the codings provided are in the value set 'AllergyIntolerance Clinical Status Codes' (http://hl7.org/fhir/ValueSet/allergyintolerance-clinical|4.0.1)"));
@ -1323,7 +1323,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
try { try {
myStructureDefinitionDao.validate(sd, null, null, null, ValidationModeEnum.UPDATE, null, mySrd); myStructureDefinitionDao.validate(sd, null, null, null, ValidationModeEnum.UPDATE, null, mySrd);
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
} }
ourLog.info("Done validation"); ourLog.info("Done validation");
@ -1351,7 +1351,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
ourLog.info("Validation result: {}", encodedResponse); ourLog.info("Validation result: {}", encodedResponse);
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
} }
ourLog.info("Done validation"); ourLog.info("Done validation");
@ -1407,7 +1407,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
.setCode("bar"); .setCode("bar");
MethodOutcome outcome = myPatientDao.validate(patient, null, encode(patient), EncodingEnum.JSON, ValidationModeEnum.CREATE, null, mySrd); MethodOutcome outcome = myPatientDao.validate(patient, null, encode(patient), EncodingEnum.JSON, ValidationModeEnum.CREATE, null, mySrd);
IBaseOperationOutcome oo = outcome.getOperationOutcome(); IBaseOperationOutcome oo = outcome.getOperationOutcome();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
// It would be ok for this to produce 0 issues, or just an information message too // It would be ok for this to produce 0 issues, or just an information message too
assertEquals(1, OperationOutcomeUtil.getIssueCount(myFhirContext, oo)); assertEquals(1, OperationOutcomeUtil.getIssueCount(myFhirContext, oo));
@ -1568,7 +1568,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
try { try {
MethodOutcome outcome = myQuestionnaireResponseDao.validate(qr, null, null, null, ValidationModeEnum.CREATE, null, mySrd); MethodOutcome outcome = myQuestionnaireResponseDao.validate(qr, null, null, null, ValidationModeEnum.CREATE, null, mySrd);
OperationOutcome oo = (OperationOutcome) outcome.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) outcome.getOperationOutcome();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
OperationOutcome oo = (OperationOutcome) e.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) e.getOperationOutcome();
@ -1928,7 +1928,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
fail(); fail();
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
OperationOutcome oo = (OperationOutcome) e.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) e.getOperationOutcome();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), assertThat(oo.getIssueFirstRep().getDiagnostics(),
containsString("None of the codings provided are in the value set 'Condition Clinical Status Codes' (http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1), and a coding from this value set is required) (codes = http://terminology.hl7.org/CodeSystem/condition-clinical/wrong-system#notrealcode)")); containsString("None of the codings provided are in the value set 'Condition Clinical Status Codes' (http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1), and a coding from this value set is required) (codes = http://terminology.hl7.org/CodeSystem/condition-clinical/wrong-system#notrealcode)"));
} }
@ -1959,10 +1959,10 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
try { try {
MethodOutcome results = myQuestionnaireDao.validate(null, null, input, EncodingEnum.XML, ValidationModeEnum.UPDATE, null, mySrd); MethodOutcome results = myQuestionnaireDao.validate(null, null, input, EncodingEnum.XML, ValidationModeEnum.UPDATE, null, mySrd);
OperationOutcome oo = (OperationOutcome) results.getOperationOutcome(); OperationOutcome oo = (OperationOutcome) results.getOperationOutcome();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
// this is a failure of the test // this is a failure of the test
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
throw e; throw e;
} }
} }
@ -2003,7 +2003,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
ValueSetExpansionOptions options = ValueSetExpansionOptions.forOffsetAndCount(0, 10000); ValueSetExpansionOptions options = ValueSetExpansionOptions.forOffsetAndCount(0, 10000);
ValueSet expansion = myValueSetDao.expand(id, options, mySrd); ValueSet expansion = myValueSetDao.expand(id, options, mySrd);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertEquals(2, expansion.getExpansion().getContains().size()); assertEquals(2, expansion.getExpansion().getContains().size());
} }

View File

@ -568,7 +568,7 @@ public class FhirResourceDaoR4ValueSetTest extends BaseJpaR4Test {
assertTrue(outcome.isOk()); assertTrue(outcome.isOk());
ValueSet expansion = myValueSetDao.expand(new IdType("ValueSet/vaccinecode"), new ValueSetExpansionOptions(), mySrd); ValueSet expansion = myValueSetDao.expand(new IdType("ValueSet/vaccinecode"), new ValueSetExpansionOptions(), mySrd);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
} }

View File

@ -326,7 +326,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
builder.addTransactionCreateEntry(observation); builder.addTransactionCreateEntry(observation);
Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) builder.getBundle()); Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) builder.getBundle());
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
IdType patientId = new IdType(outcome.getEntry().get(0).getResponse().getLocation()); IdType patientId = new IdType(outcome.getEntry().get(0).getResponse().getLocation());
IdType encounterId = new IdType(outcome.getEntry().get(1).getResponse().getLocation()); IdType encounterId = new IdType(outcome.getEntry().get(1).getResponse().getLocation());
IdType observationId = new IdType(outcome.getEntry().get(2).getResponse().getLocation()); IdType observationId = new IdType(outcome.getEntry().get(2).getResponse().getLocation());
@ -384,7 +384,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
builder.addTransactionCreateEntry(observation); builder.addTransactionCreateEntry(observation);
Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) builder.getBundle()); Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) builder.getBundle());
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("200 OK", outcome.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", outcome.getEntry().get(0).getResponse().getStatus());
assertEquals("200 OK", outcome.getEntry().get(1).getResponse().getStatus()); assertEquals("200 OK", outcome.getEntry().get(1).getResponse().getStatus());
assertEquals("201 Created", outcome.getEntry().get(2).getResponse().getStatus()); assertEquals("201 Created", outcome.getEntry().get(2).getResponse().getStatus());
@ -434,7 +434,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) builder.getBundle()); Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) builder.getBundle());
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("200 OK", outcome.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", outcome.getEntry().get(0).getResponse().getStatus());
assertEquals("201 Created", outcome.getEntry().get(1).getResponse().getStatus()); assertEquals("201 Created", outcome.getEntry().get(1).getResponse().getStatus());
IdType patientId = new IdType(outcome.getEntry().get(0).getResponse().getLocation()); IdType patientId = new IdType(outcome.getEntry().get(0).getResponse().getLocation());
@ -486,7 +486,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) builder.getBundle()); Bundle outcome = mySystemDao.transaction(mySrd, (Bundle) builder.getBundle());
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("200 OK", outcome.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", outcome.getEntry().get(0).getResponse().getStatus());
assertEquals("201 Created", outcome.getEntry().get(1).getResponse().getStatus()); assertEquals("201 Created", outcome.getEntry().get(1).getResponse().getStatus());
IdType patientId = new IdType(outcome.getEntry().get(0).getResponse().getLocation()); IdType patientId = new IdType(outcome.getEntry().get(0).getResponse().getLocation());

View File

@ -363,7 +363,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
assertEquals("404 Not Found", response.getEntry().get(1).getResponse().getStatus()); assertEquals("404 Not Found", response.getEntry().get(1).getResponse().getStatus());
OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity()); assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity());
assertEquals(Msg.code(2001) + "Resource Patient/BABABABA is not known", oo.getIssue().get(0).getDiagnostics()); assertEquals(Msg.code(2001) + "Resource Patient/BABABABA is not known", oo.getIssue().get(0).getDiagnostics());
} }
@ -397,7 +397,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
assertEquals("400 Bad Request", response.getEntry().get(1).getResponse().getStatus()); assertEquals("400 Bad Request", response.getEntry().get(1).getResponse().getStatus());
OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity()); assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity());
assertThat(oo.getIssue().get(0).getDiagnostics(), containsString("Unknown search parameter")); assertThat(oo.getIssue().get(0).getDiagnostics(), containsString("Unknown search parameter"));
} }
@ -436,7 +436,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
.getRequest().setMethod(HTTPVerb.POST); .getRequest().setMethod(HTTPVerb.POST);
Bundle resp = mySystemDao.transaction(mySrd, inputBundle); Bundle resp = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
IdType epId = new IdType(resp.getEntry().get(0).getResponse().getLocation()); IdType epId = new IdType(resp.getEntry().get(0).getResponse().getLocation());
IdType condId = new IdType(resp.getEntry().get(1).getResponse().getLocation()); IdType condId = new IdType(resp.getEntry().get(1).getResponse().getLocation());
@ -468,9 +468,9 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
.getRequest().setMethod(HTTPVerb.DELETE) .getRequest().setMethod(HTTPVerb.DELETE)
.setUrl(condId.toUnqualifiedVersionless().getValue()); .setUrl(condId.toUnqualifiedVersionless().getValue());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(inputBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(inputBundle));
resp = mySystemDao.transaction(mySrd, inputBundle); resp = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
// They should now be deleted // They should now be deleted
try { try {
@ -491,11 +491,11 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle output = mySystemDao.transaction(mySrd, bundle); Bundle output = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
IdType id = new IdType(output.getEntry().get(1).getResponse().getLocation()); IdType id = new IdType(output.getEntry().get(1).getResponse().getLocation());
MedicationRequest mo = myMedicationRequestDao.read(id); MedicationRequest mo = myMedicationRequestDao.read(id);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(mo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(mo));
} }
@Test @Test
@ -830,7 +830,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle bundle = myFhirContext.newJsonParser().parseResource(Bundle.class, inputBundleString); Bundle bundle = myFhirContext.newJsonParser().parseResource(Bundle.class, inputBundleString);
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus());
} }
@ -875,7 +875,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
assertEquals(2, resp.getEntry().size()); assertEquals(2, resp.getEntry().size());
assertEquals(BundleType.BATCHRESPONSE, resp.getTypeElement().getValue()); assertEquals(BundleType.BATCHRESPONSE, resp.getTypeElement().getValue());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
BundleEntryResponseComponent respEntry; BundleEntryResponseComponent respEntry;
// Bundle.entry[0] is create response // Bundle.entry[0] is create response
@ -1071,13 +1071,13 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
request = loadResourceFromClasspath(Bundle.class, "/r4/transaction-no-contained.json"); request = loadResourceFromClasspath(Bundle.class, "/r4/transaction-no-contained.json");
Bundle outcome = mySystemDao.transaction(mySrd, request); Bundle outcome = mySystemDao.transaction(mySrd, request);
ourLog.info("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
IdType communicationId = new IdType(outcome.getEntry().get(1).getResponse().getLocation()); IdType communicationId = new IdType(outcome.getEntry().get(1).getResponse().getLocation());
Communication communication = myCommunicationDao.read(communicationId, mySrd); Communication communication = myCommunicationDao.read(communicationId, mySrd);
assertThat(communication.getSubject().getReference(), matchesPattern("Patient/[0-9]+")); assertThat(communication.getSubject().getReference(), matchesPattern("Patient/[0-9]+"));
ourLog.info("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(communication)); ourLog.debug("Outcome: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(communication));
} }
@ -1151,7 +1151,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
.setUrl("Patient/"); .setUrl("Patient/");
Bundle outcome = mySystemDao.transaction(mySrd, request); Bundle outcome = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("400 Bad Request", outcome.getEntry().get(0).getResponse().getStatus()); assertEquals("400 Bad Request", outcome.getEntry().get(0).getResponse().getStatus());
assertEquals(IssueSeverity.ERROR, ((OperationOutcome) outcome.getEntry().get(0).getResponse().getOutcome()).getIssueFirstRep().getSeverity()); assertEquals(IssueSeverity.ERROR, ((OperationOutcome) outcome.getEntry().get(0).getResponse().getOutcome()).getIssueFirstRep().getSeverity());
assertEquals(Msg.code(543) + "Missing required resource in Bundle.entry[0].resource for operation POST", ((OperationOutcome) outcome.getEntry().get(0).getResponse().getOutcome()).getIssueFirstRep().getDiagnostics()); assertEquals(Msg.code(543) + "Missing required resource in Bundle.entry[0].resource for operation POST", ((OperationOutcome) outcome.getEntry().get(0).getResponse().getOutcome()).getIssueFirstRep().getDiagnostics());
@ -1170,7 +1170,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
.setUrl("Patient/123"); .setUrl("Patient/123");
Bundle outcome = mySystemDao.transaction(mySrd, request); Bundle outcome = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("400 Bad Request", outcome.getEntry().get(0).getResponse().getStatus()); assertEquals("400 Bad Request", outcome.getEntry().get(0).getResponse().getStatus());
assertEquals(IssueSeverity.ERROR, ((OperationOutcome) outcome.getEntry().get(0).getResponse().getOutcome()).getIssueFirstRep().getSeverity()); assertEquals(IssueSeverity.ERROR, ((OperationOutcome) outcome.getEntry().get(0).getResponse().getOutcome()).getIssueFirstRep().getSeverity());
assertEquals(Msg.code(543) + "Missing required resource in Bundle.entry[0].resource for operation PUT", ((OperationOutcome) outcome.getEntry().get(0).getResponse().getOutcome()).getIssueFirstRep().getDiagnostics()); assertEquals(Msg.code(543) + "Missing required resource in Bundle.entry[0].resource for operation PUT", ((OperationOutcome) outcome.getEntry().get(0).getResponse().getOutcome()).getIssueFirstRep().getDiagnostics());
@ -1188,7 +1188,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
.setMethod(HTTPVerb.POST); .setMethod(HTTPVerb.POST);
Bundle outcome = mySystemDao.transaction(mySrd, request); Bundle outcome = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
assertEquals("201 Created", outcome.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", outcome.getEntry().get(0).getResponse().getStatus());
validate(outcome); validate(outcome);
} }
@ -1616,7 +1616,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle response = mySystemDao.transaction(null, request); Bundle response = mySystemDao.transaction(null, request);
ourLog.info("Response:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
List<String> responseTypes = response List<String> responseTypes = response
.getEntry() .getEntry()
@ -1676,7 +1676,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle response = mySystemDao.transaction(null, request); Bundle response = mySystemDao.transaction(null, request);
ourLog.info("Response:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
List<String> responseTypes = response List<String> responseTypes = response
.getEntry() .getEntry()
@ -1733,7 +1733,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle response = mySystemDao.transaction(null, request); Bundle response = mySystemDao.transaction(null, request);
ourLog.info("Response:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
List<String> responseTypes = response List<String> responseTypes = response
.getEntry() .getEntry()
@ -2003,7 +2003,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
assertEquals("404 Not Found", response.getEntry().get(1).getResponse().getStatus()); assertEquals("404 Not Found", response.getEntry().get(1).getResponse().getStatus());
OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity()); assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity());
assertEquals(Msg.code(2001) + "Resource Patient/BABABABA is not known", oo.getIssue().get(0).getDiagnostics()); assertEquals(Msg.code(2001) + "Resource Patient/BABABABA is not known", oo.getIssue().get(0).getDiagnostics());
} }
@ -2037,7 +2037,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
assertEquals("400 Bad Request", response.getEntry().get(1).getResponse().getStatus()); assertEquals("400 Bad Request", response.getEntry().get(1).getResponse().getStatus());
OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(1).getResponse().getOutcome();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(oo));
assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity()); assertEquals(IssueSeverity.ERROR, oo.getIssue().get(0).getSeverity());
assertThat(oo.getIssue().get(0).getDiagnostics(), containsString("Unknown search parameter")); assertThat(oo.getIssue().get(0).getDiagnostics(), containsString("Unknown search parameter"));
} }
@ -2501,7 +2501,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
IBundleProvider history = mySystemDao.history(null, null, null, null); IBundleProvider history = mySystemDao.history(null, null, null, null);
Bundle list = toBundleR4(history); Bundle list = toBundleR4(history);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(list)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(list));
assertEquals(6, list.getEntry().size()); assertEquals(6, list.getEntry().size());
@ -2775,7 +2775,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertThat(resp.getEntry().get(0).getResponse().getLocation(), startsWith("Patient/a555-44-4444/_history/")); assertThat(resp.getEntry().get(0).getResponse().getLocation(), startsWith("Patient/a555-44-4444/_history/"));
assertThat(resp.getEntry().get(1).getResponse().getLocation(), startsWith("Patient/temp6789/_history/")); assertThat(resp.getEntry().get(1).getResponse().getLocation(), startsWith("Patient/temp6789/_history/"));
@ -2791,7 +2791,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle response = mySystemDao.transaction(mySrd, bundle); Bundle response = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus());
assertThat(response.getEntry().get(0).getResponse().getLocation(), matchesPattern("Practitioner/[0-9]+/_history/1")); assertThat(response.getEntry().get(0).getResponse().getLocation(), matchesPattern("Practitioner/[0-9]+/_history/1"));
@ -2802,7 +2802,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input); bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
response = mySystemDao.transaction(mySrd, bundle); response = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus());
assertThat(response.getEntry().get(0).getResponse().getLocation(), matchesPattern("Practitioner/[0-9]+/_history/1")); assertThat(response.getEntry().get(0).getResponse().getLocation(), matchesPattern("Practitioner/[0-9]+/_history/1"));
@ -2813,7 +2813,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
InputStream bundleRes = SystemProviderR4Test.class.getResourceAsStream("/simone_bundle3.xml"); InputStream bundleRes = SystemProviderR4Test.class.getResourceAsStream("/simone_bundle3.xml");
String bundle = IOUtils.toString(bundleRes, StandardCharsets.UTF_8); String bundle = IOUtils.toString(bundleRes, StandardCharsets.UTF_8);
Bundle output = mySystemDao.transaction(mySrd, myFhirContext.newXmlParser().parseResource(Bundle.class, bundle)); Bundle output = mySystemDao.transaction(mySrd, myFhirContext.newXmlParser().parseResource(Bundle.class, bundle));
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
} }
@Test @Test
@ -2825,7 +2825,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus());
assertEquals("201 Created", resp.getEntry().get(1).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(1).getResponse().getStatus());
@ -2886,7 +2886,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
} }
private void testTransactionOrderingValidateResponse(int pass, Bundle resp) { private void testTransactionOrderingValidateResponse(int pass, Bundle resp) {
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(4, resp.getEntry().size()); assertEquals(4, resp.getEntry().size());
assertEquals("200 OK", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", resp.getEntry().get(0).getResponse().getStatus());
if (pass == 0) { if (pass == 0) {
@ -2923,11 +2923,11 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle outputBundle; Bundle outputBundle;
inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input); inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input);
outputBundle = mySystemDao.transaction(mySrd, inputBundle); outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input); inputBundle = myFhirContext.newJsonParser().parseResource(Bundle.class, input);
outputBundle = mySystemDao.transaction(mySrd, inputBundle); outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
IBundleProvider allPatients = myPatientDao.search(new SearchParameterMap()); IBundleProvider allPatients = myPatientDao.search(new SearchParameterMap());
assertEquals(1, allPatients.size().intValue()); assertEquals(1, allPatients.size().intValue());
@ -3857,7 +3857,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle response = mySystemDao.transaction(mySrd, bundle); Bundle response = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
} }
@ -3940,7 +3940,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, inputBundleString); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, inputBundleString);
Bundle resp = mySystemDao.transaction(mySrd, bundle); Bundle resp = mySystemDao.transaction(mySrd, bundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", resp.getEntry().get(0).getResponse().getStatus());
@ -4004,7 +4004,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
//@formatter:on //@formatter:on
Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle); Bundle outputBundle = mySystemDao.transaction(mySrd, inputBundle);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(outputBundle));
assertEquals(3, outputBundle.getEntry().size()); assertEquals(3, outputBundle.getEntry().size());
IdDt id0 = new IdDt(outputBundle.getEntry().get(0).getResponse().getLocation()); IdDt id0 = new IdDt(outputBundle.getEntry().get(0).getResponse().getLocation());
@ -4039,7 +4039,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle input2 = createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb.POST); Bundle input2 = createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb.POST);
Bundle output2 = mySystemDao.transaction(null, input2); Bundle output2 = mySystemDao.transaction(null, input2);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output2)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output2));
assertEquals("200 OK", output2.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", output2.getEntry().get(0).getResponse().getStatus());
assertEquals("200 OK", output2.getEntry().get(1).getResponse().getStatus()); assertEquals("200 OK", output2.getEntry().get(1).getResponse().getStatus());
@ -4069,7 +4069,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle input2 = createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb.PUT); Bundle input2 = createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb.PUT);
Bundle output2 = mySystemDao.transaction(null, input2); Bundle output2 = mySystemDao.transaction(null, input2);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output2)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output2));
assertEquals("200 OK", output2.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", output2.getEntry().get(0).getResponse().getStatus());
assertEquals("200 OK", output2.getEntry().get(1).getResponse().getStatus()); assertEquals("200 OK", output2.getEntry().get(1).getResponse().getStatus());
@ -4088,7 +4088,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
String input = IOUtils.toString(getClass().getResource("/r4/post1.xml"), StandardCharsets.UTF_8); String input = IOUtils.toString(getClass().getResource("/r4/post1.xml"), StandardCharsets.UTF_8);
Bundle request = myFhirContext.newXmlParser().parseResource(Bundle.class, input); Bundle request = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
Bundle response = mySystemDao.transaction(mySrd, request); Bundle response = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals(1, response.getEntry().size()); assertEquals(1, response.getEntry().size());
assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus()); assertEquals("201 Created", response.getEntry().get(0).getResponse().getStatus());
@ -4100,7 +4100,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
input = IOUtils.toString(getClass().getResource("/r4/post2.xml"), StandardCharsets.UTF_8); input = IOUtils.toString(getClass().getResource("/r4/post2.xml"), StandardCharsets.UTF_8);
request = myFhirContext.newXmlParser().parseResource(Bundle.class, input); request = myFhirContext.newXmlParser().parseResource(Bundle.class, input);
response = mySystemDao.transaction(mySrd, request); response = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals(1, response.getEntry().size()); assertEquals(1, response.getEntry().size());
assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus()); assertEquals("200 OK", response.getEntry().get(0).getResponse().getStatus());
@ -4109,7 +4109,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
assertEquals(id, id2); assertEquals(id, id2);
Patient patient = myPatientDao.read(new IdType(id), mySrd); Patient patient = myPatientDao.read(new IdType(id), mySrd);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals("Joshua", patient.getNameFirstRep().getGivenAsSingleString()); assertEquals("Joshua", patient.getNameFirstRep().getGivenAsSingleString());
} }
@ -4128,7 +4128,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
request.addEntry().setResource(o).getRequest().setMethod(HTTPVerb.POST); request.addEntry().setResource(o).getRequest().setMethod(HTTPVerb.POST);
Bundle resp = mySystemDao.transaction(mySrd, request); Bundle resp = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
String patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless().getValue(); String patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless().getValue();
assertThat(patientId, startsWith("Patient/")); assertThat(patientId, startsWith("Patient/"));
@ -4155,10 +4155,10 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
mo.setMedication(new Reference(medId)); mo.setMedication(new Reference(medId));
bundle.addEntry().setResource(mo).setFullUrl(mo.getIdElement().getValue()).getRequest().setMethod(HTTPVerb.POST); bundle.addEntry().setResource(mo).setFullUrl(mo.getIdElement().getValue()).getRequest().setMethod(HTTPVerb.POST);
ourLog.info("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
Bundle outcome = mySystemDao.transaction(mySrd, bundle); Bundle outcome = mySystemDao.transaction(mySrd, bundle);
ourLog.info("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
IdType medId1 = new IdType(outcome.getEntry().get(0).getResponse().getLocation()); IdType medId1 = new IdType(outcome.getEntry().get(0).getResponse().getLocation());
IdType medOrderId1 = new IdType(outcome.getEntry().get(1).getResponse().getLocation()); IdType medOrderId1 = new IdType(outcome.getEntry().get(1).getResponse().getLocation());
@ -4208,7 +4208,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
request.addEntry().setResource(o).getRequest().setMethod(HTTPVerb.POST); request.addEntry().setResource(o).getRequest().setMethod(HTTPVerb.POST);
Bundle resp = mySystemDao.transaction(mySrd, request); Bundle resp = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
String patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless().getValue(); String patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()).toUnqualifiedVersionless().getValue();
assertThat(patientId, startsWith("Patient/")); assertThat(patientId, startsWith("Patient/"));
@ -4242,7 +4242,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, res); Bundle resp = mySystemDao.transaction(mySrd, res);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue()); assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue());
assertEquals(3, resp.getEntry().size()); assertEquals(3, resp.getEntry().size());
@ -4385,7 +4385,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, res); Bundle resp = mySystemDao.transaction(mySrd, res);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue()); assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue());
assertEquals(3, resp.getEntry().size()); assertEquals(3, resp.getEntry().size());
@ -4621,7 +4621,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
Bundle resp = mySystemDao.transaction(mySrd, request); Bundle resp = mySystemDao.transaction(mySrd, request);
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
int expectedEntries = 2; int expectedEntries = 2;
assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue()); assertEquals(BundleType.TRANSACTIONRESPONSE, resp.getTypeElement().getValue());

View File

@ -670,7 +670,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test {
.setResource(p) .setResource(p)
.getRequest().setUrl("Patient").setMethod(Bundle.HTTPVerb.POST); .getRequest().setUrl("Patient").setMethod(Bundle.HTTPVerb.POST);
Bundle output = mySystemDao.transaction(mySrd, input); Bundle output = mySystemDao.transaction(mySrd, input);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
Long patientId = new IdType(output.getEntry().get(1).getResponse().getLocation()).getIdPartAsLong(); Long patientId = new IdType(output.getEntry().get(1).getResponse().getLocation()).getIdPartAsLong();
assertPersistedPartitionIdMatches(patientId); assertPersistedPartitionIdMatches(patientId);
@ -2760,7 +2760,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Bundle outcome = mySystemDao.transaction(mySrd, input.get()); Bundle outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(1, myCaptureQueriesListener.countSelectQueriesForCurrentThread());
assertThat(myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, false), containsString("resourcein0_.HASH_SYS_AND_VALUE='-4132452001562191669' and (resourcein0_.PARTITION_ID in ('1'))")); assertThat(myCaptureQueriesListener.getSelectQueriesForCurrentThread().get(0).getSql(true, false), containsString("resourcein0_.HASH_SYS_AND_VALUE='-4132452001562191669' and (resourcein0_.PARTITION_ID in ('1'))"));
@ -2776,7 +2776,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertEquals(8, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(8, myCaptureQueriesListener.countSelectQueriesForCurrentThread());
myCaptureQueriesListener.logInsertQueriesForCurrentThread(); myCaptureQueriesListener.logInsertQueriesForCurrentThread();
@ -2793,7 +2793,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertEquals(7, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(7, myCaptureQueriesListener.countSelectQueriesForCurrentThread());
myCaptureQueriesListener.logInsertQueriesForCurrentThread(); myCaptureQueriesListener.logInsertQueriesForCurrentThread();
@ -2808,7 +2808,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
outcome = mySystemDao.transaction(mySrd, input.get()); outcome = mySystemDao.transaction(mySrd, input.get());
ourLog.info("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug("Resp: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
myCaptureQueriesListener.logSelectQueriesForCurrentThread(); myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertEquals(6, myCaptureQueriesListener.countSelectQueriesForCurrentThread()); assertEquals(6, myCaptureQueriesListener.countSelectQueriesForCurrentThread());
myCaptureQueriesListener.logInsertQueriesForCurrentThread(); myCaptureQueriesListener.logInsertQueriesForCurrentThread();

View File

@ -160,7 +160,7 @@ public class CascadingDeleteInterceptorTest extends BaseResourceProviderR4Test {
fail(); fail();
} catch (ResourceVersionConflictException e) { } catch (ResourceVersionConflictException e) {
// good // good
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
} }
} }

View File

@ -152,7 +152,7 @@ public class NpmR4Test extends BaseJpaR4Test {
ourLog.info("**************************************************************************"); ourLog.info("**************************************************************************");
ourLog.info("**************************************************************************"); ourLog.info("**************************************************************************");
ourLog.info("Res " + i); ourLog.info("Res " + i);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resources.get(i))); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resources.get(i)));
} }
}); });

View File

@ -75,7 +75,7 @@ public class PartitionManagementProviderTest {
when(myPartitionConfigSvc.createPartition(any(), any())).thenAnswer(createAnswer()); when(myPartitionConfigSvc.createPartition(any(), any())).thenAnswer(createAnswer());
Parameters input = createInputPartition(); Parameters input = createInputPartition();
ourLog.info("Input:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug("Input:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
Parameters response = myClient Parameters response = myClient
.operation() .operation()
@ -85,7 +85,7 @@ public class PartitionManagementProviderTest {
.encodedXml() .encodedXml()
.execute(); .execute();
ourLog.info("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
verify(myPartitionConfigSvc, times(1)).createPartition(any(), any()); verify(myPartitionConfigSvc, times(1)).createPartition(any(), any());
verifyNoMoreInteractions(myPartitionConfigSvc); verifyNoMoreInteractions(myPartitionConfigSvc);
@ -137,7 +137,7 @@ public class PartitionManagementProviderTest {
.encodedXml() .encodedXml()
.execute(); .execute();
ourLog.info("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
verify(myPartitionConfigSvc, times(1)).getPartitionById(any()); verify(myPartitionConfigSvc, times(1)).getPartitionById(any());
verifyNoMoreInteractions(myPartitionConfigSvc); verifyNoMoreInteractions(myPartitionConfigSvc);
@ -168,7 +168,7 @@ public class PartitionManagementProviderTest {
when(myPartitionConfigSvc.updatePartition(any())).thenAnswer(createAnswer()); when(myPartitionConfigSvc.updatePartition(any())).thenAnswer(createAnswer());
Parameters input = createInputPartition(); Parameters input = createInputPartition();
ourLog.info("Input:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug("Input:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
Parameters response = myClient Parameters response = myClient
.operation() .operation()
@ -178,7 +178,7 @@ public class PartitionManagementProviderTest {
.encodedXml() .encodedXml()
.execute(); .execute();
ourLog.info("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
verify(myPartitionConfigSvc, times(1)).updatePartition(any()); verify(myPartitionConfigSvc, times(1)).updatePartition(any());
verifyNoMoreInteractions(myPartitionConfigSvc); verifyNoMoreInteractions(myPartitionConfigSvc);
@ -208,7 +208,7 @@ public class PartitionManagementProviderTest {
public void testDeletePartition() { public void testDeletePartition() {
Parameters input = new Parameters(); Parameters input = new Parameters();
input.addParameter(ProviderConstants.PARTITION_MANAGEMENT_PARTITION_ID, new IntegerType(123)); input.addParameter(ProviderConstants.PARTITION_MANAGEMENT_PARTITION_ID, new IntegerType(123));
ourLog.info("Input:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug("Input:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
Parameters response = myClient Parameters response = myClient
.operation() .operation()
@ -218,7 +218,7 @@ public class PartitionManagementProviderTest {
.encodedXml() .encodedXml()
.execute(); .execute();
ourLog.info("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
verify(myPartitionConfigSvc, times(1)).deletePartition(eq(123)); verify(myPartitionConfigSvc, times(1)).deletePartition(eq(123));
verifyNoMoreInteractions(myPartitionConfigSvc); verifyNoMoreInteractions(myPartitionConfigSvc);
} }
@ -266,7 +266,7 @@ public class PartitionManagementProviderTest {
.encodedXml() .encodedXml()
.execute(); .execute();
ourLog.info("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug("Response:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
verify(myPartitionConfigSvc, times(1)).listPartitions(); verify(myPartitionConfigSvc, times(1)).listPartitions();
verifyNoMoreInteractions(myPartitionConfigSvc); verifyNoMoreInteractions(myPartitionConfigSvc);

View File

@ -267,7 +267,7 @@ public class FhirPatchApplyR4Test {
svc.apply(patient, patch); svc.apply(patient, patch);
ourLog.info("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
assertEquals("{\"resourceType\":\"Questionnaire\",\"item\":[{\"linkId\":\"1\",\"code\":[{\"system\":\"https://smilecdr.com/fhir/document-type\",\"code\":\"CLINICAL\"}],\"text\":\"Test item\"},{\"linkId\":\"2\",\"code\":[{\"system\":\"http://smilecdr.com/fhir/document-type\",\"code\":\"ADMIN\"}],\"text\":\"Test Item 2\"}]}", ourCtx.newJsonParser().encodeResourceToString(patient)); assertEquals("{\"resourceType\":\"Questionnaire\",\"item\":[{\"linkId\":\"1\",\"code\":[{\"system\":\"https://smilecdr.com/fhir/document-type\",\"code\":\"CLINICAL\"}],\"text\":\"Test item\"},{\"linkId\":\"2\",\"code\":[{\"system\":\"http://smilecdr.com/fhir/document-type\",\"code\":\"ADMIN\"}],\"text\":\"Test Item 2\"}]}", ourCtx.newJsonParser().encodeResourceToString(patient));
} }
@ -286,7 +286,7 @@ public class FhirPatchApplyR4Test {
//When: We apply the patch //When: We apply the patch
svc.apply(patient, patch); svc.apply(patient, patch);
ourLog.info("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
//Then: New identifier is added, and does not overwrite. //Then: New identifier is added, and does not overwrite.
assertThat(patient.getIdentifier(), hasSize(2)); assertThat(patient.getIdentifier(), hasSize(2));
@ -308,7 +308,7 @@ public class FhirPatchApplyR4Test {
//When: We apply the patch //When: We apply the patch
svc.apply(patient, patch); svc.apply(patient, patch);
ourLog.info("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
//Then: it applies the new identifier correctly. //Then: it applies the new identifier correctly.
assertThat(patient.getIdentifier(), hasSize(1)); assertThat(patient.getIdentifier(), hasSize(1));
@ -329,7 +329,7 @@ public class FhirPatchApplyR4Test {
//When: We apply the patch //When: We apply the patch
svc.apply(patient, patch); svc.apply(patient, patch);
ourLog.info("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
//Then: it applies the new identifier correctly. //Then: it applies the new identifier correctly.
assertThat(patient.getIdentifier(), hasSize(1)); assertThat(patient.getIdentifier(), hasSize(1));
@ -351,7 +351,7 @@ public class FhirPatchApplyR4Test {
//When: We apply the patch //When: We apply the patch
svc.apply(patient, patch); svc.apply(patient, patch);
ourLog.info("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug("Outcome:\n{}", ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
//TODO THIS SHOULD THROW AN EXCEPTION. you cannot `add` to a field that is already set. //TODO THIS SHOULD THROW AN EXCEPTION. you cannot `add` to a field that is already set.
} }

View File

@ -34,7 +34,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(2, diff.getParameter().size()); assertEquals(2, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -59,7 +59,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -81,7 +81,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -103,7 +103,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("insert", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("insert", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -127,7 +127,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("delete", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("delete", extractPartValuePrimitive(diff, 0, "operation", "type"));
assertEquals("Patient.active.extension[0]", extractPartValuePrimitive(diff, 0, "operation", "path")); assertEquals("Patient.active.extension[0]", extractPartValuePrimitive(diff, 0, "operation", "path"));
@ -148,7 +148,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
assertEquals("Patient.active.extension[0].value", extractPartValuePrimitive(diff, 0, "operation", "path")); assertEquals("Patient.active.extension[0].value", extractPartValuePrimitive(diff, 0, "operation", "path"));
@ -170,7 +170,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("insert", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("insert", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -194,7 +194,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("delete", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("delete", extractPartValuePrimitive(diff, 0, "operation", "type"));
assertEquals("Patient.name[0].extension[0]", extractPartValuePrimitive(diff, 0, "operation", "path")); assertEquals("Patient.name[0].extension[0]", extractPartValuePrimitive(diff, 0, "operation", "path"));
@ -215,7 +215,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
assertEquals("Patient.name[0].extension[0].value", extractPartValuePrimitive(diff, 0, "operation", "path")); assertEquals("Patient.name[0].extension[0].value", extractPartValuePrimitive(diff, 0, "operation", "path"));
@ -239,7 +239,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(2, diff.getParameter().size()); assertEquals(2, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
assertEquals("Patient.id", extractPartValuePrimitive(diff, 0, "operation", "path")); assertEquals("Patient.id", extractPartValuePrimitive(diff, 0, "operation", "path"));
@ -266,7 +266,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
assertEquals("Patient.meta.versionId", extractPartValuePrimitive(diff, 0, "operation", "path")); assertEquals("Patient.meta.versionId", extractPartValuePrimitive(diff, 0, "operation", "path"));
@ -288,7 +288,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
assertEquals("Patient.text.div", extractPartValuePrimitive(diff, 0, "operation", "path")); assertEquals("Patient.text.div", extractPartValuePrimitive(diff, 0, "operation", "path"));
@ -309,7 +309,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("insert", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("insert", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -331,7 +331,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(2, diff.getParameter().size()); assertEquals(2, diff.getParameter().size());
assertEquals("insert", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("insert", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -359,7 +359,7 @@ public class FhirPatchDiffR4Test {
svc.addIgnorePath("Patient.meta"); svc.addIgnorePath("Patient.meta");
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -381,7 +381,7 @@ public class FhirPatchDiffR4Test {
svc.addIgnorePath("*.meta"); svc.addIgnorePath("*.meta");
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -403,7 +403,7 @@ public class FhirPatchDiffR4Test {
svc.addIgnorePath("Patient.meta.source"); svc.addIgnorePath("Patient.meta.source");
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -425,7 +425,7 @@ public class FhirPatchDiffR4Test {
svc.addIgnorePath("*.id"); svc.addIgnorePath("*.id");
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("replace", extractPartValuePrimitive(diff, 0, "operation", "type"));
@ -445,7 +445,7 @@ public class FhirPatchDiffR4Test {
FhirPatch svc = new FhirPatch(ourCtx); FhirPatch svc = new FhirPatch(ourCtx);
Parameters diff = (Parameters) svc.diff(oldValue, newValue); Parameters diff = (Parameters) svc.diff(oldValue, newValue);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
assertEquals("delete", extractPartValuePrimitive(diff, 0, "operation", "type")); assertEquals("delete", extractPartValuePrimitive(diff, 0, "operation", "type"));

View File

@ -243,7 +243,7 @@ public class AuthorizationInterceptorJpaR4Test extends BaseResourceProviderR4Tes
.setMethod(Bundle.HTTPVerb.POST) .setMethod(Bundle.HTTPVerb.POST)
.setIfNoneExist("Patient?identifier=http://uhn.ca/mrns|100"); .setIfNoneExist("Patient?identifier=http://uhn.ca/mrns|100");
Bundle response = myClient.transaction().withBundle(request).execute(); Bundle response = myClient.transaction().withBundle(request).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
// Subsequent calls also shouldn't fail // Subsequent calls also shouldn't fail
myClient.transaction().withBundle(request).execute(); myClient.transaction().withBundle(request).execute();
@ -1004,7 +1004,7 @@ public class AuthorizationInterceptorJpaR4Test extends BaseResourceProviderR4Tes
.withBundle(bundle) .withBundle(bundle)
.withAdditionalHeader(Constants.HEADER_PREFER, "return=" + Constants.HEADER_PREFER_RETURN_MINIMAL) .withAdditionalHeader(Constants.HEADER_PREFER, "return=" + Constants.HEADER_PREFER_RETURN_MINIMAL)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertNull(resp.getEntry().get(0).getResource()); assertNull(resp.getEntry().get(0).getResource());
// return=OperationOutcome - should succeed // return=OperationOutcome - should succeed
@ -1013,7 +1013,7 @@ public class AuthorizationInterceptorJpaR4Test extends BaseResourceProviderR4Tes
.withBundle(bundle) .withBundle(bundle)
.withAdditionalHeader(Constants.HEADER_PREFER, "return=" + Constants.HEADER_PREFER_RETURN_OPERATION_OUTCOME) .withAdditionalHeader(Constants.HEADER_PREFER, "return=" + Constants.HEADER_PREFER_RETURN_OPERATION_OUTCOME)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertNull(resp.getEntry().get(0).getResource()); assertNull(resp.getEntry().get(0).getResource());
// return=Representation - should fail // return=Representation - should fail
@ -1117,7 +1117,7 @@ public class AuthorizationInterceptorJpaR4Test extends BaseResourceProviderR4Tes
.withAdditionalHeader(Constants.HEADER_PREFER, "return=" + Constants.HEADER_PREFER_RETURN_MINIMAL) .withAdditionalHeader(Constants.HEADER_PREFER, "return=" + Constants.HEADER_PREFER_RETURN_MINIMAL)
.execute(); .execute();
assertEquals(3, resp.getEntry().size()); assertEquals(3, resp.getEntry().size());
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
} }

View File

@ -203,7 +203,7 @@ public class AuthorizationInterceptorMultitenantJpaR4Test extends BaseMultitenan
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.count(3) .count(3)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).setEncodeElements(Sets.newHashSet("Bundle.link")).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).setEncodeElements(Sets.newHashSet("Bundle.link")).encodeResourceToString(bundle));
assertThat(toUnqualifiedVersionlessIds(bundle).toString(), toUnqualifiedVersionlessIds(bundle), contains(observationIds.get(0), observationIds.get(1), observationIds.get(2), patientIdA)); assertThat(toUnqualifiedVersionlessIds(bundle).toString(), toUnqualifiedVersionlessIds(bundle), contains(observationIds.get(0), observationIds.get(1), observationIds.get(2), patientIdA));
// Fetch the next 3 // Fetch the next 3
@ -211,7 +211,7 @@ public class AuthorizationInterceptorMultitenantJpaR4Test extends BaseMultitenan
.loadPage() .loadPage()
.next(bundle) .next(bundle)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).setEncodeElements(Sets.newHashSet("Bundle.link")).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).setEncodeElements(Sets.newHashSet("Bundle.link")).encodeResourceToString(bundle));
assertThat(toUnqualifiedVersionlessIds(bundle).toString(), toUnqualifiedVersionlessIds(bundle), contains(observationIds.get(3), observationIds.get(4), observationIds.get(5), patientIdA)); assertThat(toUnqualifiedVersionlessIds(bundle).toString(), toUnqualifiedVersionlessIds(bundle), contains(observationIds.get(3), observationIds.get(4), observationIds.get(5), patientIdA));
// Fetch the next 3 - This should fail as the last observation has a cross-partition reference // Fetch the next 3 - This should fail as the last observation has a cross-partition reference

View File

@ -417,7 +417,7 @@ public class BinaryAccessProviderR4Test extends BaseResourceProviderR4Test {
Binary binary = new Binary(); Binary binary = new Binary();
binary.setContentType("image/png"); binary.setContentType("image/png");
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(binary)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(binary));
IIdType id = myClient.create().resource(binary).execute().getId().toUnqualifiedVersionless(); IIdType id = myClient.create().resource(binary).execute().getId().toUnqualifiedVersionless();
@ -488,7 +488,7 @@ public class BinaryAccessProviderR4Test extends BaseResourceProviderR4Test {
Binary binary = new Binary(); Binary binary = new Binary();
binary.setContentType("image/png"); binary.setContentType("image/png");
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(binary)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(binary));
IIdType id = myClient.create().resource(binary).execute().getId().toUnqualifiedVersionless(); IIdType id = myClient.create().resource(binary).execute().getId().toUnqualifiedVersionless();
@ -626,7 +626,7 @@ public class BinaryAccessProviderR4Test extends BaseResourceProviderR4Test {
attachment.setData(SOME_BYTES_2); attachment.setData(SOME_BYTES_2);
} }
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(documentReference)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(documentReference));
return myClient.create().resource(documentReference).execute().getId().toUnqualifiedVersionless(); return myClient.create().resource(documentReference).execute().getId().toUnqualifiedVersionless();
} }

View File

@ -41,7 +41,7 @@ public class DiffProviderR4Test extends BaseResourceProviderR4Test {
.useHttpGet() .useHttpGet()
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(2, diff.getParameter().size()); assertEquals(2, diff.getParameter().size());
@ -72,7 +72,7 @@ public class DiffProviderR4Test extends BaseResourceProviderR4Test {
.useHttpGet() .useHttpGet()
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(4, diff.getParameter().size()); assertEquals(4, diff.getParameter().size());
@ -115,7 +115,7 @@ public class DiffProviderR4Test extends BaseResourceProviderR4Test {
.withParameter(Parameters.class, ProviderConstants.DIFF_INCLUDE_META_PARAMETER, new BooleanType(true)) .withParameter(Parameters.class, ProviderConstants.DIFF_INCLUDE_META_PARAMETER, new BooleanType(true))
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(5, diff.getParameter().size()); assertEquals(5, diff.getParameter().size());
@ -139,7 +139,7 @@ public class DiffProviderR4Test extends BaseResourceProviderR4Test {
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(1, diff.getParameter().size()); assertEquals(1, diff.getParameter().size());
@ -165,7 +165,7 @@ public class DiffProviderR4Test extends BaseResourceProviderR4Test {
.andParameter(ProviderConstants.DIFF_INCLUDE_META_PARAMETER, new BooleanType(true)) .andParameter(ProviderConstants.DIFF_INCLUDE_META_PARAMETER, new BooleanType(true))
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(5, diff.getParameter().size()); assertEquals(5, diff.getParameter().size());
@ -192,7 +192,7 @@ public class DiffProviderR4Test extends BaseResourceProviderR4Test {
.andParameter(ProviderConstants.DIFF_INCLUDE_META_PARAMETER, new BooleanType(true)) .andParameter(ProviderConstants.DIFF_INCLUDE_META_PARAMETER, new BooleanType(true))
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(3, diff.getParameter().size()); assertEquals(3, diff.getParameter().size());
@ -221,7 +221,7 @@ public class DiffProviderR4Test extends BaseResourceProviderR4Test {
.andParameter(ProviderConstants.DIFF_INCLUDE_META_PARAMETER, new BooleanType(true)) .andParameter(ProviderConstants.DIFF_INCLUDE_META_PARAMETER, new BooleanType(true))
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(diff));
assertEquals(3, diff.getParameter().size()); assertEquals(3, diff.getParameter().size());

View File

@ -97,7 +97,7 @@ public class MultitenantBatchOperationR4Test extends BaseMultitenantResourceProv
.withParameters(input) .withParameters(input)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
String jobId = BatchHelperR4.jobIdFromBatch2Parameters(response); String jobId = BatchHelperR4.jobIdFromBatch2Parameters(response);
myBatch2JobHelper.awaitJobCompletion(jobId); myBatch2JobHelper.awaitJobCompletion(jobId);
@ -151,7 +151,7 @@ public class MultitenantBatchOperationR4Test extends BaseMultitenantResourceProv
.named(ProviderConstants.OPERATION_REINDEX) .named(ProviderConstants.OPERATION_REINDEX)
.withParameters(input) .withParameters(input)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
StringType jobId = (StringType) response.getParameterValue(ProviderConstants.OPERATION_REINDEX_RESPONSE_JOB_ID); StringType jobId = (StringType) response.getParameterValue(ProviderConstants.OPERATION_REINDEX_RESPONSE_JOB_ID);
myBatch2JobHelper.awaitJobCompletion(jobId.getValue()); myBatch2JobHelper.awaitJobCompletion(jobId.getValue());
@ -175,7 +175,7 @@ public class MultitenantBatchOperationR4Test extends BaseMultitenantResourceProv
.named(ProviderConstants.OPERATION_REINDEX) .named(ProviderConstants.OPERATION_REINDEX)
.withParameters(input) .withParameters(input)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
jobId = (StringType) response.getParameterValue(ProviderConstants.OPERATION_REINDEX_RESPONSE_JOB_ID); jobId = (StringType) response.getParameterValue(ProviderConstants.OPERATION_REINDEX_RESPONSE_JOB_ID);
myBatch2JobHelper.awaitJobCompletion(jobId.getValue()); myBatch2JobHelper.awaitJobCompletion(jobId.getValue());
@ -208,7 +208,7 @@ public class MultitenantBatchOperationR4Test extends BaseMultitenantResourceProv
Parameters input = new Parameters(); Parameters input = new Parameters();
input.addParameter(ProviderConstants.OPERATION_REINDEX_PARAM_URL, "Observation?status=final"); input.addParameter(ProviderConstants.OPERATION_REINDEX_PARAM_URL, "Observation?status=final");
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
// Reindex Tenant A by query url // Reindex Tenant A by query url
myTenantClientInterceptor.setTenantId(TENANT_A); myTenantClientInterceptor.setTenantId(TENANT_A);
@ -218,7 +218,7 @@ public class MultitenantBatchOperationR4Test extends BaseMultitenantResourceProv
.named(ProviderConstants.OPERATION_REINDEX) .named(ProviderConstants.OPERATION_REINDEX)
.withParameters(input) .withParameters(input)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
StringType jobId = (StringType) response.getParameterValue(ProviderConstants.OPERATION_REINDEX_RESPONSE_JOB_ID); StringType jobId = (StringType) response.getParameterValue(ProviderConstants.OPERATION_REINDEX_RESPONSE_JOB_ID);
myBatch2JobHelper.awaitJobCompletion(jobId.getValue()); myBatch2JobHelper.awaitJobCompletion(jobId.getValue());

View File

@ -309,7 +309,7 @@ public class ResourceProviderCustomSearchParamR4Test extends BaseResourceProvide
eyeColourSp.setXpathUsage(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL); eyeColourSp.setXpathUsage(org.hl7.fhir.r4.model.SearchParameter.XPathUsageType.NORMAL);
eyeColourSp.setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE); eyeColourSp.setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE);
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(eyeColourSp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(eyeColourSp));
myClient myClient
.create() .create()
@ -323,7 +323,7 @@ public class ResourceProviderCustomSearchParamR4Test extends BaseResourceProvide
p1.addExtension().setUrl("http://acme.org/eyecolour").setValue(new CodeType("blue")); p1.addExtension().setUrl("http://acme.org/eyecolour").setValue(new CodeType("blue"));
IIdType p1id = myPatientDao.create(p1).getId().toUnqualifiedVersionless(); IIdType p1id = myPatientDao.create(p1).getId().toUnqualifiedVersionless();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(p1)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(p1));
Patient p2 = new Patient(); Patient p2 = new Patient();
p2.setActive(true); p2.setActive(true);
@ -337,7 +337,7 @@ public class ResourceProviderCustomSearchParamR4Test extends BaseResourceProvide
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
List<String> foundResources = toUnqualifiedVersionlessIdValues(bundle); List<String> foundResources = toUnqualifiedVersionlessIdValues(bundle);
assertThat(foundResources, contains(p1id.getValue())); assertThat(foundResources, contains(p1id.getValue()));

View File

@ -149,7 +149,7 @@ public class ResourceProviderExpungeR4Test extends BaseResourceProviderR4Test {
.setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS) .setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS)
.setValue(new BooleanType(true)); .setValue(new BooleanType(true));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
Parameters output = myClient Parameters output = myClient
.operation() .operation()
@ -222,7 +222,7 @@ public class ResourceProviderExpungeR4Test extends BaseResourceProviderR4Test {
.setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_EVERYTHING) .setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_EVERYTHING)
.setValue(new BooleanType(true)); .setValue(new BooleanType(true));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
Parameters output = myClient Parameters output = myClient
.operation() .operation()
@ -261,7 +261,7 @@ public class ResourceProviderExpungeR4Test extends BaseResourceProviderR4Test {
.setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS) .setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS)
.setValue(new BooleanType(true)); .setValue(new BooleanType(true));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
Parameters output = myClient Parameters output = myClient
.operation() .operation()
@ -307,7 +307,7 @@ public class ResourceProviderExpungeR4Test extends BaseResourceProviderR4Test {
.setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS) .setName(ProviderConstants.OPERATION_EXPUNGE_PARAM_EXPUNGE_PREVIOUS_VERSIONS)
.setValue(new BooleanType(true)); .setValue(new BooleanType(true));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
Parameters output = myClient Parameters output = myClient
.operation() .operation()

View File

@ -108,7 +108,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
obs.setDevice(new Reference(devId)); obs.setDevice(new Reference(devId));
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
@ -160,7 +160,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myEncounterDao.create(encounter, mySrd); myEncounterDao.create(encounter, mySrd);
ourLog.info("Encounter: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Encounter: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
} }
String uri = myServerBase + "/Patient?_has:Encounter:subject:class=" + UrlUtil.escapeUrlParam("urn:system|IMP") + "&_has:Encounter:subject:date=gt1950"; String uri = myServerBase + "/Patient?_has:Encounter:subject:class=" + UrlUtil.escapeUrlParam("urn:system|IMP") + "&_has:Encounter:subject:date=gt1950";
@ -196,7 +196,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
cc.addCoding().setCode("2345-7").setSystem("http://loinc.org"); cc.addCoding().setCode("2345-7").setSystem("http://loinc.org");
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
Device device = new Device(); Device device = new Device();
@ -217,7 +217,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
encounter.setSubject(new Reference(pid0)); encounter.setSubject(new Reference(pid0));
myEncounterDao.create(encounter, mySrd); myEncounterDao.create(encounter, mySrd);
ourLog.info("Encounter: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Encounter: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
} }
String uri = myServerBase + "/Patient?_has:Observation:patient:code=http://" + UrlUtil.escapeUrlParam("loinc.org|2345-7") + "&_has:Encounter:subject:date=gt1950"; String uri = myServerBase + "/Patient?_has:Observation:patient:code=http://" + UrlUtil.escapeUrlParam("loinc.org|2345-7") + "&_has:Encounter:subject:date=gt1950";
@ -256,7 +256,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
Device device = new Device(); Device device = new Device();
@ -304,7 +304,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
Device device = new Device(); Device device = new Device();
@ -360,7 +360,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
Device device = new Device(); Device device = new Device();
@ -406,7 +406,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -420,7 +420,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
Device device = new Device(); Device device = new Device();
@ -468,7 +468,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
Device device = new Device(); Device device = new Device();
@ -515,7 +515,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
Device device = new Device(); Device device = new Device();
@ -565,7 +565,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
Device device = new Device(); Device device = new Device();
@ -586,7 +586,7 @@ public class ResourceProviderHasParamR4Test extends BaseResourceProviderR4Test {
encounter.setSubject(new Reference(pid0)); encounter.setSubject(new Reference(pid0));
myEncounterDao.create(encounter, mySrd); myEncounterDao.create(encounter, mySrd);
ourLog.info("Encounter: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Encounter: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
} }
String uri = myServerBase + "/Patient?_has:Observation:subject:code-value-quantity=http://" + UrlUtil.escapeUrlParam("loinc.org|2345-7$gt180") + "&_has:Encounter:subject:date=gt1950" + "&_has:Encounter:subject:class=" + UrlUtil.escapeUrlParam("urn:system|IMP"); String uri = myServerBase + "/Patient?_has:Observation:subject:code-value-quantity=http://" + UrlUtil.escapeUrlParam("loinc.org|2345-7$gt180") + "&_has:Encounter:subject:date=gt1950" + "&_has:Encounter:subject:class=" + UrlUtil.escapeUrlParam("urn:system|IMP");

View File

@ -56,7 +56,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateAsCreate", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateAsCreate", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_AS_CREATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_AS_CREATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -71,7 +71,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdate", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdate", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -85,7 +85,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Initial create: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Initial create: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateNoChange", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateNoChange", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -97,7 +97,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.resourceById("Patient", "A") .resourceById("Patient", "A")
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Delete: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Delete: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulDeletes", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulDeletes", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -109,7 +109,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.resourceById("Patient", "A") .resourceById("Patient", "A")
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Delete: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Delete: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("deleteResourceAlreadyDeleted")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("deleteResourceAlreadyDeleted"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE_ALREADY_DELETED.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE_ALREADY_DELETED.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -132,7 +132,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Initial create: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Initial create: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateAsCreate", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateAsCreate", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_AS_CREATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_AS_CREATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -150,7 +150,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdate")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdate"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -167,7 +167,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateNoChange")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateNoChange"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -183,7 +183,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulDeletes", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulDeletes", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -199,7 +199,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("deleteResourceAlreadyDeleted")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("deleteResourceAlreadyDeleted"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE_ALREADY_DELETED.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE_ALREADY_DELETED.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -221,7 +221,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulCreate", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulCreate", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CREATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CREATE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -244,7 +244,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), assertThat(oo.getIssueFirstRep().getDiagnostics(),
matchesPattern("Successfully conditionally created resource \".*\". No existing resources matched URL \"Patient\\?active=true\". Took [0-9]+ms.")); matchesPattern("Successfully conditionally created resource \".*\". No existing resources matched URL \"Patient\\?active=true\". Took [0-9]+ms."));
@ -269,7 +269,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulCreateConditionalWithMatch")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulCreateConditionalWithMatch"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CREATE_WITH_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CREATE_WITH_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -289,7 +289,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalNoMatch", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalNoMatch", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_NO_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_NO_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -311,7 +311,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalWithMatch", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalWithMatch", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_WITH_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_WITH_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -332,7 +332,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalNoChangeWithMatch", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalNoChangeWithMatch", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_WITH_CONDITIONAL_MATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_WITH_CONDITIONAL_MATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -353,7 +353,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalNoMatch", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalNoMatch", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_NO_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_NO_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -378,7 +378,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalWithMatch")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalWithMatch"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_WITH_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_WITH_CONDITIONAL_MATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -402,7 +402,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Create {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalNoChangeWithMatch")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulUpdateConditionalNoChangeWithMatch"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_WITH_CONDITIONAL_MATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_UPDATE_WITH_CONDITIONAL_MATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
@ -423,7 +423,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatch", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatch", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_PATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_PATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -443,7 +443,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchNoChange", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchNoChange", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_PATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_PATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -464,7 +464,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchConditional", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchConditional", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CONDITIONAL_PATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CONDITIONAL_PATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -484,7 +484,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.prefer(PreferReturnEnum.OPERATION_OUTCOME) .prefer(PreferReturnEnum.OPERATION_OUTCOME)
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchConditionalNoChange", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchConditionalNoChange", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CONDITIONAL_PATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CONDITIONAL_PATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -506,7 +506,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.withBundle((Bundle)bb.getBundle()) .withBundle((Bundle)bb.getBundle())
.execute(); .execute();
OperationOutcome oo = (OperationOutcome) response.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(0).getResponse().getOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatch")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatch"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_PATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_PATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -527,7 +527,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.withBundle((Bundle)bb.getBundle()) .withBundle((Bundle)bb.getBundle())
.execute(); .execute();
OperationOutcome oo = (OperationOutcome) response.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(0).getResponse().getOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchNoChange")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchNoChange"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_PATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_PATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -549,7 +549,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.withBundle((Bundle)bb.getBundle()) .withBundle((Bundle)bb.getBundle())
.execute(); .execute();
OperationOutcome oo = (OperationOutcome) response.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(0).getResponse().getOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchConditional")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchConditional"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CONDITIONAL_PATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CONDITIONAL_PATCH.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -570,7 +570,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.withBundle((Bundle)bb.getBundle()) .withBundle((Bundle)bb.getBundle())
.execute(); .execute();
OperationOutcome oo = (OperationOutcome) response.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) response.getEntry().get(0).getResponse().getOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchConditionalNoChange")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulPatchConditionalNoChange"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CONDITIONAL_PATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_CONDITIONAL_PATCH_NO_CHANGE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -584,7 +584,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.resourceConditionalByUrl("Patient?active=true") .resourceConditionalByUrl("Patient?active=true")
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("unableToDeleteNotFound")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("unableToDeleteNotFound"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE_NOT_FOUND.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE_NOT_FOUND.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -603,7 +603,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.resourceConditionalByUrl("Patient?active=true") .resourceConditionalByUrl("Patient?active=true")
.execute() .execute()
.getOperationOutcome(); .getOperationOutcome();
ourLog.info("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo)); ourLog.debug("Update: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulDeletes", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulDeletes", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());
assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem()); assertEquals(StorageResponseCodeEnum.SYSTEM, oo.getIssueFirstRep().getDetails().getCodingFirstRep().getSystem());
@ -624,7 +624,7 @@ public class ResourceProviderMeaningfulOutcomeMessageR4Test extends BaseResource
.transaction() .transaction()
.withBundle(input) .withBundle(input)
.execute(); .execute();
ourLog.info("Delete {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug("Delete {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome(); OperationOutcome oo = (OperationOutcome) output.getEntry().get(0).getResponse().getOutcome();
assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulDeletes", "successfulTimingSuffix")); assertThat(oo.getIssueFirstRep().getDiagnostics(), matchesHapiMessage("successfulDeletes", "successfulTimingSuffix"));
assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode()); assertEquals(StorageResponseCodeEnum.SUCCESSFUL_DELETE.name(), oo.getIssueFirstRep().getDetails().getCodingFirstRep().getCode());

View File

@ -69,7 +69,7 @@ public class ResourceProviderR4BundleTest extends BaseResourceProviderR4Test {
Bundle retBundle = myClient.read().resource(Bundle.class).withId(id).execute(); Bundle retBundle = myClient.read().resource(Bundle.class).withId(id).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(retBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(retBundle));
assertEquals("http://foo/", bundle.getEntry().get(0).getFullUrl()); assertEquals("http://foo/", bundle.getEntry().get(0).getFullUrl());
} }
@ -105,7 +105,7 @@ public class ResourceProviderR4BundleTest extends BaseResourceProviderR4Test {
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
//ourLog.info("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); //ourLog.debug("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(50, output.getEntry().size()); assertEquals(50, output.getEntry().size());
List<BundleEntryComponent> bundleEntries = output.getEntry(); List<BundleEntryComponent> bundleEntries = output.getEntry();
@ -149,7 +149,7 @@ public class ResourceProviderR4BundleTest extends BaseResourceProviderR4Test {
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
//ourLog.info("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); //ourLog.debug("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(50, output.getEntry().size()); assertEquals(50, output.getEntry().size());
List<BundleEntryComponent> bundleEntries = output.getEntry(); List<BundleEntryComponent> bundleEntries = output.getEntry();
@ -182,7 +182,7 @@ public class ResourceProviderR4BundleTest extends BaseResourceProviderR4Test {
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
//ourLog.info("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); //ourLog.debug("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(8, output.getEntry().size()); assertEquals(8, output.getEntry().size());
@ -248,11 +248,11 @@ public class ResourceProviderR4BundleTest extends BaseResourceProviderR4Test {
//7 //7
input.addEntry().getRequest().setMethod(HTTPVerb.GET).setUrl(ids.get(4)); input.addEntry().getRequest().setMethod(HTTPVerb.GET).setUrl(ids.get(4));
//ourLog.info("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input)); //ourLog.debug("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(input));
Bundle output = myClient.transaction().withBundle(input).execute(); Bundle output = myClient.transaction().withBundle(input).execute();
//ourLog.info("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); //ourLog.debug("Bundle: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(7, output.getEntry().size()); assertEquals(7, output.getEntry().size());

View File

@ -228,7 +228,7 @@ public class ResourceProviderR4CacheTest extends BaseResourceProviderR4Test {
assertEquals(resp1.getId(), resp2.getId()); assertEquals(resp1.getId(), resp2.getId());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp2)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp2));
assertEquals(1, resp2.getEntry().size()); assertEquals(1, resp2.getEntry().size());
} }

View File

@ -873,7 +873,7 @@ public class ResourceProviderR4CodeSystemTest extends BaseResourceProviderR4Test
Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute(); Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam));
assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue()); assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue());
assertEquals("Code v1 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString()); assertEquals("Code v1 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString());
@ -894,7 +894,7 @@ public class ResourceProviderR4CodeSystemTest extends BaseResourceProviderR4Test
Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute(); Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam));
assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue()); assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue());
assertEquals("Code v2 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString()); assertEquals("Code v2 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString());
@ -914,7 +914,7 @@ public class ResourceProviderR4CodeSystemTest extends BaseResourceProviderR4Test
Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute(); Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam));
assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue()); assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue());
assertEquals("Code v2 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString()); assertEquals("Code v2 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString());
@ -933,7 +933,7 @@ public class ResourceProviderR4CodeSystemTest extends BaseResourceProviderR4Test
Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute(); Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam));
assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue()); assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue());
assertEquals("Code v2 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString()); assertEquals("Code v2 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString());
@ -953,7 +953,7 @@ public class ResourceProviderR4CodeSystemTest extends BaseResourceProviderR4Test
Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute(); Parameters respParam = myClient.operation().onType(CodeSystem.class).named("validate-code").withParameters(inParams).execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParam));
assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue()); assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue());
assertEquals("Code v2 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString()); assertEquals("Code v2 display", ((StringType) respParam.getParameter().get(1).getValue()).getValueAsString());
@ -973,7 +973,7 @@ public class ResourceProviderR4CodeSystemTest extends BaseResourceProviderR4Test
CodeSystem.ConceptDefinitionComponent concept2 = codeSystem.addConcept(); CodeSystem.ConceptDefinitionComponent concept2 = codeSystem.addConcept();
concept2.setCode("2000").setDisplay("Code Dispaly 2000"); concept2.setCode("2000").setDisplay("Code Dispaly 2000");
ourLog.info("CodeSystem: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem)); ourLog.debug("CodeSystem: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem));
myCodeSystemDao.create(codeSystem, mySrd); myCodeSystemDao.create(codeSystem, mySrd);
} }

View File

@ -82,14 +82,14 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateByCodeSystemsAndSourceCodeOneToMany() { public void testTranslateByCodeSystemsAndSourceCodeOneToMany() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_3)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_3));
inParams.addParameter().setName("code").setValue(new CodeType("12345")); inParams.addParameter().setName("code").setValue(new CodeType("12345"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -98,7 +98,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -140,14 +140,14 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateByCodeSystemsAndSourceCodeOneToOne() { public void testTranslateByCodeSystemsAndSourceCodeOneToOne() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("12345")); inParams.addParameter().setName("code").setValue(new CodeType("12345"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -156,7 +156,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -186,7 +186,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateByCodeSystemsAndSourceCodeOneToOne_InBatchOperation() { public void testTranslateByCodeSystemsAndSourceCodeOneToOne_InBatchOperation() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.setType(Bundle.BundleType.BATCH); bundle.setType(Bundle.BundleType.BATCH);
@ -196,14 +196,14 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.setMethod(Bundle.HTTPVerb.GET) .setMethod(Bundle.HTTPVerb.GET)
.setUrl("ConceptMap/$translate?system=" + CS_URL + "&code=12345" + "&targetsystem=" + CS_URL_2); .setUrl("ConceptMap/$translate?system=" + CS_URL + "&code=12345" + "&targetsystem=" + CS_URL_2);
ourLog.info("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
Bundle respBundle = myClient Bundle respBundle = myClient
.transaction() .transaction()
.withBundle(bundle) .withBundle(bundle)
.execute(); .execute();
ourLog.info("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respBundle)); ourLog.debug("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respBundle));
assertEquals(1, respBundle.getEntry().size()); assertEquals(1, respBundle.getEntry().size());
Parameters respParams = (Parameters) respBundle.getEntry().get(0).getResource(); Parameters respParams = (Parameters) respBundle.getEntry().get(0).getResource();
@ -244,14 +244,14 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.setMethod(Bundle.HTTPVerb.GET) .setMethod(Bundle.HTTPVerb.GET)
.setUrl("ConceptMap/$translate?url=http://hl7.org/fhir/ConceptMap/CMapHie&system=http://fkcfhir.org/fhir/cs/FMCECCOrderAbbreviation&code=IMed_Janssen&targetsystem=http://fkcfhir.org/fhir/cs/FMCHIEOrderAbbreviation"); .setUrl("ConceptMap/$translate?url=http://hl7.org/fhir/ConceptMap/CMapHie&system=http://fkcfhir.org/fhir/cs/FMCECCOrderAbbreviation&code=IMed_Janssen&targetsystem=http://fkcfhir.org/fhir/cs/FMCHIEOrderAbbreviation");
ourLog.info("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Request:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
Bundle respBundle = myClient Bundle respBundle = myClient
.transaction() .transaction()
.withBundle(bundle) .withBundle(bundle)
.execute(); .execute();
ourLog.info("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respBundle)); ourLog.debug("Response:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respBundle));
assertEquals(1, respBundle.getEntry().size()); assertEquals(1, respBundle.getEntry().size());
Parameters respParams = (Parameters) respBundle.getEntry().get(0).getResource(); Parameters respParams = (Parameters) respBundle.getEntry().get(0).getResource();
@ -280,14 +280,14 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateByCodeSystemsAndSourceCodeUnmapped() { public void testTranslateByCodeSystemsAndSourceCodeUnmapped() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_3)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_3));
inParams.addParameter().setName("code").setValue(new CodeType("BOGUS")); inParams.addParameter().setName("code").setValue(new CodeType("BOGUS"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -296,7 +296,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertFalse(((BooleanType) param.getValue()).booleanValue()); assertFalse(((BooleanType) param.getValue()).booleanValue());
@ -311,7 +311,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithCodeOnly() { public void testTranslateUsingPredicatesWithCodeOnly() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -320,7 +320,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("code").setValue(new CodeType("12345")); inParams.addParameter().setName("code").setValue(new CodeType("12345"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -329,7 +329,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -386,7 +386,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesCoding() { public void testTranslateUsingPredicatesCoding() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -398,7 +398,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("coding").setValue( inParams.addParameter().setName("coding").setValue(
new Coding().setSystem(CS_URL).setCode("12345").setVersion("Version 1")); new Coding().setSystem(CS_URL).setCode("12345").setVersion("Version 1"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -407,7 +407,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -436,7 +436,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithCodeableConcept() { public void testTranslateUsingPredicatesWithCodeableConcept() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -451,7 +451,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("codeableConcept").setValue(codeableConcept); inParams.addParameter().setName("codeableConcept").setValue(codeableConcept);
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -460,7 +460,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -531,7 +531,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithSourceSystem() { public void testTranslateUsingPredicatesWithSourceSystem() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -542,7 +542,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("code").setValue(new CodeType("12345")); inParams.addParameter().setName("code").setValue(new CodeType("12345"));
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -551,7 +551,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -608,7 +608,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithSourceSystemAndVersion1() { public void testTranslateUsingPredicatesWithSourceSystemAndVersion1() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -621,7 +621,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
inParams.addParameter().setName("version").setValue(new StringType("Version 1")); inParams.addParameter().setName("version").setValue(new StringType("Version 1"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -630,7 +630,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -659,7 +659,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithSourceSystemAndVersion3() { public void testTranslateUsingPredicatesWithSourceSystemAndVersion3() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -672,7 +672,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
inParams.addParameter().setName("version").setValue(new StringType("Version 3")); inParams.addParameter().setName("version").setValue(new StringType("Version 3"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -681,7 +681,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -724,7 +724,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithSourceAndTargetSystem2() { public void testTranslateUsingPredicatesWithSourceAndTargetSystem2() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -737,7 +737,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -746,7 +746,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -775,7 +775,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithSourceAndTargetSystem3() { public void testTranslateUsingPredicatesWithSourceAndTargetSystem3() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -788,7 +788,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("system").setValue(new UriType(CS_URL)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL));
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_3)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_3));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -797,7 +797,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -840,7 +840,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithSourceValueSet() { public void testTranslateUsingPredicatesWithSourceValueSet() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -851,7 +851,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("code").setValue(new CodeType("12345")); inParams.addParameter().setName("code").setValue(new CodeType("12345"));
inParams.addParameter().setName("source").setValue(new UriType(VS_URL)); inParams.addParameter().setName("source").setValue(new UriType(VS_URL));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -860,7 +860,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -917,7 +917,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateUsingPredicatesWithTargetValueSet() { public void testTranslateUsingPredicatesWithTargetValueSet() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -928,7 +928,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("code").setValue(new CodeType("12345")); inParams.addParameter().setName("code").setValue(new CodeType("12345"));
inParams.addParameter().setName("target").setValue(new UriType(VS_URL_2)); inParams.addParameter().setName("target").setValue(new UriType(VS_URL_2));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -937,7 +937,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1009,7 +1009,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
IIdType conceptMapId1 = myConceptMapDao.create(conceptMap1, mySrd).getId().toUnqualifiedVersionless(); IIdType conceptMapId1 = myConceptMapDao.create(conceptMap1, mySrd).getId().toUnqualifiedVersionless();
conceptMap1 = myConceptMapDao.read(conceptMapId1); conceptMap1 = myConceptMapDao.read(conceptMapId1);
ourLog.info("ConceptMap: 2 \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap1)); ourLog.debug("ConceptMap: 2 \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap1));
//- conceptMap1 v2 //- conceptMap1 v2
ConceptMap conceptMap2 = new ConceptMap(); ConceptMap conceptMap2 = new ConceptMap();
@ -1027,7 +1027,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
IIdType conceptMapId2 = myConceptMapDao.create(conceptMap2, mySrd).getId().toUnqualifiedVersionless(); IIdType conceptMapId2 = myConceptMapDao.create(conceptMap2, mySrd).getId().toUnqualifiedVersionless();
conceptMap2 = myConceptMapDao.read(conceptMapId2); conceptMap2 = myConceptMapDao.read(conceptMapId2);
ourLog.info("ConceptMap: 2 \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap2)); ourLog.debug("ConceptMap: 2 \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap2));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
@ -1037,7 +1037,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
@ -1047,7 +1047,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -1078,12 +1078,12 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithInstance() { public void testTranslateWithInstance() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("code").setValue(new CodeType("12345")); inParams.addParameter().setName("code").setValue(new CodeType("12345"));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1092,7 +1092,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1149,7 +1149,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverse() { public void testTranslateWithReverse() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1164,7 +1164,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_4)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_4));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1173,7 +1173,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1202,7 +1202,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseByCodeSystemsAndSourceCodeUnmapped() { public void testTranslateWithReverseByCodeSystemsAndSourceCodeUnmapped() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("system").setValue(new UriType(CS_URL_3)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL_3));
@ -1210,7 +1210,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("code").setValue(new CodeType("BOGUS")); inParams.addParameter().setName("code").setValue(new CodeType("BOGUS"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1219,7 +1219,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertFalse(((BooleanType) param.getValue()).booleanValue()); assertFalse(((BooleanType) param.getValue()).booleanValue());
@ -1234,7 +1234,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesWithCodeOnly() { public void testTranslateWithReverseUsingPredicatesWithCodeOnly() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1245,7 +1245,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("code").setValue(new CodeType("34567")); inParams.addParameter().setName("code").setValue(new CodeType("34567"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1254,7 +1254,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1297,7 +1297,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesCoding() { public void testTranslateWithReverseUsingPredicatesCoding() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1311,7 +1311,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
new Coding().setSystem(CS_URL_2).setCode("34567").setVersion("Version 2")); new Coding().setSystem(CS_URL_2).setCode("34567").setVersion("Version 2"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1320,7 +1320,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1363,7 +1363,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesWithCodeableConcept() { public void testTranslateWithReverseUsingPredicatesWithCodeableConcept() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1381,7 +1381,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("codeableConcept").setValue(codeableConcept); inParams.addParameter().setName("codeableConcept").setValue(codeableConcept);
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1390,7 +1390,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1461,7 +1461,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesWithSourceSystem() { public void testTranslateWithReverseUsingPredicatesWithSourceSystem() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1474,7 +1474,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("system").setValue(new UriType(CS_URL_2)); inParams.addParameter().setName("system").setValue(new UriType(CS_URL_2));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1483,7 +1483,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1526,7 +1526,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesWithSourceSystemAndVersion() { public void testTranslateWithReverseUsingPredicatesWithSourceSystemAndVersion() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1541,7 +1541,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("version").setValue(new StringType("Version 2")); inParams.addParameter().setName("version").setValue(new StringType("Version 2"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1550,7 +1550,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1593,7 +1593,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesWithSourceAndTargetSystem1() { public void testTranslateWithReverseUsingPredicatesWithSourceAndTargetSystem1() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1608,7 +1608,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1617,7 +1617,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1646,7 +1646,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesWithSourceAndTargetSystem4() { public void testTranslateWithReverseUsingPredicatesWithSourceAndTargetSystem4() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1661,7 +1661,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_4)); inParams.addParameter().setName("targetsystem").setValue(new UriType(CS_URL_4));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1670,7 +1670,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1699,7 +1699,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesWithSourceValueSet() { public void testTranslateWithReverseUsingPredicatesWithSourceValueSet() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1712,7 +1712,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("source").setValue(new UriType(VS_URL_2)); inParams.addParameter().setName("source").setValue(new UriType(VS_URL_2));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1721,7 +1721,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1764,7 +1764,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseUsingPredicatesWithTargetValueSet() { public void testTranslateWithReverseUsingPredicatesWithTargetValueSet() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
/* /*
* Provided: * Provided:
@ -1777,7 +1777,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("target").setValue(new UriType(VS_URL)); inParams.addParameter().setName("target").setValue(new UriType(VS_URL));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1786,7 +1786,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1844,7 +1844,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
IIdType conceptMapId1 = myConceptMapDao.create(conceptMap1, mySrd).getId().toUnqualifiedVersionless(); IIdType conceptMapId1 = myConceptMapDao.create(conceptMap1, mySrd).getId().toUnqualifiedVersionless();
conceptMap1 = myConceptMapDao.read(conceptMapId1); conceptMap1 = myConceptMapDao.read(conceptMapId1);
ourLog.info("ConceptMap: 2 \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap1)); ourLog.debug("ConceptMap: 2 \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap1));
//- conceptMap1 v2 //- conceptMap1 v2
ConceptMap conceptMap2 = new ConceptMap(); ConceptMap conceptMap2 = new ConceptMap();
@ -1862,7 +1862,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
IIdType conceptMapId2 = myConceptMapDao.create(conceptMap2, mySrd).getId().toUnqualifiedVersionless(); IIdType conceptMapId2 = myConceptMapDao.create(conceptMap2, mySrd).getId().toUnqualifiedVersionless();
conceptMap2 = myConceptMapDao.read(conceptMapId2); conceptMap2 = myConceptMapDao.read(conceptMapId2);
ourLog.info("ConceptMap: 2 \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap2)); ourLog.debug("ConceptMap: 2 \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap2));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
@ -1871,7 +1871,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
inParams.addParameter().setName("code").setValue(new CodeType("11111")); inParams.addParameter().setName("code").setValue(new CodeType("11111"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
@ -1881,7 +1881,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
@ -1912,13 +1912,13 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
public void testTranslateWithReverseAndInstance() { public void testTranslateWithReverseAndInstance() {
ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId); ConceptMap conceptMap = myConceptMapDao.read(myConceptMapId);
ourLog.info("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap)); ourLog.debug("ConceptMap:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(conceptMap));
Parameters inParams = new Parameters(); Parameters inParams = new Parameters();
inParams.addParameter().setName("code").setValue(new CodeType("34567")); inParams.addParameter().setName("code").setValue(new CodeType("34567"));
inParams.addParameter().setName("reverse").setValue(new BooleanType(true)); inParams.addParameter().setName("reverse").setValue(new BooleanType(true));
ourLog.info("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams)); ourLog.debug("Request Parameters:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(inParams));
Parameters respParams = myClient Parameters respParams = myClient
.operation() .operation()
@ -1927,7 +1927,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.withParameters(inParams) .withParameters(inParams)
.execute(); .execute();
ourLog.info("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams)); ourLog.debug("Response Parameters\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(respParams));
ParametersParameterComponent param = getParameterByName(respParams, "result"); ParametersParameterComponent param = getParameterByName(respParams, "result");
assertTrue(((BooleanType) param.getValue()).booleanValue()); assertTrue(((BooleanType) param.getValue()).booleanValue());
@ -1999,7 +1999,7 @@ public class ResourceProviderR4ConceptMapTest extends BaseResourceProviderR4Test
.andParameter("target", new UriType("http://hl7.org/fhir/ValueSet/allergy-intolerance-type")) .andParameter("target", new UriType("http://hl7.org/fhir/ValueSet/allergy-intolerance-type"))
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(outcome));
} }

View File

@ -126,7 +126,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -141,7 +141,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -156,7 +156,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
@ -209,7 +209,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -225,7 +225,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -241,7 +241,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
//-- Search by date default op //-- Search by date default op
@ -313,13 +313,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
imp.getContained().add(risk); imp.getContained().add(risk);
imp.getInvestigationFirstRep().getItemFirstRep().setReference("#risk1"); imp.getInvestigationFirstRep().getItemFirstRep().setReference("#risk1");
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(imp)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(imp));
cid1 = myClinicalImpressionDao.create(imp, mySrd).getId().toUnqualifiedVersionless(); cid1 = myClinicalImpressionDao.create(imp, mySrd).getId().toUnqualifiedVersionless();
ClinicalImpression createdImp = myClinicalImpressionDao.read(cid1); ClinicalImpression createdImp = myClinicalImpressionDao.read(cid1);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdImp)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdImp));
} }
{ {
@ -344,13 +344,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
imp.getContained().add(risk); imp.getContained().add(risk);
imp.getInvestigationFirstRep().getItemFirstRep().setReference("#risk1"); imp.getInvestigationFirstRep().getItemFirstRep().setReference("#risk1");
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(imp)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(imp));
IIdType cid2 = myClinicalImpressionDao.create(imp, mySrd).getId().toUnqualifiedVersionless(); IIdType cid2 = myClinicalImpressionDao.create(imp, mySrd).getId().toUnqualifiedVersionless();
ClinicalImpression createdImp = myClinicalImpressionDao.read(cid2); ClinicalImpression createdImp = myClinicalImpressionDao.read(cid2);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdImp)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdImp));
} }
{ {
@ -375,13 +375,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
imp.getContained().add(risk); imp.getContained().add(risk);
imp.getInvestigationFirstRep().getItemFirstRep().setReference("#risk1"); imp.getInvestigationFirstRep().getItemFirstRep().setReference("#risk1");
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(imp)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(imp));
IIdType cid3 = myClinicalImpressionDao.create(imp, mySrd).getId().toUnqualifiedVersionless(); IIdType cid3 = myClinicalImpressionDao.create(imp, mySrd).getId().toUnqualifiedVersionless();
ClinicalImpression createdImp = myClinicalImpressionDao.read(cid3); ClinicalImpression createdImp = myClinicalImpressionDao.read(cid3);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdImp)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdImp));
} }
//-- Search by number //-- Search by number
@ -438,13 +438,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
eid1 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); eid1 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid1); Encounter createdEncounter = myEncounterDao.read(eid1);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
@ -469,13 +469,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
IIdType eid2 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); IIdType eid2 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid2); Encounter createdEncounter = myEncounterDao.read(eid2);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
{ {
@ -499,13 +499,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
IIdType eid3 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); IIdType eid3 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid3); Encounter createdEncounter = myEncounterDao.read(eid3);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
//-- Search by quantity //-- Search by quantity
@ -549,13 +549,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
eid1 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); eid1 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid1); Encounter createdEncounter = myEncounterDao.read(eid1);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
@ -580,13 +580,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
IIdType eid2 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); IIdType eid2 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid2); Encounter createdEncounter = myEncounterDao.read(eid2);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
{ {
@ -610,13 +610,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
IIdType eid3 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); IIdType eid3 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid3); Encounter createdEncounter = myEncounterDao.read(eid3);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
//-- Search by code //-- Search by code
@ -653,13 +653,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
IIdType eid1 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); IIdType eid1 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid1); Encounter createdEncounter = myEncounterDao.read(eid1);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
@ -684,13 +684,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
eid2 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); eid2 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid2); Encounter createdEncounter = myEncounterDao.read(eid2);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
{ {
@ -714,13 +714,13 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
encounter.addReasonReference().setReference("#obs1"); encounter.addReasonReference().setReference("#obs1");
encounter.getContained().add(obs); encounter.getContained().add(obs);
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(encounter));
IIdType eid3 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless(); IIdType eid3 = myEncounterDao.create(encounter, mySrd).getId().toUnqualifiedVersionless();
Encounter createdEncounter = myEncounterDao.read(eid3); Encounter createdEncounter = myEncounterDao.read(eid3);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdEncounter));
} }
//-- Search by composite //-- Search by composite
@ -767,11 +767,11 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
Observation createdObs = myObservationDao.read(oid1); Observation createdObs = myObservationDao.read(oid1);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
} }
{ {
@ -796,7 +796,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -821,7 +821,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
//-- Search by uri //-- Search by uri
@ -863,7 +863,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
logAllStringIndexes("subject.family"); logAllStringIndexes("subject.family");
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
Observation createdObs = myObservationDao.read(oid1); Observation createdObs = myObservationDao.read(oid1);
@ -898,7 +898,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
logAllStringIndexes("subject.family"); logAllStringIndexes("subject.family");
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
@ -914,7 +914,7 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
@ -959,14 +959,14 @@ public class ResourceProviderR4SearchContainedTest extends BaseResourceProviderR
obs.getContained().add(p2); obs.getContained().add(p2);
obs.getSubject().setReference("#patient2"); obs.getSubject().setReference("#patient2");
ourLog.info("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Input: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
// -- update // -- update
oid1 = myObservationDao.update(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.update(obs, mySrd).getId().toUnqualifiedVersionless();
Observation updatedObs = myObservationDao.read(oid1); Observation updatedObs = myObservationDao.read(oid1);
ourLog.info("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedObs)); ourLog.debug("Output: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedObs));
} }
//-- No Obs with Patient Smith //-- No Obs with Patient Smith

View File

@ -34,7 +34,7 @@ public class ResourceProviderR4StructureDefinitionTest extends BaseResourceProvi
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
assertEquals(1, response.getEntry().size()); assertEquals(1, response.getEntry().size());
assertEquals("dhtest7", response.getEntry().get(0).getResource().getIdElement().getIdPart()); assertEquals("dhtest7", response.getEntry().get(0).getResource().getIdElement().getIdPart());
} }

View File

@ -540,7 +540,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
assertThat(linkNext, containsString("_getpagesoffset=3300")); assertThat(linkNext, containsString("_getpagesoffset=3300"));
Bundle nextPageBundle = myClient.loadPage().byUrl(linkNext).andReturnBundle(Bundle.class).execute(); Bundle nextPageBundle = myClient.loadPage().byUrl(linkNext).andReturnBundle(Bundle.class).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(nextPageBundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(nextPageBundle));
assertEquals(null, nextPageBundle.getLink("next")); assertEquals(null, nextPageBundle.getLink("next"));
} }
@ -867,7 +867,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
String input = IOUtils.toString(getClass().getResourceAsStream("/basic-stu3.xml"), StandardCharsets.UTF_8); String input = IOUtils.toString(getClass().getResourceAsStream("/basic-stu3.xml"), StandardCharsets.UTF_8);
String respString = myClient.transaction().withBundle(input).prettyPrint().execute(); String respString = myClient.transaction().withBundle(input).prettyPrint().execute();
ourLog.info(respString); ourLog.debug(respString);
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, respString); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, respString);
IdType id = new IdType(bundle.getEntry().get(0).getResponse().getLocation()); IdType id = new IdType(bundle.getEntry().get(0).getResponse().getLocation());
@ -900,7 +900,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
ourLog.info(resp); ourLog.info(resp);
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, resp); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, resp);
ids = toUnqualifiedVersionlessIdValues(bundle); ids = toUnqualifiedVersionlessIdValues(bundle);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
} }
return ids; return ids;
@ -926,7 +926,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
Bundle bundle = client.read().resource(Bundle.class).withId(id).execute(); Bundle bundle = client.read().resource(Bundle.class).withId(id).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
} }
@Test @Test
@ -1330,7 +1330,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
String procedureString = myFhirContext.newXmlParser().encodeResourceToString(procedure); String procedureString = myFhirContext.newXmlParser().encodeResourceToString(procedure);
HttpPost procedurePost = new HttpPost(myServerBase + "/Procedure"); HttpPost procedurePost = new HttpPost(myServerBase + "/Procedure");
procedurePost.setEntity(new StringEntity(procedureString, ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); procedurePost.setEntity(new StringEntity(procedureString, ContentType.create(Constants.CT_FHIR_XML, "UTF-8")));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(procedure)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(procedure));
IdType id; IdType id;
try (CloseableHttpResponse response = ourHttpClient.execute(procedurePost)) { try (CloseableHttpResponse response = ourHttpClient.execute(procedurePost)) {
assertEquals(201, response.getStatusLine().getStatusCode()); assertEquals(201, response.getStatusLine().getStatusCode());
@ -1367,7 +1367,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
.setPart(parts); .setPart(parts);
entry.setResource(parameter); entry.setResource(parameter);
bundle.setEntry(List.of(entry)); bundle.setEntry(List.of(entry));
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
String parameterResource = myFhirContext.newXmlParser().encodeResourceToString(bundle); String parameterResource = myFhirContext.newXmlParser().encodeResourceToString(bundle);
HttpPost parameterPost = new HttpPost(myServerBase); HttpPost parameterPost = new HttpPost(myServerBase);
parameterPost.setEntity(new StringEntity(parameterResource, ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); parameterPost.setEntity(new StringEntity(parameterResource, ContentType.create(Constants.CT_FHIR_XML, "UTF-8")));
@ -1476,7 +1476,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
assertEquals(201, response.getStatusLine().getStatusCode()); assertEquals(201, response.getStatusLine().getStatusCode());
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(response.toString()); ourLog.info(response.toString());
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, startsWith("<Patient xmlns=\"http://hl7.org/fhir\">")); assertThat(respString, startsWith("<Patient xmlns=\"http://hl7.org/fhir\">"));
assertThat(respString, endsWith("</Patient>")); assertThat(respString, endsWith("</Patient>"));
} finally { } finally {
@ -1498,7 +1498,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
assertEquals(201, response.getStatusLine().getStatusCode()); assertEquals(201, response.getStatusLine().getStatusCode());
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(response.toString()); ourLog.info(response.toString());
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, containsString("<OperationOutcome xmlns=\"http://hl7.org/fhir\">")); assertThat(respString, containsString("<OperationOutcome xmlns=\"http://hl7.org/fhir\">"));
} finally { } finally {
response.getEntity().getContent().close(); response.getEntity().getContent().close();
@ -1568,7 +1568,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(res)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(res));
assertEquals(3, res.getEntry().size()); assertEquals(3, res.getEntry().size());
assertEquals(1, genResourcesOfType(res, Encounter.class).size()); assertEquals(1, genResourcesOfType(res, Encounter.class).size());
@ -1594,7 +1594,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(res)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(res));
assertEquals(1, res.getEntry().size()); assertEquals(1, res.getEntry().size());
assertEquals(1, genResourcesOfType(res, Encounter.class).size()); assertEquals(1, genResourcesOfType(res, Encounter.class).size());
@ -1607,7 +1607,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(res)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(res));
assertEquals(2, res.getEntry().size()); assertEquals(2, res.getEntry().size());
assertEquals(1, genResourcesOfType(res, Encounter.class).size()); assertEquals(1, genResourcesOfType(res, Encounter.class).size());
@ -1844,7 +1844,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
} }
String resp = b.toString(); String resp = b.toString();
ourLog.info("Resp: {}", resp); ourLog.debug("Resp: {}", resp);
} catch (SocketTimeoutException e) { } catch (SocketTimeoutException e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
@ -2264,7 +2264,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
Bundle resp = myClient.transaction().withBundle(b).execute(); Bundle resp = myClient.transaction().withBundle(b).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
IdType patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation()); IdType patientId = new IdType(resp.getEntry().get(0).getResponse().getLocation());
assertEquals("Patient", patientId.getResourceType()); assertEquals("Patient", patientId.getResourceType());
@ -2511,7 +2511,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Parameters output = myClient.operation().onInstance(p1Id).named("everything").withParameters(parameters).execute(); Parameters output = myClient.operation().onInstance(p1Id).named("everything").withParameters(parameters).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
Bundle b = (Bundle) output.getParameter().get(0).getResource(); Bundle b = (Bundle) output.getParameter().get(0).getResource();
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
@ -2542,7 +2542,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute(); Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
Bundle b = (Bundle) output.getParameter().get(0).getResource(); Bundle b = (Bundle) output.getParameter().get(0).getResource();
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
@ -2581,7 +2581,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute(); Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
Bundle b = (Bundle) output.getParameter().get(0).getResource(); Bundle b = (Bundle) output.getParameter().get(0).getResource();
myCaptureQueriesListener.logSelectQueries(); myCaptureQueriesListener.logSelectQueries();
@ -2778,7 +2778,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
.returnResourceType(Bundle.class) .returnResourceType(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(responseBundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(responseBundle));
List<String> ids = new ArrayList<>(); List<String> ids = new ArrayList<>();
for (BundleEntryComponent nextEntry : responseBundle.getEntry()) { for (BundleEntryComponent nextEntry : responseBundle.getEntry()) {
@ -2914,7 +2914,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
try (CloseableHttpResponse resp = ourHttpClient.execute(post)) { try (CloseableHttpResponse resp = ourHttpClient.execute(post)) {
String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
assertEquals(200, resp.getStatusLine().getStatusCode()); assertEquals(200, resp.getStatusLine().getStatusCode());
} }
} }
@ -2937,7 +2937,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
try (CloseableHttpResponse resp = ourHttpClient.execute(post)) { try (CloseableHttpResponse resp = ourHttpClient.execute(post)) {
String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, containsString("Unknown extension http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode")); assertThat(respString, containsString("Unknown extension http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode"));
assertEquals(200, resp.getStatusLine().getStatusCode()); assertEquals(200, resp.getStatusLine().getStatusCode());
} }
@ -2963,7 +2963,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
try (CloseableHttpResponse resp = ourHttpClient.execute(post)) { try (CloseableHttpResponse resp = ourHttpClient.execute(post)) {
String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
assertEquals(200, resp.getStatusLine().getStatusCode()); assertEquals(200, resp.getStatusLine().getStatusCode());
} }
} }
@ -2982,7 +2982,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
try (CloseableHttpResponse resp = ourHttpClient.execute(post)) { try (CloseableHttpResponse resp = ourHttpClient.execute(post)) {
String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), Charsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
assertEquals(412, resp.getStatusLine().getStatusCode()); assertEquals(412, resp.getStatusLine().getStatusCode());
assertThat(respString, containsString("Profile reference 'http://foo/structuredefinition/myprofile' has not been checked because it is unknown")); assertThat(respString, containsString("Profile reference 'http://foo/structuredefinition/myprofile' has not been checked because it is unknown"));
} }
@ -3286,12 +3286,12 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
assertEquals(id.withVersion("1").getValue(), history.getEntry().get(2).getResource().getId()); assertEquals(id.withVersion("1").getValue(), history.getEntry().get(2).getResource().getId());
assertEquals(1, ((Patient) history.getEntry().get(2).getResource()).getName().size()); assertEquals(1, ((Patient) history.getEntry().get(2).getResource()).getName().size());
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(history)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(history));
try { try {
myBundleDao.validate(history, null, null, null, null, null, mySrd); myBundleDao.validate(history, null, null, null, null, null, mySrd);
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
throw e; throw e;
} }
} }
@ -3552,7 +3552,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
.returnBundle(Bundle.class) .returnBundle(Bundle.class)
.execute(); .execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(bundle));
assertEquals(3, bundle.getEntry().size()); assertEquals(3, bundle.getEntry().size());
assertEquals("Patient", bundle.getEntry().get(0).getResource().getIdElement().getResourceType()); assertEquals("Patient", bundle.getEntry().get(0).getResource().getIdElement().getResourceType());
@ -4040,7 +4040,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myCaptureQueriesListener.logAllQueriesForCurrentThread(); myCaptureQueriesListener.logAllQueriesForCurrentThread();
Bundle bundle = myClient.search().forResource("Patient").returnBundle(Bundle.class).execute(); Bundle bundle = myClient.search().forResource("Patient").returnBundle(Bundle.class).execute();
ourLog.info("Result: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Result: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
assertEquals(2, bundle.getTotal()); assertEquals(2, bundle.getTotal());
assertEquals(1, bundle.getEntry().size()); assertEquals(1, bundle.getEntry().size());
assertEquals(id2.getIdPart(), bundle.getEntry().get(0).getResource().getIdElement().getIdPart()); assertEquals(id2.getIdPart(), bundle.getEntry().get(0).getResource().getIdElement().getIdPart());
@ -4276,7 +4276,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
} }
private void printResourceToConsole(IBaseResource theResource) { private void printResourceToConsole(IBaseResource theResource) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(theResource)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(theResource));
} }
@Test @Test
@ -4710,7 +4710,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
CloseableHttpResponse resp = ourHttpClient.execute(httpPost); CloseableHttpResponse resp = ourHttpClient.execute(httpPost);
try { try {
String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
assertThat(respString, containsString("Invalid parameter chain: subject.id")); assertThat(respString, containsString("Invalid parameter chain: subject.id"));
assertEquals(400, resp.getStatusLine().getStatusCode()); assertEquals(400, resp.getStatusLine().getStatusCode());
} finally { } finally {
@ -4959,7 +4959,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -4972,7 +4972,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -4985,7 +4985,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -4998,7 +4998,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
// > 1m // > 1m
@ -5040,7 +5040,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5051,7 +5051,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5062,7 +5062,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5074,7 +5074,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
String uri; String uri;
@ -5111,7 +5111,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5122,7 +5122,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5135,7 +5135,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
myCaptureQueriesListener.clear(); myCaptureQueriesListener.clear();
@ -5705,7 +5705,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5717,7 +5717,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5729,7 +5729,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5741,7 +5741,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
String uri = myServerBase + "/Observation?_sort=code-value-quantity"; String uri = myServerBase + "/Observation?_sort=code-value-quantity";
@ -5753,7 +5753,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
found = myFhirContext.newXmlParser().parseResource(Bundle.class, output); found = myFhirContext.newXmlParser().parseResource(Bundle.class, output);
} }
ourLog.info("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(found)); ourLog.debug("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(found));
List<IIdType> list = toUnqualifiedVersionlessIds(found); List<IIdType> list = toUnqualifiedVersionlessIds(found);
assertEquals(4, found.getEntry().size()); assertEquals(4, found.getEntry().size());
@ -5790,7 +5790,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5806,7 +5806,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5822,7 +5822,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -5837,7 +5837,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
comp.setValue(new Quantity().setValue(250)); comp.setValue(new Quantity().setValue(250));
oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
String uri = myServerBase + "/Observation?_sort=combo-code-value-quantity"; String uri = myServerBase + "/Observation?_sort=combo-code-value-quantity";
@ -5849,7 +5849,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
found = myFhirContext.newXmlParser().parseResource(Bundle.class, output); found = myFhirContext.newXmlParser().parseResource(Bundle.class, output);
} }
ourLog.info("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(found)); ourLog.debug("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(found));
List<IIdType> list = toUnqualifiedVersionlessIds(found); List<IIdType> list = toUnqualifiedVersionlessIds(found);
assertEquals(4, found.getEntry().size()); assertEquals(4, found.getEntry().size());
@ -7100,7 +7100,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
cc.addCoding().setCode("2345-7").setSystem("http://loinc.org"); cc.addCoding().setCode("2345-7").setSystem("http://loinc.org");
obs.setValue(new Quantity().setValueElement(new DecimalType(125.12)).setUnit("CM").setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("cm")); obs.setValue(new Quantity().setValueElement(new DecimalType(125.12)).setUnit("CM").setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("cm"));
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
IIdType opid1 = myObservationDao.create(obs, mySrd).getId(); IIdType opid1 = myObservationDao.create(obs, mySrd).getId();
@ -7113,7 +7113,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
cc.addCoding().setCode("2345-7").setSystem("http://loinc.org"); cc.addCoding().setCode("2345-7").setSystem("http://loinc.org");
obs.setValue(new Quantity().setValueElement(new DecimalType(24.12)).setUnit("CM").setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("cm")); obs.setValue(new Quantity().setValueElement(new DecimalType(24.12)).setUnit("CM").setSystem(UcumServiceUtil.UCUM_CODESYSTEM_URL).setCode("cm"));
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
myObservationDao.update(obs, mySrd); myObservationDao.update(obs, mySrd);
} }
@ -7129,7 +7129,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -7142,7 +7142,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
{ {
@ -7155,7 +7155,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
myObservationDao.create(obs, mySrd); myObservationDao.create(obs, mySrd);
ourLog.info("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); ourLog.debug("Observation: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs));
} }
// > 1m // > 1m
@ -7190,7 +7190,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
patient.setBirthDateElement(new DateType("2073")); patient.setBirthDateElement(new DateType("2073"));
pid0 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless(); pid0 = myPatientDao.create(patient, mySrd).getId().toUnqualifiedVersionless();
ourLog.info("Patient: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient)); ourLog.debug("Patient: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(patient));
ourLog.info("pid0 " + pid0); ourLog.info("pid0 " + pid0);
} }
@ -7205,7 +7205,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
ourLog.info(resp); ourLog.info(resp);
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, resp); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, resp);
ids = toUnqualifiedVersionlessIdValues(bundle); ids = toUnqualifiedVersionlessIdValues(bundle);
ourLog.info("Patient: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Patient: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
} }
uri = myServerBase + "/Patient?_total=accurate&birthdate=gt2072-01-01"; uri = myServerBase + "/Patient?_total=accurate&birthdate=gt2072-01-01";
@ -7217,7 +7217,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
ourLog.info(resp); ourLog.info(resp);
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, resp); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, resp);
ids = toUnqualifiedVersionlessIdValues(bundle); ids = toUnqualifiedVersionlessIdValues(bundle);
ourLog.info("Patient: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Patient: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
} }
} }

View File

@ -775,7 +775,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertEquals(1, expanded.getExpansion().getContains().size()); assertEquals(1, expanded.getExpansion().getContains().size());
// Update the CodeSystem URL and Codes // Update the CodeSystem URL and Codes
@ -799,7 +799,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertEquals(1, expanded.getExpansion().getContains().size()); assertEquals(1, expanded.getExpansion().getContains().size());
} }
@ -816,7 +816,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
try (CloseableHttpResponse resp = ourHttpClient.execute(post)) { try (CloseableHttpResponse resp = ourHttpClient.execute(post)) {
String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
ourLog.info(resp.toString()); ourLog.info(resp.toString());
@ -833,10 +833,10 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
loadAndPersistCodeSystemAndValueSetWithDesignations(); loadAndPersistCodeSystemAndValueSetWithDesignations();
CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId); CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem));
ValueSet valueSet = myValueSetDao.read(myExtensionalVsId); ValueSet valueSet = myValueSetDao.read(myExtensionalVsId);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet));
String initialValueSetName = valueSet.getName(); String initialValueSetName = valueSet.getName();
validateTermValueSetNotExpanded(initialValueSetName); validateTermValueSetNotExpanded(initialValueSetName);
@ -848,7 +848,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
updatedValueSet.setName(valueSet.getName().concat(" - MODIFIED")); updatedValueSet.setName(valueSet.getName().concat(" - MODIFIED"));
persistValueSet(updatedValueSet, HttpVerb.PUT); persistValueSet(updatedValueSet, HttpVerb.PUT);
updatedValueSet = myValueSetDao.read(myExtensionalVsId); updatedValueSet = myValueSetDao.read(myExtensionalVsId);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet));
String updatedValueSetName = valueSet.getName(); String updatedValueSetName = valueSet.getName();
validateTermValueSetNotExpanded(updatedValueSetName); validateTermValueSetNotExpanded(updatedValueSetName);
@ -863,10 +863,10 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
loadAndPersistCodeSystemAndValueSetWithDesignations(); loadAndPersistCodeSystemAndValueSetWithDesignations();
CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId); CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem));
ValueSet valueSet = myValueSetDao.read(myExtensionalVsId); ValueSet valueSet = myValueSetDao.read(myExtensionalVsId);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet));
String initialValueSetName = valueSet.getName(); String initialValueSetName = valueSet.getName();
validateTermValueSetNotExpanded(initialValueSetName); validateTermValueSetNotExpanded(initialValueSetName);
@ -887,11 +887,11 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.getRequest() .getRequest()
.setMethod(Bundle.HTTPVerb.PUT) .setMethod(Bundle.HTTPVerb.PUT)
.setUrl(myExtensionalVsId.getValueAsString()); .setUrl(myExtensionalVsId.getValueAsString());
ourLog.info("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
myClient.transaction().withBundle(bundle).execute(); myClient.transaction().withBundle(bundle).execute();
updatedValueSet = myValueSetDao.read(myExtensionalVsId); updatedValueSet = myValueSetDao.read(myExtensionalVsId);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet));
String updatedValueSetName = valueSet.getName(); String updatedValueSetName = valueSet.getName();
validateTermValueSetNotExpanded(updatedValueSetName); validateTermValueSetNotExpanded(updatedValueSetName);
@ -1031,7 +1031,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
request.addHeader("Accept", "application/fhir+json"); request.addHeader("Accept", "application/fhir+json");
try (CloseableHttpResponse response = ourHttpClient.execute(request)) { try (CloseableHttpResponse response = ourHttpClient.execute(request)) {
String respString = IOUtils.toString(response.getEntity().getContent(), Charsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), Charsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
Parameters respParam = myFhirContext.newJsonParser().parseResource(Parameters.class, respString); Parameters respParam = myFhirContext.newJsonParser().parseResource(Parameters.class, respString);
assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue()); assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue());
@ -1072,7 +1072,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.withParameter(Parameters.class, "url", new UrlType(URL_MY_VALUE_SET)) .withParameter(Parameters.class, "url", new UrlType(URL_MY_VALUE_SET))
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A", "AA", "AB", "AAA")); assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A", "AA", "AB", "AAA"));
assertEquals(12, myCaptureQueriesListener.getSelectQueries().size()); assertEquals(12, myCaptureQueriesListener.getSelectQueries().size());
assertEquals("ValueSet \"ValueSet.url[http://example.com/my_value_set]\" has not yet been pre-expanded. Performing in-memory expansion without parameters. Current status: NOT_EXPANDED | The ValueSet is waiting to be picked up and pre-expanded by a scheduled task.", expansion.getMeta().getExtensionString(EXT_VALUESET_EXPANSION_MESSAGE)); assertEquals("ValueSet \"ValueSet.url[http://example.com/my_value_set]\" has not yet been pre-expanded. Performing in-memory expansion without parameters. Current status: NOT_EXPANDED | The ValueSet is waiting to be picked up and pre-expanded by a scheduled task.", expansion.getMeta().getExtensionString(EXT_VALUESET_EXPANSION_MESSAGE));
@ -1087,7 +1087,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.andParameter(JpaConstants.OPERATION_EXPAND_PARAM_INCLUDE_HIERARCHY, new BooleanType("true")) .andParameter(JpaConstants.OPERATION_EXPAND_PARAM_INCLUDE_HIERARCHY, new BooleanType("true"))
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A")); assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A"));
assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains()), containsInAnyOrder("AA", "AB")); assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains()), containsInAnyOrder("AA", "AB"));
assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains().stream().filter(t -> t.getCode().equals("AA")).findFirst().orElseThrow(() -> new IllegalArgumentException()).getContains()), containsInAnyOrder("AAA")); assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains().stream().filter(t -> t.getCode().equals("AA")).findFirst().orElseThrow(() -> new IllegalArgumentException()).getContains()), containsInAnyOrder("AAA"));
@ -1112,7 +1112,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.withParameter(Parameters.class, "valueSet", myLocalVs) .withParameter(Parameters.class, "valueSet", myLocalVs)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A", "AA", "AB", "AAA")); assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A", "AA", "AB", "AAA"));
assertEquals(8, myCaptureQueriesListener.getSelectQueries().size()); assertEquals(8, myCaptureQueriesListener.getSelectQueries().size());
assertEquals("ValueSet with URL \"Unidentified ValueSet\" was expanded using an in-memory expansion", expansion.getMeta().getExtensionString(EXT_VALUESET_EXPANSION_MESSAGE)); assertEquals("ValueSet with URL \"Unidentified ValueSet\" was expanded using an in-memory expansion", expansion.getMeta().getExtensionString(EXT_VALUESET_EXPANSION_MESSAGE));
@ -1127,7 +1127,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.andParameter(JpaConstants.OPERATION_EXPAND_PARAM_INCLUDE_HIERARCHY, new BooleanType("true")) .andParameter(JpaConstants.OPERATION_EXPAND_PARAM_INCLUDE_HIERARCHY, new BooleanType("true"))
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A")); assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A"));
assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains()), containsInAnyOrder("AA", "AB")); assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains()), containsInAnyOrder("AA", "AB"));
assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains().stream().filter(t -> t.getCode().equals("AA")).findFirst().orElseThrow(() -> new IllegalArgumentException()).getContains()), containsInAnyOrder("AAA")); assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains().stream().filter(t -> t.getCode().equals("AA")).findFirst().orElseThrow(() -> new IllegalArgumentException()).getContains()), containsInAnyOrder("AAA"));
@ -1166,7 +1166,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.withParameter(Parameters.class, "url", new UrlType(URL_MY_VALUE_SET)) .withParameter(Parameters.class, "url", new UrlType(URL_MY_VALUE_SET))
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A", "AA", "AB", "AAA")); assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A", "AA", "AB", "AAA"));
assertEquals(0, myCaptureQueriesListener.getSelectQueries().size()); assertEquals(0, myCaptureQueriesListener.getSelectQueries().size());
assertThat(expansion.getMeta().getExtensionString(EXT_VALUESET_EXPANSION_MESSAGE), containsString("ValueSet was expanded using an expansion that was pre-calculated")); assertThat(expansion.getMeta().getExtensionString(EXT_VALUESET_EXPANSION_MESSAGE), containsString("ValueSet was expanded using an expansion that was pre-calculated"));
@ -1181,7 +1181,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
.andParameter(JpaConstants.OPERATION_EXPAND_PARAM_INCLUDE_HIERARCHY, new BooleanType("true")) .andParameter(JpaConstants.OPERATION_EXPAND_PARAM_INCLUDE_HIERARCHY, new BooleanType("true"))
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expansion));
assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A")); assertThat(toDirectCodes(expansion.getExpansion().getContains()), containsInAnyOrder("A"));
assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains()), containsInAnyOrder("AA", "AB")); assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains()), containsInAnyOrder("AA", "AB"));
assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains().stream().filter(t -> t.getCode().equals("AA")).findFirst().orElseThrow(() -> new IllegalArgumentException()).getContains()), containsInAnyOrder("AAA")); assertThat(toDirectCodes(expansion.getExpansion().getContains().get(0).getContains().stream().filter(t -> t.getCode().equals("AA")).findFirst().orElseThrow(() -> new IllegalArgumentException()).getContains()), containsInAnyOrder("AAA"));
@ -1226,7 +1226,7 @@ public class ResourceProviderR4ValueSetNoVerCSNoVerTest extends BaseResourceProv
request.addHeader("Accept", "application/fhir+json"); request.addHeader("Accept", "application/fhir+json");
try (CloseableHttpResponse response = ourHttpClient.execute(request)) { try (CloseableHttpResponse response = ourHttpClient.execute(request)) {
String respString = IOUtils.toString(response.getEntity().getContent(), Charsets.UTF_8); String respString = IOUtils.toString(response.getEntity().getContent(), Charsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
Parameters respParam = myFhirContext.newJsonParser().parseResource(Parameters.class, respString); Parameters respParam = myFhirContext.newJsonParser().parseResource(Parameters.class, respString);
assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue()); assertTrue(((BooleanType) respParam.getParameter().get(0).getValue()).booleanValue());

View File

@ -687,7 +687,7 @@ public class ResourceProviderR4ValueSetVerCSNoVerTest extends BaseResourceProvid
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertEquals(1, expanded.getExpansion().getContains().size()); assertEquals(1, expanded.getExpansion().getContains().size());
// Update the CodeSystem URL and Codes // Update the CodeSystem URL and Codes
@ -711,7 +711,7 @@ public class ResourceProviderR4ValueSetVerCSNoVerTest extends BaseResourceProvid
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertEquals(1, expanded.getExpansion().getContains().size()); assertEquals(1, expanded.getExpansion().getContains().size());
assertNotNull(expanded.getId()); assertNotNull(expanded.getId());
} }
@ -723,10 +723,10 @@ public class ResourceProviderR4ValueSetVerCSNoVerTest extends BaseResourceProvid
loadAndPersistCodeSystemAndValueSetWithDesignations(); loadAndPersistCodeSystemAndValueSetWithDesignations();
CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId); CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem));
ValueSet valueSet = myValueSetDao.read(myExtensionalVsId); ValueSet valueSet = myValueSetDao.read(myExtensionalVsId);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet));
String initialValueSetName = valueSet.getName(); String initialValueSetName = valueSet.getName();
validateTermValueSetNotExpanded(initialValueSetName); validateTermValueSetNotExpanded(initialValueSetName);
@ -738,7 +738,7 @@ public class ResourceProviderR4ValueSetVerCSNoVerTest extends BaseResourceProvid
updatedValueSet.setName(valueSet.getName().concat(" - MODIFIED")); updatedValueSet.setName(valueSet.getName().concat(" - MODIFIED"));
persistValueSet(updatedValueSet, HttpVerb.PUT); persistValueSet(updatedValueSet, HttpVerb.PUT);
updatedValueSet = myValueSetDao.read(myExtensionalVsId); updatedValueSet = myValueSetDao.read(myExtensionalVsId);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet));
String updatedValueSetName = valueSet.getName(); String updatedValueSetName = valueSet.getName();
validateTermValueSetNotExpanded(updatedValueSetName); validateTermValueSetNotExpanded(updatedValueSetName);
@ -753,10 +753,10 @@ public class ResourceProviderR4ValueSetVerCSNoVerTest extends BaseResourceProvid
loadAndPersistCodeSystemAndValueSetWithDesignations(); loadAndPersistCodeSystemAndValueSetWithDesignations();
CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId); CodeSystem codeSystem = myCodeSystemDao.read(myExtensionalCsId);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem));
ValueSet valueSet = myValueSetDao.read(myExtensionalVsId); ValueSet valueSet = myValueSetDao.read(myExtensionalVsId);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet));
String initialValueSetName = valueSet.getName(); String initialValueSetName = valueSet.getName();
validateTermValueSetNotExpanded(initialValueSetName); validateTermValueSetNotExpanded(initialValueSetName);
@ -777,11 +777,11 @@ public class ResourceProviderR4ValueSetVerCSNoVerTest extends BaseResourceProvid
.getRequest() .getRequest()
.setMethod(Bundle.HTTPVerb.PUT) .setMethod(Bundle.HTTPVerb.PUT)
.setUrl(myExtensionalVsId.getValueAsString()); .setUrl(myExtensionalVsId.getValueAsString());
ourLog.info("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
myClient.transaction().withBundle(bundle).execute(); myClient.transaction().withBundle(bundle).execute();
updatedValueSet = myValueSetDao.read(myExtensionalVsId); updatedValueSet = myValueSetDao.read(myExtensionalVsId);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet));
String updatedValueSetName = valueSet.getName(); String updatedValueSetName = valueSet.getName();
validateTermValueSetNotExpanded(updatedValueSetName); validateTermValueSetNotExpanded(updatedValueSetName);

View File

@ -878,7 +878,7 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertEquals(1, expanded.getExpansion().getContains().size()); assertEquals(1, expanded.getExpansion().getContains().size());
// Update the CodeSystem Version and Codes // Update the CodeSystem Version and Codes
@ -903,7 +903,7 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
.withNoParameters(Parameters.class) .withNoParameters(Parameters.class)
.returnResourceType(ValueSet.class) .returnResourceType(ValueSet.class)
.execute(); .execute();
ourLog.info("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded)); ourLog.debug("Expanded: {}", myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(expanded));
assertEquals(1, expanded.getExpansion().getContains().size()); assertEquals(1, expanded.getExpansion().getContains().size());
} }
@ -915,14 +915,14 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
loadAndPersistCodeSystemAndValueSetWithDesignations(); loadAndPersistCodeSystemAndValueSetWithDesignations();
CodeSystem codeSystem_v1 = myCodeSystemDao.read(myExtensionalCsId_v1); CodeSystem codeSystem_v1 = myCodeSystemDao.read(myExtensionalCsId_v1);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v1)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v1));
CodeSystem codeSystem_v2 = myCodeSystemDao.read(myExtensionalCsId_v2); CodeSystem codeSystem_v2 = myCodeSystemDao.read(myExtensionalCsId_v2);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v2)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v2));
ValueSet valueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1); ValueSet valueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v1)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v1));
ValueSet valueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2); ValueSet valueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v2)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v2));
String initialValueSetName_v1 = valueSet_v1.getName(); String initialValueSetName_v1 = valueSet_v1.getName();
validateTermValueSetNotExpanded(initialValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1); validateTermValueSetNotExpanded(initialValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1);
@ -937,7 +937,7 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
updatedValueSet_v1.setName(valueSet_v1.getName().concat(" - MODIFIED")); updatedValueSet_v1.setName(valueSet_v1.getName().concat(" - MODIFIED"));
persistSingleValueSet(updatedValueSet_v1, HttpVerb.PUT); persistSingleValueSet(updatedValueSet_v1, HttpVerb.PUT);
updatedValueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1); updatedValueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v1)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v1));
String updatedValueSetName_v1 = valueSet_v1.getName(); String updatedValueSetName_v1 = valueSet_v1.getName();
validateTermValueSetNotExpanded(updatedValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1); validateTermValueSetNotExpanded(updatedValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1);
@ -946,7 +946,7 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
updatedValueSet_v2.setName(valueSet_v2.getName().concat(" - MODIFIED")); updatedValueSet_v2.setName(valueSet_v2.getName().concat(" - MODIFIED"));
persistSingleValueSet(updatedValueSet_v2, HttpVerb.PUT); persistSingleValueSet(updatedValueSet_v2, HttpVerb.PUT);
updatedValueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2); updatedValueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v2)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v2));
String updatedValueSetName_v2 = valueSet_v2.getName(); String updatedValueSetName_v2 = valueSet_v2.getName();
validateTermValueSetNotExpanded(updatedValueSetName_v2, "2", myExtensionalVsIdOnResourceTable_v2); validateTermValueSetNotExpanded(updatedValueSetName_v2, "2", myExtensionalVsIdOnResourceTable_v2);
@ -964,14 +964,14 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
loadAndPersistCodeSystemAndValueSetWithDesignations(); loadAndPersistCodeSystemAndValueSetWithDesignations();
CodeSystem codeSystem_v1 = myCodeSystemDao.read(myExtensionalCsId_v1); CodeSystem codeSystem_v1 = myCodeSystemDao.read(myExtensionalCsId_v1);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v1)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v1));
CodeSystem codeSystem_v2 = myCodeSystemDao.read(myExtensionalCsId_v2); CodeSystem codeSystem_v2 = myCodeSystemDao.read(myExtensionalCsId_v2);
ourLog.info("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v2)); ourLog.debug("CodeSystem:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(codeSystem_v2));
ValueSet valueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1); ValueSet valueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v1)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v1));
ValueSet valueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2); ValueSet valueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2);
ourLog.info("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v2)); ourLog.debug("ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(valueSet_v2));
String initialValueSetName_v1 = valueSet_v1.getName(); String initialValueSetName_v1 = valueSet_v1.getName();
validateTermValueSetNotExpanded(initialValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1); validateTermValueSetNotExpanded(initialValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1);
@ -995,11 +995,11 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
.getRequest() .getRequest()
.setMethod(Bundle.HTTPVerb.PUT) .setMethod(Bundle.HTTPVerb.PUT)
.setUrl(myExtensionalVsId_v1.getValueAsString()); .setUrl(myExtensionalVsId_v1.getValueAsString());
ourLog.info("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
myClient.transaction().withBundle(bundle).execute(); myClient.transaction().withBundle(bundle).execute();
updatedValueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1); updatedValueSet_v1 = myValueSetDao.read(myExtensionalVsId_v1);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v1)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v1));
String updatedValueSetName_v1 = valueSet_v1.getName(); String updatedValueSetName_v1 = valueSet_v1.getName();
validateTermValueSetNotExpanded(updatedValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1); validateTermValueSetNotExpanded(updatedValueSetName_v1, "1", myExtensionalVsIdOnResourceTable_v1);
@ -1017,11 +1017,11 @@ public class ResourceProviderR4ValueSetVerCSVerTest extends BaseResourceProvider
.getRequest() .getRequest()
.setMethod(Bundle.HTTPVerb.PUT) .setMethod(Bundle.HTTPVerb.PUT)
.setUrl(myExtensionalVsId_v2.getValueAsString()); .setUrl(myExtensionalVsId_v2.getValueAsString());
ourLog.info("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Transaction Bundle:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
myClient.transaction().withBundle(bundle).execute(); myClient.transaction().withBundle(bundle).execute();
updatedValueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2); updatedValueSet_v2 = myValueSetDao.read(myExtensionalVsId_v2);
ourLog.info("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v2)); ourLog.debug("Updated ValueSet:\n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedValueSet_v2));
String updatedValueSetName_v2 = valueSet_v2.getName(); String updatedValueSetName_v2 = valueSet_v2.getName();
validateTermValueSetNotExpanded(updatedValueSetName_v2, "2", myExtensionalVsIdOnResourceTable_v2); validateTermValueSetNotExpanded(updatedValueSetName_v2, "2", myExtensionalVsIdOnResourceTable_v2);

View File

@ -298,7 +298,7 @@ public class ResourceProviderSearchModifierR4Test extends BaseResourceProviderR4
String resp = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8); String resp = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info("Response was: {}", resp); ourLog.info("Response was: {}", resp);
Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, resp); Bundle bundle = myFhirContext.newXmlParser().parseResource(Bundle.class, resp);
ourLog.info("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle)); ourLog.debug("Bundle: \n" + myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle));
ids = toUnqualifiedVersionlessIdValues(bundle); ids = toUnqualifiedVersionlessIdValues(bundle);
} }
return ids; return ids;

View File

@ -89,7 +89,7 @@ public class ServerCapabilityStatementProviderJpaR4Test extends BaseResourceProv
@Test @Test
public void testNoDuplicateResourceOperationNames() { public void testNoDuplicateResourceOperationNames() {
CapabilityStatement cs = myClient.capabilities().ofType(CapabilityStatement.class).execute(); CapabilityStatement cs = myClient.capabilities().ofType(CapabilityStatement.class).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(cs)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(cs));
for (CapabilityStatement.CapabilityStatementRestResourceComponent next : cs.getRestFirstRep().getResource()) { for (CapabilityStatement.CapabilityStatementRestResourceComponent next : cs.getRestFirstRep().getResource()) {
List<String> opNames = next List<String> opNames = next
.getOperation() .getOperation()
@ -105,7 +105,7 @@ public class ServerCapabilityStatementProviderJpaR4Test extends BaseResourceProv
@Test @Test
public void testNoDuplicateSystemOperationNames() { public void testNoDuplicateSystemOperationNames() {
CapabilityStatement cs = myClient.capabilities().ofType(CapabilityStatement.class).execute(); CapabilityStatement cs = myClient.capabilities().ofType(CapabilityStatement.class).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(cs)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(cs));
List<String> systemOpNames = cs List<String> systemOpNames = cs
.getRestFirstRep() .getRestFirstRep()
.getOperation() .getOperation()

View File

@ -40,14 +40,14 @@ public class ServerR4Test extends BaseResourceProviderR4Test {
assertEquals(200, resp.getStatusLine().getStatusCode()); assertEquals(200, resp.getStatusLine().getStatusCode());
String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
CapabilityStatement cs = myFhirContext.newJsonParser().parseResource(CapabilityStatement.class, respString); CapabilityStatement cs = myFhirContext.newJsonParser().parseResource(CapabilityStatement.class, respString);
try { try {
myCapabilityStatementDao.validate(cs, null, respString, EncodingEnum.JSON, null, null, null); myCapabilityStatementDao.validate(cs, null, respString, EncodingEnum.JSON, null, null, null);
} catch (PreconditionFailedException e) { } catch (PreconditionFailedException e) {
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome())); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(e.getOperationOutcome()));
fail(); fail();
} }
} }
@ -66,7 +66,7 @@ public class ServerR4Test extends BaseResourceProviderR4Test {
assertEquals(200, resp.getStatusLine().getStatusCode()); assertEquals(200, resp.getStatusLine().getStatusCode());
String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8); String respString = IOUtils.toString(resp.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(respString); ourLog.debug(respString);
CapabilityStatement cs = myFhirContext.newXmlParser().parseResource(CapabilityStatement.class, respString); CapabilityStatement cs = myFhirContext.newXmlParser().parseResource(CapabilityStatement.class, respString);

View File

@ -87,7 +87,7 @@ public class StaleSearchDeletingSvcR4Test extends BaseResourceProviderR4Test {
assertThat(nextLinkUrl, not(blankOrNullString())); assertThat(nextLinkUrl, not(blankOrNullString()));
Bundle resp2 = myClient.search().byUrl(nextLinkUrl).returnBundle(Bundle.class).execute(); Bundle resp2 = myClient.search().byUrl(nextLinkUrl).returnBundle(Bundle.class).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp2)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp2));
myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem(); myStaleSearchDeletingSvc.pollForStaleSearchesAndDeleteThem();

View File

@ -356,7 +356,7 @@ public class SystemProviderR4Test extends BaseJpaR4Test {
req.setType(BundleType.TRANSACTION); req.setType(BundleType.TRANSACTION);
req.addEntry().getRequest().setMethod(HTTPVerb.GET).setUrl("Patient?_summary=count"); req.addEntry().getRequest().setMethod(HTTPVerb.GET).setUrl("Patient?_summary=count");
Bundle resp = myClient.transaction().withBundle(req).execute(); Bundle resp = myClient.transaction().withBundle(req).execute();
ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(1, resp.getEntry().size()); assertEquals(1, resp.getEntry().size());
Bundle respSub = (Bundle) resp.getEntry().get(0).getResource(); Bundle respSub = (Bundle) resp.getEntry().get(0).getResource();
@ -370,11 +370,11 @@ public class SystemProviderR4Test extends BaseJpaR4Test {
patient.addName().setFamily("Unique762"); patient.addName().setFamily("Unique762");
myPatientDao.create(patient, mySrd); myPatientDao.create(patient, mySrd);
Bundle resp1 = (Bundle) myClient.search().byUrl("Patient?name=Unique762&_summary=count").execute(); Bundle resp1 = (Bundle) myClient.search().byUrl("Patient?name=Unique762&_summary=count").execute();
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp1)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp1));
assertEquals(1, resp1.getTotal()); assertEquals(1, resp1.getTotal());
Bundle resp2 = (Bundle) myClient.search().byUrl("Patient?name=Unique762&_summary=count").execute(); Bundle resp2 = (Bundle) myClient.search().byUrl("Patient?name=Unique762&_summary=count").execute();
assertEquals(1, resp2.getTotal()); assertEquals(1, resp2.getTotal());
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp2)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp2));
} }
@Test @Test
@ -759,7 +759,7 @@ public class SystemProviderR4Test extends BaseJpaR4Test {
req.setType(BundleType.TRANSACTION); req.setType(BundleType.TRANSACTION);
req.addEntry().getRequest().setMethod(HTTPVerb.GET).setUrl("Patient?"); req.addEntry().getRequest().setMethod(HTTPVerb.GET).setUrl("Patient?");
Bundle resp = myClient.transaction().withBundle(req).execute(); Bundle resp = myClient.transaction().withBundle(req).execute();
ourLog.info(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(1, resp.getEntry().size()); assertEquals(1, resp.getEntry().size());
Bundle respSub = (Bundle) resp.getEntry().get(0).getResource(); Bundle respSub = (Bundle) resp.getEntry().get(0).getResource();
@ -980,7 +980,7 @@ public class SystemProviderR4Test extends BaseJpaR4Test {
.withParameters(input) .withParameters(input)
.execute(); .execute();
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
String jobId = BatchHelperR4.jobIdFromBatch2Parameters(response); String jobId = BatchHelperR4.jobIdFromBatch2Parameters(response);

View File

@ -159,7 +159,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test {
myDaoConfig.setMaximumSearchResultCountInTransaction(100); myDaoConfig.setMaximumSearchResultCountInTransaction(100);
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -182,7 +182,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test {
.setUrl("Patient?_count=5&_sort=name"); .setUrl("Patient?_count=5&_sort=name");
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -217,7 +217,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test {
} }
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(30, output.getEntry().size()); assertEquals(30, output.getEntry().size());
for (int i = 0; i < 30; i++) { for (int i = 0; i < 30; i++) {
@ -285,7 +285,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test {
.setUrl("MedicationRequest?intent=plan,order&medication.code=50580-0449-23&patient=P3000254749"); .setUrl("MedicationRequest?intent=plan,order&medication.code=50580-0449-23&patient=P3000254749");
Bundle resp = ourClient.transaction().withBundle(b).execute(); Bundle resp = ourClient.transaction().withBundle(b).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
b = (Bundle) resp.getEntry().get(0).getResource(); b = (Bundle) resp.getEntry().get(0).getResource();
assertEquals(1, b.getEntry().size()); assertEquals(1, b.getEntry().size());
assertEquals("MedicationRequest/MR635079", b.getEntry().get(0).getResource().getIdElement().toUnqualifiedVersionless().getValue()); assertEquals("MedicationRequest/MR635079", b.getEntry().get(0).getResource().getIdElement().toUnqualifiedVersionless().getValue());
@ -306,7 +306,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test {
myDaoConfig.setMaximumSearchResultCountInTransaction(100); myDaoConfig.setMaximumSearchResultCountInTransaction(100);
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -329,7 +329,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test {
.setUrl("Patient?_count=5&_sort=name"); .setUrl("Patient?_count=5&_sort=name");
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(1, output.getEntry().size()); assertEquals(1, output.getEntry().size());
Bundle respBundle = (Bundle) output.getEntry().get(0).getResource(); Bundle respBundle = (Bundle) output.getEntry().get(0).getResource();
@ -364,7 +364,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test {
} }
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newXmlParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(30, output.getEntry().size()); assertEquals(30, output.getEntry().size());
for (int i = 0; i < 30; i++) { for (int i = 0; i < 30; i++) {
@ -399,7 +399,7 @@ public class SystemProviderTransactionSearchR4Test extends BaseJpaR4Test {
.setUrl("/Medication?_include=Medication:ingredient"); .setUrl("/Medication?_include=Medication:ingredient");
Bundle output = ourClient.transaction().withBundle(input).execute(); Bundle output = ourClient.transaction().withBundle(input).execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
Resource resource = output.getEntry().get(0).getResource(); Resource resource = output.getEntry().get(0).getResource();
assertEquals(2, resource.getChildByName("entry").getValues().size()); assertEquals(2, resource.getChildByName("entry").getValues().size());
} }

View File

@ -603,7 +603,7 @@ public class StressTestR4Test extends BaseResourceProviderR4Test {
.withParameters(input) .withParameters(input)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
String jobId = BatchHelperR4.jobIdFromBatch2Parameters(response); String jobId = BatchHelperR4.jobIdFromBatch2Parameters(response);
myBatch2JobHelper.awaitJobHasStatus(jobId, 60, StatusEnum.COMPLETED); myBatch2JobHelper.awaitJobHasStatus(jobId, 60, StatusEnum.COMPLETED);
@ -645,7 +645,7 @@ public class StressTestR4Test extends BaseResourceProviderR4Test {
.withParameters(input) .withParameters(input)
.execute(); .execute();
ourLog.info(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response)); ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(response));
String jobId = BatchHelperR4.jobIdFromBatch2Parameters(response); String jobId = BatchHelperR4.jobIdFromBatch2Parameters(response);
myBatch2JobHelper.awaitJobCompletion(jobId); myBatch2JobHelper.awaitJobCompletion(jobId);

Some files were not shown because too many files have changed in this diff Show More