Skip to content

Commit

Permalink
remove r4b #265
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveregger committed Sep 10, 2024
1 parent 0a6ddb2 commit d06b18c
Showing 1 changed file with 50 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,30 @@
*/
class FhirXVersTests {

static private MatchboxEngine engineR4B;
// static private MatchboxEngine engineR4B;
static private MatchboxEngine engineR4, engineR5;

private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(FhirMappingLanguageTests.class);

@BeforeAll
static void setUpBeforeClass() throws Exception {
engineR4 = new MatchboxEngineBuilder().withXVersion(true).getEngineR4();
engineR4B = new MatchboxEngineBuilder().withXVersion(true).getEngineR4B();
// engineR4B = new MatchboxEngineBuilder().withXVersion(true).getEngineR4B();
engineR5 = new MatchboxEngineBuilder().withXVersion(true).getEngineR5();
// optional, just for peformance reason
engineR4.cacheXVersionEngine(engineR4B);
// engineR4.cacheXVersionEngine(engineR4B);
engineR4.cacheXVersionEngine(engineR5);
engineR4B.cacheXVersionEngine(engineR4);
engineR4B.cacheXVersionEngine(engineR5);
// engineR4B.cacheXVersionEngine(engineR4);
// engineR4B.cacheXVersionEngine(engineR5);
engineR5.cacheXVersionEngine(engineR4);
engineR5.cacheXVersionEngine(engineR4B);
// engineR5.cacheXVersionEngine(engineR4B);
}

@AfterAll
static void teardownClass() throws Exception {
engineR4 = null;
engineR5 = null;
engineR4B = null;
// engineR4B = null;
CompareUtil.logMemory();
}

Expand Down Expand Up @@ -115,30 +115,30 @@ void testMedication5to4inR4() throws FHIRException, IOException {
CompareUtil.logMemory();
}

@Test
void testMedication5to4inR4B() throws FHIRException, IOException {
MatchboxEngine engine = FhirXVersTests.engineR4B;
SimpleWorkerContext context = engine.getContext();
assertEquals("4.3.0", engine.getVersion());
assertEquals("4.3.0", engine.getContext().getVersion());
assertNotNull(context.fetchResource(org.hl7.fhir.r5.model.Resource.class,
"http://hl7.org/fhir/StructureDefinition/Patient"));
assertNotNull(context.fetchResource(org.hl7.fhir.r5.model.Resource.class,
"http://hl7.org/fhir/uv/xver/StructureMap/Medication5to4"));
String result = engine.transform(getFileAsStringFromResources("/medication-r5-med0301.json"), true,
"http://hl7.org/fhir/uv/xver/StructureMap/Medication5to4", true);
log.info(result);
CompareUtil.compare(getFileAsStringFromResources("/medication-r4-med0301.json"), result, false);
}

@Test
void testMedication5to4BinR4B() throws FHIRException, IOException {
MatchboxEngine engine = FhirXVersTests.engineR4B;
String result = engine.transform(getFileAsStringFromResources("/medication-r5-med0301.json"), true,
"http://hl7.org/fhir/uv/xver/StructureMap/Medication5to4b", true);
log.info(result);
CompareUtil.compare(getFileAsStringFromResources("/medication-r4b-med0301.json"), result, false);
}
// @Test
// void testMedication5to4inR4B() throws FHIRException, IOException {
// MatchboxEngine engine = FhirXVersTests.engineR4B;
// SimpleWorkerContext context = engine.getContext();
// assertEquals("4.3.0", engine.getVersion());
// assertEquals("4.3.0", engine.getContext().getVersion());
// assertNotNull(context.fetchResource(org.hl7.fhir.r5.model.Resource.class,
// "http://hl7.org/fhir/StructureDefinition/Patient"));
// assertNotNull(context.fetchResource(org.hl7.fhir.r5.model.Resource.class,
// "http://hl7.org/fhir/uv/xver/StructureMap/Medication5to4"));
// String result = engine.transform(getFileAsStringFromResources("/medication-r5-med0301.json"), true,
// "http://hl7.org/fhir/uv/xver/StructureMap/Medication5to4", true);
// log.info(result);
// CompareUtil.compare(getFileAsStringFromResources("/medication-r4-med0301.json"), result, false);
// }

// @Test
// void testMedication5to4BinR4B() throws FHIRException, IOException {
// MatchboxEngine engine = FhirXVersTests.engineR4B;
// String result = engine.transform(getFileAsStringFromResources("/medication-r5-med0301.json"), true,
// "http://hl7.org/fhir/uv/xver/StructureMap/Medication5to4b", true);
// log.info(result);
// CompareUtil.compare(getFileAsStringFromResources("/medication-r4b-med0301.json"), result, false);
// }

@Test
void testMedication5to4inR5() throws FHIRException, IOException {
Expand Down Expand Up @@ -179,25 +179,25 @@ void testMedication4to5inR4() throws FHIRException, IOException {
CompareUtil.logMemory();
}

@Test
void testMedication4to5inR4B() throws FHIRException, IOException {
MatchboxEngine engine = FhirXVersTests.engineR4B;
String result = engine.transform(getFileAsStringFromResources("/medication-r4-med0301.json"),
true,
"http://hl7.org/fhir/uv/xver/StructureMap/Medication4to5", true);
CompareUtil.compare(getFileAsStringFromResources("/medication-r5-med0301.json"),
result, false);
}

@Test
void testMedication4Bto5inR4B() throws FHIRException, IOException {
MatchboxEngine engine = FhirXVersTests.engineR4B;
String result = engine.transform(getFileAsStringFromResources("/medication-r4b-med0301.json"),
true,
"http://hl7.org/fhir/uv/xver/StructureMap/Medication4Bto5", true);
CompareUtil.compare(getFileAsStringFromResources("/medication-r5-med0301.json"),
result, false);
}
// @Test
// void testMedication4to5inR4B() throws FHIRException, IOException {
// MatchboxEngine engine = FhirXVersTests.engineR4B;
// String result = engine.transform(getFileAsStringFromResources("/medication-r4-med0301.json"),
// true,
// "http://hl7.org/fhir/uv/xver/StructureMap/Medication4to5", true);
// CompareUtil.compare(getFileAsStringFromResources("/medication-r5-med0301.json"),
// result, false);
// }

// @Test
// void testMedication4Bto5inR4B() throws FHIRException, IOException {
// MatchboxEngine engine = FhirXVersTests.engineR4B;
// String result = engine.transform(getFileAsStringFromResources("/medication-r4b-med0301.json"),
// true,
// "http://hl7.org/fhir/uv/xver/StructureMap/Medication4Bto5", true);
// CompareUtil.compare(getFileAsStringFromResources("/medication-r5-med0301.json"),
// result, false);
// }

@Test
void testMedication4to5inR5() throws FHIRException, IOException {
Expand Down

0 comments on commit d06b18c

Please sign in to comment.