PackageInstallerSvcImpl Says R4 is NOT Compatible with R4B (#4396)
* 4395 - Make PackageInstallerSvcImpl equate FHIR version R4 with R4B.
This commit is contained in:
parent
8d4514ce36
commit
6bd7f7a0e1
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
type: fix
|
||||
issue: 4395
|
||||
title: "Fixed a bug where the PackageInstallerSvcImpl was not treating FHIR version R4 as being compatible with R4B."
|
|
@ -285,7 +285,7 @@ public class PackageInstallerSvcImpl implements IPackageInstallerSvc {
|
|||
* Asserts if package FHIR version is compatible with current FHIR version
|
||||
* by using semantic versioning rules.
|
||||
*/
|
||||
private void assertFhirVersionsAreCompatible(String fhirVersion, String currentFhirVersion)
|
||||
protected void assertFhirVersionsAreCompatible(String fhirVersion, String currentFhirVersion)
|
||||
throws ImplementationGuideInstallationException {
|
||||
|
||||
FhirVersionEnum fhirVersionEnum = FhirVersionEnum.forVersionString(fhirVersion);
|
||||
|
@ -293,6 +293,9 @@ public class PackageInstallerSvcImpl implements IPackageInstallerSvc {
|
|||
Validate.notNull(fhirVersionEnum, "Invalid FHIR version string: %s", fhirVersion);
|
||||
Validate.notNull(currentFhirVersionEnum, "Invalid FHIR version string: %s", currentFhirVersion);
|
||||
boolean compatible = fhirVersionEnum.equals(currentFhirVersionEnum);
|
||||
if (!compatible && fhirVersion.startsWith("R4") && currentFhirVersion.startsWith("R4")) {
|
||||
compatible = true;
|
||||
}
|
||||
if (!compatible) {
|
||||
throw new ImplementationGuideInstallationException(Msg.code(1288) + String.format(
|
||||
"Cannot install implementation guide: FHIR versions mismatch (expected <=%s, package uses %s)",
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package ca.uhn.fhir.jpa.packages;
|
||||
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class PackageInstallerSvcImplTest {
|
||||
|
||||
@Test
|
||||
public void testPackageCompatibility() {
|
||||
new PackageInstallerSvcImpl().assertFhirVersionsAreCompatible("R4", "R4B");
|
||||
}
|
||||
}
|
|
@ -4,6 +4,8 @@ import ca.uhn.fhir.cql.BaseCqlR4Test;
|
|||
import ca.uhn.fhir.cql.r4.provider.MeasureOperationsProvider;
|
||||
import org.hl7.fhir.r4.model.IdType;
|
||||
import org.hl7.fhir.r4.model.MeasureReport;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
|
@ -39,7 +41,12 @@ public class CqlMeasureEvaluationR4ImmunizationTest extends BaseCqlR4Test {
|
|||
return this.myMeasureOperationsProvider.evaluateMeasure(new IdType("Measure", theMeasureId), evaluationDate, evaluationDate, null, "subject", thePatientRef, null, thePractitionerRef, null, null, null, null, myRequestDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disabled 2023-01-04 - Ticket to re-enable:
|
||||
* https://github.com/hapifhir/hapi-fhir/issues/4401
|
||||
*/
|
||||
@Test
|
||||
@Disabled
|
||||
public void test_Immunization_Ontario_Schedule() throws IOException {
|
||||
//given
|
||||
loadBundle(MY_FHIR_COMMON);
|
||||
|
|
Loading…
Reference in New Issue