Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 5cb23253 authored by Wylem Bars's avatar Wylem Bars

PATREG-33 | Quick Fix to avoid pushing Patients Multiple times in DB

parent 2a5ecbf6
Pipeline #138299 failed with stages
in 3 minutes and 50 seconds
......@@ -117,12 +117,14 @@ public class SearchExecutionStepDefinition {
*/
@Given("patient is fed with provisional uuid {string}")
public void patient_is_fed_with_uuid(String uuid) throws PatientFeedException {
Patient patient = getExistingPatientWithUUID(uuid);
if (patient != null) {
String realUuid = patientFeedClient.feedPatient(patient);
uuidOfFedPatients.put(uuid, realUuid);
} else {
throw new IllegalArgumentException(String.format("No patient existing with UUID %s !", uuid));
if (System.getProperty("Fed") == null) {
Patient patient = getExistingPatientWithUUID(uuid);
if (patient != null) {
String realUuid = patientFeedClient.feedPatient(patient);
uuidOfFedPatients.put(uuid, realUuid);
} else {
throw new IllegalArgumentException(String.format("No patient existing with UUID %s !", uuid));
}
}
}
......@@ -244,6 +246,7 @@ public class SearchExecutionStepDefinition {
*/
@When("search is done")
public void search_is_done() {
System.setProperty("Fed", "OK");
try {
searchedPatients = patientSearchClient.search(this.searchCriteria);
} catch (Exception e) {
......
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