Commit cf4b4c9c authored by Franck Desaize's avatar Franck Desaize
Browse files

Fix issues with targetDomain in the case of empty list

parent 2b705d94
Pipeline #267555 passed with stages
in 13 minutes and 45 seconds
package net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.converter; package net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.converter;
import net.ihe.gazelle.app.patientregistryapi.business.*; import net.ihe.gazelle.app.patientregistryapi.business.Patient;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.GenderCodeDB; import net.ihe.gazelle.app.patientregistryapi.business.PatientAliases;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.PatientDB; import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.patient.PatientDB;
import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.references.CrossReferenceDB; import net.ihe.gazelle.app.patientregistryservice.adapter.dao.pamsimulator.model.references.CrossReferenceDB;
...@@ -20,7 +20,8 @@ public class PatientAliasesConverter { ...@@ -20,7 +20,8 @@ public class PatientAliasesConverter {
} }
/** /**
* Method to convert Patient Aliases to CrossReferenceDB * Method to convert Patient Aliases to CrossReferenceDB
*
* @param patientAliases Xref object to be converted * @param patientAliases Xref object to be converted
* @return CrossReferenceDB * @return CrossReferenceDB
*/ */
...@@ -39,7 +40,8 @@ public class PatientAliasesConverter { ...@@ -39,7 +40,8 @@ public class PatientAliasesConverter {
} }
/** /**
* Method to convert CrossReferenceDB to Patient Aliases * Method to convert CrossReferenceDB to Patient Aliases
*
* @param crossReferenceDB to be converted * @param crossReferenceDB to be converted
* @return PatientAliases * @return PatientAliases
*/ */
...@@ -59,10 +61,11 @@ public class PatientAliasesConverter { ...@@ -59,10 +61,11 @@ public class PatientAliasesConverter {
/** /**
* Convert a list of PatientAliases * Convert a list of PatientAliases
*
* @param crossReferenceDBS list to convert * @param crossReferenceDBS list to convert
* @return a List of PatientAliases * @return a List of PatientAliases
*/ */
public static List<PatientAliases> toListOfPatientAliases(List<CrossReferenceDB> crossReferenceDBS){ public static List<PatientAliases> toListOfPatientAliases(List<CrossReferenceDB> crossReferenceDBS) {
List<PatientAliases> patientAliases = new ArrayList<>(); List<PatientAliases> patientAliases = new ArrayList<>();
crossReferenceDBS.forEach(crossReference -> { crossReferenceDBS.forEach(crossReference -> {
PatientAliases patientAlias = toPatientAliases(crossReference); PatientAliases patientAlias = toPatientAliases(crossReference);
......
...@@ -17,7 +17,7 @@ public class TestClientWithUrl { ...@@ -17,7 +17,7 @@ public class TestClientWithUrl {
@Test @Test
void test() throws MalformedURLException { void test() throws MalformedURLException {
URL patientRegistryUrl = new URL("http://localhost:8580/patient-registry/CrossReferenceService/xref-processing-service?wsdl "); URL patientRegistryUrl = new URL("http://qualification.ihe-europe.net/patient-registry/CrossReferenceService/xref-processing-service?wsdl ");
XRefSearchClient xRefSearchClient = new XRefSearchClient(patientRegistryUrl); XRefSearchClient xRefSearchClient = new XRefSearchClient(patientRegistryUrl);
EntityIdentifier entityIdentifier = new EntityIdentifier(); EntityIdentifier entityIdentifier = new EntityIdentifier();
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<dependency.check.skip>true</dependency.check.skip> <dependency.check.skip>true</dependency.check.skip>
<cvss.score.level.tolerate>8</cvss.score.level.tolerate> <cvss.score.level.tolerate>8</cvss.score.level.tolerate>
<nexus.url>https://gazelle.ihe.net/nexus</nexus.url> <nexus.url>https://gazelle.ihe.net/nexus</nexus.url>
<nexus.path>/content/groups/public/</nexus.path> <nexus.path>/content/groups/public/</nexus.path>
<java.version>11</java.version> <java.version>11</java.version>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version> <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
...@@ -154,7 +155,7 @@ ...@@ -154,7 +155,7 @@
<plugin> <plugin>
<groupId>org.sonarsource.scanner.maven</groupId> <groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId> <artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.maven.plugin.version}</version> <version>${sonar.maven.plugin}</version>
<executions> <executions>
<execution> <execution>
<phase>verify</phase> <phase>verify</phase>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment