Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible duplication of resources on conditional create/update #4598

Open
wants to merge 71 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
078dcd9
One more fix for #4467
jamesagnew Jan 26, 2023
1a9b749
Enabling massIngestionMode causes incomplete resource deletion (#4476)
epeartree Jan 30, 2023
40508a0
Provide the capability to request that the name of the subscription m…
epeartree Jan 30, 2023
882f22f
Change visibility of migration method (#4471)
nathandoef Jan 31, 2023
67ace43
Fix subscription validation not to validate partition ID when invoked…
lukedegruchy Jan 31, 2023
dd8c8a3
Reindex batch job fails when processing deleted resources. (#4482)
epeartree Feb 1, 2023
efae3b5
cleaning up checkstyle files (#4470)
markiantorno Feb 1, 2023
b1770ab
Bump core to 5.6.881 (#4496)
dotasek Feb 2, 2023
0a213a5
Issue 4486 mdm inconsistent possible match score values (#4487)
jmarchionatto Feb 2, 2023
740fec9
Revert "cleaning up checkstyle files (#4470)"
markiantorno Feb 2, 2023
c642853
core version fix
markiantorno Feb 2, 2023
a855af5
Loosen rules for id helper
tadgh Feb 2, 2023
df83d05
Merge branch 'rel_6_4' of github.com:hapifhir/hapi-fhir into rel_6_4
tadgh Feb 2, 2023
7d554d5
License
tadgh Feb 3, 2023
0996124
fix batch2 reduction step (#4499)
TipzCM Feb 3, 2023
2a963ac
Scheduled batch 2 bulk export job and binary delete (#4492)
lukedegruchy Feb 6, 2023
33f6ed3
Change bulk import test for valueUri type (#4503)
samguntersmilecdr Feb 6, 2023
e160325
CVE resolutions (#4513)
tadgh Feb 6, 2023
d08995a
Add check in scanner (#4518)
tadgh Feb 7, 2023
ca21abf
4516 create hapi fhir cli command to clear stale lock entries (#4517)
tadgh Feb 7, 2023
85ecbf1
Unable to Expunge CodeSystem (#4507)
isaacwen Feb 7, 2023
e724040
New line::
tadgh Feb 8, 2023
697bd27
Update to documentation regarding narrative generation; (#4521)
epeartree Feb 8, 2023
f321573
changed what score is set for mdmlinks that created new golden resour…
longma1 Feb 8, 2023
71ea1b4
REVERT: change to operationoutcome.html
tadgh Feb 8, 2023
6b3b954
trying to fix BulkDataExportTest testGroupBulkExportNotInGroup_DoesNo…
TipzCM Feb 8, 2023
b4778f4
fix build (#4530)
nathandoef Feb 9, 2023
3d9a318
Making narrative_generation.md reference an html snippet (#4531)
epeartree Feb 9, 2023
53252b8
fixed the issue of meta.source field inconsistently populated in subs…
Qingyixia Feb 9, 2023
fe078c2
4441 rel 6 4 bad references creation bug (#4519)
TipzCM Feb 9, 2023
f3847b1
fixed channel import null pointer exception from null header (#4534)
samguntersmilecdr Feb 9, 2023
e99aebd
Revert "fixed the issue of meta.source field inconsistently populated…
tadgh Feb 9, 2023
03ccf3e
Better error handling for when channel type is not supported (#4538)
KGJ-software Feb 10, 2023
fb0512f
Avoid logging message payloads that contain sensitive data (#4537)
michaelabuckley Feb 10, 2023
9754a72
Bulk Export Bug With Many Resources and Low Max File Size (#4506)
nathandoef Feb 10, 2023
9578610
bump ver
tadgh Feb 11, 2023
a0e4c29
License updates'
tadgh Feb 11, 2023
acfde15
Downgrade dep'
tadgh Feb 14, 2023
b2644c1
Updating version to: 6.4.1 post release.
markiantorno Feb 16, 2023
f08823b
Add javadocs and sources to our serviceloaders
tadgh Feb 17, 2023
384bea1
Merge branch 'rel_6_4' of github.com:hapifhir/hapi-fhir into rel_6_4
tadgh Feb 17, 2023
96855fb
Reset version
tadgh Feb 17, 2023
529e478
Change parent
tadgh Feb 17, 2023
23b7acf
Remove bumped version
tadgh Feb 17, 2023
71fa4f2
License fixes, new parent
tadgh Feb 17, 2023
827bbba
Updating version to: 6.4.1 post release.
markiantorno Feb 17, 2023
6b6f1e2
Fix bad creation of versionenum
tadgh Feb 17, 2023
8698abf
typedbundleprovider getallresources override (#4552)
Capt-Mac Feb 16, 2023
bbe437a
Add backport info
tadgh Feb 23, 2023
2c34bf0
Upgrade core to 5.6.97, make adjustments in hapi-fhir, and ensure tha…
lukedegruchy Feb 23, 2023
baa494c
Fix up dal test
tadgh Feb 24, 2023
b2ebdec
Address leftover code review feedback from the upgrade to core 5.6.97…
lukedegruchy Feb 24, 2023
eee6128
Exclude pinned core deps
tadgh Feb 24, 2023
4af1a50
Force pin structs
tadgh Feb 24, 2023
9ede6b3
Add model changes to IBaseCoding and related changes (#4587)
lukedegruchy Feb 24, 2023
9fe44ee
Fix changelog
tadgh Feb 24, 2023
79692df
Tidy metadata
tadgh Feb 24, 2023
d192bce
Disable intermittently failing tests. (#4593)
lukedegruchy Feb 25, 2023
d4a5153
rename tests to IT
tadgh Feb 25, 2023
2d4b8d9
Disable more intermittently failing tests (#4595)
lukedegruchy Feb 25, 2023
0ada4e7
ITify
tadgh Feb 25, 2023
97d6e30
Merge branch 'rel_6_4' of github.com:hapifhir/hapi-fhir into rel_6_4
tadgh Feb 25, 2023
6915b85
Disable yet another intermittently failing tests. (#4596)
lukedegruchy Feb 25, 2023
bd83f33
disable
tadgh Feb 25, 2023
49c548d
disables
tadgh Feb 26, 2023
b227005
Merge branch 'rel_6_4' of github.com:hapifhir/hapi-fhir into rel_6_4
tadgh Feb 26, 2023
69f2527
disables
tadgh Feb 26, 2023
31610cd
Updating version to: 6.4.2 post release.
markiantorno Feb 26, 2023
e14b289
fix version
tadgh Feb 27, 2023
1b549d8
Creating test to reproduce the issue.
Feb 27, 2023
4840a73
partial solution implementation.
Feb 27, 2023
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
Prev Previous commit
Next Next commit
Upgrade core to 5.6.97, make adjustments in hapi-fhir, and ensure tha…
…t all tests pass (#4579)

* First commit:  Create new branch from the release branch with changes from James' branch.  This probably won't compile as the work is incomplete.

* Second round of changes from integrating James' branch.

* Mark most test failures with TODOs.

* Add whitespace

* Add changes to FhirPathR4 to set FHIRPathEngine to non-strict FP evaluation.

* Fix CreatePackageCommandTest to assert null instead of empty string.  Comments on tests that fail due to the double-quote encoding problem.

* Downgrade to core 5.6.97.

* Fix another test and remove TODOs.

* Fix changelog.

* Clean up some erroneous changes and TODOs.

---------

Co-authored-by: Tadgh <[email protected]>
  • Loading branch information
lukedegruchy and tadgh committed Feb 23, 2023
commit 2c34bf074fec3dca7b29335e6eb4383b25626a65
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ private void initializeResourceLists() {
structureDefinitionResources.add("/org/hl7/fhir/r4/model/profile/profiles-others.xml");
structureDefinitionResources.add("/org/hl7/fhir/r4/model/extension/extension-definitions.xml");
break;
case R4B:
terminologyResources.add("/org/hl7/fhir/r4b/model/valueset/valuesets.xml");
terminologyResources.add("/org/hl7/fhir/r4b/model/valueset/v2-tables.xml");
terminologyResources.add("/org/hl7/fhir/r4b/model/valueset/v3-codesystems.xml");
structureDefinitionResources.add("/org/hl7/fhir/r4b/model/profile/profiles-resources.xml");
structureDefinitionResources.add("/org/hl7/fhir/r4b/model/profile/profiles-types.xml");
structureDefinitionResources.add("/org/hl7/fhir/r4b/model/profile/profiles-others.xml");
structureDefinitionResources.add("/org/hl7/fhir/r4b/model/extension/extension-definitions.xml");
break;
case R5:
structureDefinitionResources.add("/org/hl7/fhir/r5/model/profile/profiles-resources.xml");
structureDefinitionResources.add("/org/hl7/fhir/r5/model/profile/profiles-types.xml");
Expand Down Expand Up @@ -221,15 +230,41 @@ private IBaseResource fetchCodeSystemOrValueSet(String theSystem, boolean codeSy
@Override
public IBaseResource fetchStructureDefinition(String theUrl) {
String url = theUrl;
if (url.startsWith(URL_PREFIX_STRUCTURE_DEFINITION)) {
// no change
} else if (url.indexOf('/') == -1) {
url = URL_PREFIX_STRUCTURE_DEFINITION + url;
} else if (StringUtils.countMatches(url, '/') == 1) {
url = URL_PREFIX_STRUCTURE_DEFINITION_BASE + url;
if (!url.startsWith(URL_PREFIX_STRUCTURE_DEFINITION)) {
if (url.indexOf('/') == -1) {
url = URL_PREFIX_STRUCTURE_DEFINITION + url;
} else if (StringUtils.countMatches(url, '/') == 1) {
url = URL_PREFIX_STRUCTURE_DEFINITION_BASE + url;
}
}
Map<String, IBaseResource> structureDefinitionMap = provideStructureDefinitionMap();
return structureDefinitionMap.get(url);
IBaseResource retVal = structureDefinitionMap.get(url);
if (retVal == null) {

if (url.startsWith(URL_PREFIX_STRUCTURE_DEFINITION)) {

/*
* A few built-in R4 SearchParameters have the wrong casing for primitive
* search parameters eg "value.as(String)" when it should be
* "value.as(string)". This lets us be a bit lenient about this.
*/
if (myCtx.getVersion().getVersion() == FhirVersionEnum.R4 || myCtx.getVersion().getVersion() == FhirVersionEnum.R4B || myCtx.getVersion().getVersion() == FhirVersionEnum.R5) {
String end = url.substring(URL_PREFIX_STRUCTURE_DEFINITION.length());
if (Character.isUpperCase(end.charAt(0))) {
String newEnd = Character.toLowerCase(end.charAt(0)) + end.substring(1);
String alternateUrl = URL_PREFIX_STRUCTURE_DEFINITION + newEnd;
retVal = structureDefinitionMap.get(alternateUrl);
if (retVal != null) {
retVal = myCtx.newTerser().clone(retVal);
myCtx.newTerser().setElement(retVal, "type", end);
}
}
}

}

}
return retVal;
}

@Override
Expand Down
5 changes: 5 additions & 0 deletions hapi-fhir-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>hapi-fhir-validation-resources-r4b</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>hapi-fhir-validation-resources-r5</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void testCreatePackage() throws IOException {
{
"name" : "com.example.ig",
"version" : "1.0.1",
"description" : "",
"description" : null,
"fhirVersions" : ["4.0.1"],
"dependencies" : {
"hl7.fhir.core" : "4.0.1",
Expand Down Expand Up @@ -158,7 +158,7 @@ public void testCreatePackage_NoDependencies() throws IOException {
{
"name" : "com.example.ig",
"version" : "1.0.1",
"description" : "",
"description" : null,
"fhirVersions" : ["4.0.1"]
}
""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,43 +197,49 @@ public void setLogger(Logger theLogger) {
/**
* Should a summary (one line) for each request be logged, containing the URL and other information
*/
public void setLogRequestBody(boolean theValue) {
public LoggingInterceptor setLogRequestBody(boolean theValue) {
myLogRequestBody = theValue;
return this;
}

/**
* Should headers for each request be logged, containing the URL and other information
*/
public void setLogRequestHeaders(boolean theValue) {
public LoggingInterceptor setLogRequestHeaders(boolean theValue) {
myLogRequestHeaders = theValue;
return this;
}

/**
* Should a summary (one line) for each request be logged, containing the URL and other information
*/
public void setLogRequestSummary(boolean theValue) {
public LoggingInterceptor setLogRequestSummary(boolean theValue) {
myLogRequestSummary = theValue;
return this;
}

/**
* Should a summary (one line) for each request be logged, containing the URL and other information
*/
public void setLogResponseBody(boolean theValue) {
public LoggingInterceptor setLogResponseBody(boolean theValue) {
myLogResponseBody = theValue;
return this;
}

/**
* Should headers for each request be logged, containing the URL and other information
*/
public void setLogResponseHeaders(boolean theValue) {
public LoggingInterceptor setLogResponseHeaders(boolean theValue) {
myLogResponseHeaders = theValue;
return this;
}

/**
* Should a summary (one line) for each request be logged, containing the URL and other information
*/
public void setLogResponseSummary(boolean theValue) {
public LoggingInterceptor setLogResponseSummary(boolean theValue) {
myLogResponseSummary = theValue;
return this;
}

}
5 changes: 5 additions & 0 deletions hapi-fhir-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r4b</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: fix
issue: 4582
title: "Upgrade dependency on core to 5.6.97 including hapi-fhir code enhancements and unit test fixes."
5 changes: 5 additions & 0 deletions hapi-fhir-jpaserver-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r4b</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r5</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import ca.uhn.fhir.jpa.packages.loader.PackageLoaderSvc;
import ca.uhn.fhir.jpa.packages.loader.PackageResourceParsingSvc;
import org.hl7.fhir.utilities.npm.PackageClient;
import org.hl7.fhir.utilities.npm.PackageServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand All @@ -34,8 +35,8 @@ public class PackageLoaderConfig {
public PackageLoaderSvc packageLoaderSvc() {
PackageLoaderSvc svc = new PackageLoaderSvc();
svc.getPackageServers().clear();
svc.getPackageServers().add(PackageClient.PRIMARY_SERVER);
svc.getPackageServers().add(PackageClient.SECONDARY_SERVER);
svc.getPackageServers().add(PackageServer.primaryServer());
svc.getPackageServers().add(PackageServer.secondaryServer());
return svc;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public CodeValidationResult validateCode(IIdType theCodeSystemId, IPrimitiveType
String codeSystemUrl;
if (theCodeSystemId != null) {
IBaseResource codeSystem = read(theCodeSystemId, theRequestDetails);
codeSystemUrl = CommonCodeSystemsTerminologyService.getCodeSystemUrl(codeSystem);
codeSystemUrl = CommonCodeSystemsTerminologyService.getCodeSystemUrl(myFhirContext, codeSystem);
} else if (isNotBlank(toStringValue(theCodeSystemUrl))) {
codeSystemUrl = toStringValue(theCodeSystemUrl);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ public IValidationSupport.CodeValidationResult validateCode(IPrimitiveType<Strin
String valueSetIdentifier;
if (theValueSetId != null) {
IBaseResource valueSet = read(theValueSetId, theRequestDetails);
StringBuilder valueSetIdentifierBuilder = new StringBuilder(CommonCodeSystemsTerminologyService.getValueSetUrl(valueSet));
String valueSetVersion = CommonCodeSystemsTerminologyService.getValueSetVersion(valueSet);
StringBuilder valueSetIdentifierBuilder = new StringBuilder(CommonCodeSystemsTerminologyService.getValueSetUrl(myFhirContext, valueSet));
String valueSetVersion = CommonCodeSystemsTerminologyService.getValueSetVersion(myFhirContext, valueSet);
if (valueSetVersion != null) {
valueSetIdentifierBuilder.append("|").append(valueSetVersion);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.hl7.fhir.utilities.npm.BasePackageCacheManager;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.npm.PackageServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -129,9 +130,9 @@ public class JpaPackageCache extends BasePackageCacheManager implements IHapiPac
private IBinaryStorageSvc myBinaryStorageSvc;

@Override
public void addPackageServer(@Nonnull String theUrl) {
public void addPackageServer(@Nonnull PackageServer thePackageServer) {
assert myPackageLoaderSvc != null;
myPackageLoaderSvc.addPackageServer(theUrl);
myPackageLoaderSvc.addPackageServer(thePackageServer);
}

@Override
Expand All @@ -150,7 +151,7 @@ public String getPackageUrl(String theS) throws IOException {
}

@Override
public List<String> getPackageServers() {
public List<PackageServer> getPackageServers() {
return myPackageLoaderSvc.getPackageServers();
}

Expand Down
5 changes: 5 additions & 0 deletions hapi-fhir-jpaserver-searchparam/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r4b</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r5</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@
import static ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum.REFERENCE;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import static org.apache.commons.lang3.StringUtils.startsWith;
import static org.apache.commons.lang3.StringUtils.trim;

// TODO: come back to this and scrutinize the changes James did to this class
public abstract class BaseSearchParamExtractor implements ISearchParamExtractor {

public static final Set<String> COORDS_INDEX_PATHS;
Expand Down Expand Up @@ -1300,7 +1302,30 @@ private void addString_Address(String theResourceType, Set<ResourceIndexedSearch

}

private <T> SearchParamSet<T> extractSearchParams(IBaseResource theResource, IExtractor<T> theExtractor, RestSearchParameterTypeEnum theSearchParamType, boolean theWantLocalReferences) {
/**
* Ignore any of the Resource-level search params. This is kind of awkward, but here is why
* we do it:
* <p>
* The ReadOnlySearchParamCache supplies these params, and they have paths associated with
* them. E.g. HAPI's SearchParamRegistryImpl will know about the _id search parameter and
* assigns it the path "Resource.id". All of these parameters have indexing code paths in the
* server that don't rely on the existence of the SearchParameter. For example, we have a
* dedicated column on ResourceTable that handles the _id parameter.
* <p>
* Until 6.2.0 the FhirPath evaluator didn't actually resolve any values for these paths
* that started with Resource instead of the actual resource name, so it never actually
* made a difference that these parameters existed because they'd never actually result
* in any index rows. In 6.4.0 that bug was fixed in the core FhirPath engine. We don't
* want that fix to result in pointless index rows for things like _id and _tag, so we
* ignore them here.
* <p>
* Note that you can still create a search parameter that includes a path like
* "meta.tag" if you really need to create an SP that actually does index _tag. This
* is needed if you want to search for tags in <code>INLINE</code> tag storage mode.
* This is the only way you could actually specify a FhirPath expression for those
* prior to 6.2.0 so this isn't a breaking change.
*/
<T> SearchParamSet<T> extractSearchParams(IBaseResource theResource, IExtractor<T> theExtractor, RestSearchParameterTypeEnum theSearchParamType, boolean theWantLocalReferences) {
SearchParamSet<T> retVal = new SearchParamSet<>();

Collection<RuntimeSearchParam> searchParams = getSearchParams(theResource);
Expand All @@ -1312,6 +1337,11 @@ private <T> SearchParamSet<T> extractSearchParams(IBaseResource theResource, IEx
continue;
}

// See the method javadoc for an explanation of this
if (startsWith(nextSpDef.getPath(), "Resource.")) {
continue;
}

extractSearchParam(nextSpDef, theResource, theExtractor, retVal, theWantLocalReferences);
}
return retVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r4.context.IWorkerContext;
import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r4.utils.FHIRPathEngine;
import org.hl7.fhir.r4.model.Base;
import org.hl7.fhir.r4.model.ExpressionNode;
import org.hl7.fhir.r4.model.IdType;
Expand Down Expand Up @@ -133,7 +134,7 @@ public List<Base> executeFunction(Object appContext, List<Base> focus, String fu


@Override
public Base resolveReference(Object theAppContext, String theUrl) throws FHIRException {
public Base resolveReference(Object theAppContext, String theUrl, Base theRefContext) throws FHIRException {

/*
* When we're doing resolution within the SearchParamExtractor, if we want
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public static ReadOnlySearchParamCache fromFhirContext(@Nonnull FhirContext theF
IBaseBundle allSearchParameterBundle = null;
if (theFhirContext.getVersion().getVersion() == FhirVersionEnum.R4) {
allSearchParameterBundle = (IBaseBundle) theFhirContext.newJsonParser().parseResource(ClasspathUtil.loadResourceAsStream("org/hl7/fhir/r4/model/sp/search-parameters.json"));
} else if (theFhirContext.getVersion().getVersion() == FhirVersionEnum.R4B) {
allSearchParameterBundle = (IBaseBundle) theFhirContext.newXmlParser().parseResource(ClasspathUtil.loadResourceAsStream("org/hl7/fhir/r4b/model/sp/search-parameters.xml"));
} else if (theFhirContext.getVersion().getVersion() == FhirVersionEnum.R5) {
allSearchParameterBundle = (IBaseBundle) theFhirContext.newXmlParser().parseResource(ClasspathUtil.loadResourceAsStream("org/hl7/fhir/r5/model/sp/search-parameters.xml"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public RuntimeSearchParam canonicalizeSearchParameter(IBaseResource theSearchPar
retVal = canonicalizeSearchParameterDstu3((org.hl7.fhir.dstu3.model.SearchParameter) theSearchParameter);
break;
case R4:
case R4B:
case R5:
retVal = canonicalizeSearchParameterR4Plus(theSearchParameter);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r4.model.Patient;
import org.hl7.fhir.utilities.npm.IPackageCacheManager;
import org.hl7.fhir.utilities.npm.PackageServer;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -75,7 +76,7 @@ public void before() throws Exception {

myPort = JettyUtil.getPortForStartedServer(myServer);
jpaPackageCache.getPackageServers().clear();
jpaPackageCache.addPackageServer("http:https://localhost:" + myPort);
jpaPackageCache.addPackageServer(new PackageServer("http:https://localhost:" + myPort));

myFakeNpmServlet.getResponses().clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.hl7.fhir.dstu3.model.OperationOutcome;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.utilities.npm.PackageServer;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -61,7 +62,7 @@ public void before() throws Exception {

int port = JettyUtil.getPortForStartedServer(myServer);
jpaPackageCache.getPackageServers().clear();
jpaPackageCache.addPackageServer("http:https://localhost:" + port);
jpaPackageCache.addPackageServer(new PackageServer("http:https://localhost:" + port));

myResponses.clear();
}
Expand Down
Loading