Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
JPercival committed Nov 28, 2023
1 parent b0cd33d commit 9026e7f
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
package org.opencds.cqf.tooling.processor;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;

import javax.annotation.Nullable;

import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.model.api.IFhirVersion;
import org.apache.commons.io.FilenameUtils;
import org.hl7.fhir.Patient;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.r4.model.CanonicalType;
import org.hl7.fhir.r4.model.Group;
import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.Reference;
import org.opencds.cqf.tooling.utilities.BundleUtils;
import org.opencds.cqf.tooling.utilities.IOUtils;
import org.opencds.cqf.tooling.utilities.LogUtils;
import org.opencds.cqf.tooling.utilities.ResourceUtils;

import ca.uhn.fhir.context.FhirContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.model.api.IFhirVersion;

public class TestCaseProcessor
{
private static final Logger logger = LoggerFactory.getLogger(TestCaseProcessor.class);
Expand Down Expand Up @@ -79,7 +79,7 @@ public void refreshTestCases(String path, IOUtils.Encoding encoding, FhirContext
// Handle bundled resources when that is how they are provided
if ((resource.fhirType() == "Bundle") && (version.getVersion() == FhirVersionEnum.R4)) {
org.hl7.fhir.r4.model.Bundle bundle = (org.hl7.fhir.r4.model.Bundle) resource;
ArrayList<org.hl7.fhir.r4.model.Resource> bundleResources =
var bundleResources =
BundleUtils.getR4ResourcesFromBundle(bundle);
for (IBaseResource bundleResource : bundleResources) {
if (bundleResource.fhirType() == "Patient") {
Expand Down Expand Up @@ -125,12 +125,12 @@ private void addPatientToGroupR4(Group group, org.hl7.fhir.r4.model.Patient pati
public static List<IBaseResource> getTestCaseResources(String path, FhirContext fhirContext)
{
List<IBaseResource> resources = new ArrayList<IBaseResource>();
List<String> testCasePaths = IOUtils.getDirectoryPaths(path, false);
List<String> testCasePaths = IOUtils.getDirectoryPaths(path, false);
for (String testCasePath : testCasePaths) {
List<String> paths = IOUtils.getFilePaths(testCasePath, true);
resources.addAll(ensureIds(testCasePath, IOUtils.readResources(paths, fhirContext)));
}
return resources;
}
return resources;
}

private static List<IBaseResource> ensureIds(String baseId, List<IBaseResource> resources) {
Expand Down Expand Up @@ -207,7 +207,7 @@ public static void bundleTestCaseFiles(String igPath, String contextResourceType
IOUtils.copyFile(testContentPath, bundleTestContentDestPath);
}
}
}
}
}
}
}

0 comments on commit 9026e7f

Please sign in to comment.