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
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2025 Release 4.0.16

- adapt test and map for (440)
Copy link

Choose a reason for hiding this comment

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

suggestion: Consider clarifying what '(440)' refers to in the changelog entry.

If '(440)' is an issue or ticket number, consider updating the entry to explicitly state this, such as 'for issue #440'.

Suggested change
- adapt test and map for (440)
- adapt test and map for issue #440


2025/11/03 Release 4.0.15

- Upgrade Tomcat to fix [CVE-2025-55752](https://github.com/advisories/GHSA-wmwf-9ccg-fff5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,23 @@
import org.hl7.fhir.r4.model.OperationOutcome;
import org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent;
import org.hl7.fhir.r4.model.Patient;
import org.hl7.fhir.r4.model.Resource;
import org.hl7.fhir.r4.model.StructureMap;
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
import org.hl7.fhir.r5.utils.EOperationOutcome;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;

import static org.junit.jupiter.api.Assertions.*;

import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.util.Calendar;
import java.util.spi.CalendarNameProvider;

class CdaToFhirTransformTests {

Expand Down Expand Up @@ -173,6 +169,12 @@ void TestInitial() throws FHIRException, IOException {
Composition composition = (Composition) resource.getEntryFirstRep().getResource();
assertNotNull(composition);
assertEquals("2022-03-30T11:24:26+01:00", composition.getDateElement().getValueAsString());
Patient patient = (Patient) resource.getEntry().stream()
.filter(e -> e.getResource() instanceof Patient)
.map(e -> e.getResource())
.findFirst()
.orElse(null);
assertEquals("058091", patient.getAddressFirstRep().getLine().getFirst().getExtension().getFirst().getValue().toString());
}

@Test
Expand Down
17 changes: 5 additions & 12 deletions matchbox-engine/src/test/resources/cda/datatypes.map
Original file line number Diff line number Diff line change
Expand Up @@ -198,18 +198,11 @@ group ADAddress(source src : AD, target tgt : Address) extends Any <<types>> {
item.county as v -> tgt.district = (v.xmlText);
item.city as v -> tgt.city = (v.xmlText);
item.postalCode as v -> tgt.postalCode = (v.xmlText);
item.streetAddressLine as v -> tgt.line=(v.xmlText);

item -> tgt.line as line then {
item where src.censusTract.exists() then {
item.censusTract as v -> line.extension as ext1 then CensusTract(v, ext1) "line";
}"sfgfdsg";
} "CensusTract";

//share firstline "streetAddress";
//as streetAddress then{
//src.censusTract as v->tgt.line as line, line.extension as ext1 then CensusTract(v, ext1) "line";
//src.censusTract as v ->tgt.line as line, line.extension as ext1 then CensusTract(v, ext1) "line";
item.streetAddressLine as v -> tgt.line=(v.xmlText) as line then {
src.item as item2 then {
item2.censusTract as v -> line.extension as ext1 then CensusTract(v, ext1) "line";
} "innercensus";
} "item2";
item.streetName as v -> tgt.line = (v.xmlText);
item.houseNumber as v -> tgt.line = (v.xmlText);
} "item";
Expand Down