Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ public FHIRSearchContext parseQueryParameters(Class<?> resourceType, Map<String,
if (queryParameters.containsKey(SearchConstants.RESOURCE_TYPE)) {
// process all the _type parameters
for (String v: queryParameters.get(SearchConstants.RESOURCE_TYPE)) {
List<String> tmpResourceTypes = Arrays.asList(v.split("\\s*,\\s*"));
List<String> tmpResourceTypes = Arrays.stream(v.split(","))
.map(s -> s.trim())
.collect(Collectors.toList());
for (String tmpResourceType: tmpResourceTypes) {
if (!ModelSupport.isConcreteResourceType(tmpResourceType)) {
String msg = "_type parameter has invalid resource type: " + Encode.forHtml(tmpResourceType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,12 +548,12 @@ private void addExecutionResponse(PollingLocationResponse pollingLocationRespons

// Export Jobs with data in the exitStatus field
if (!"COMPLETED".equals(exitStatus) && !"bulkimportchunkjob".equals(executionResponse.getJobName())) {
List<String> resourceTypeInfs = Arrays.asList(exitStatus.split("\\s*:\\s*"));
List<String> resourceTypeInfs = Arrays.asList(exitStatus.split(":"));
List<PollingLocationResponse.Output> outputList = new ArrayList<>();
for (String resourceTypeInf : resourceTypeInfs) {
String resourceType = resourceTypeInf.substring(0, resourceTypeInf.indexOf("["));
String[] resourceCounts =
resourceTypeInf.substring(resourceTypeInf.indexOf("[") + 1, resourceTypeInf.indexOf("]")).split("\\s*,\\s*");
resourceTypeInf.substring(resourceTypeInf.indexOf("[") + 1, resourceTypeInf.indexOf("]")).split(",");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to assume here that there's no trimming required, right?

Copy link
Copy Markdown
Member Author

@lmsurpre lmsurpre Sep 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i tried to cover that in the commit message:

In BulkDataClient.addExecutionResponse we're parsing our own output...there's no reason to expect whitespace.

to test it, I did an export of multiple resource types and changed the config to ensure that we end up with multiple files/objects for at least one of those resource types

for (int i = 0; i < resourceCounts.length; i++) {
StorageType storageType = adapter.getStorageProviderStorageType(source);
String sUrl;
Expand Down