Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 713ec2c2 authored by pm's avatar pm
Browse files

Quality Gate done

parent 94c3203c
No related branches found
No related tags found
2 merge requests!5Release/2.0.0,!4Pixm
Pipeline #286068 failed
...@@ -179,16 +179,15 @@ public class PatientRegistryFeedClient { ...@@ -179,16 +179,15 @@ public class PatientRegistryFeedClient {
if (uuidDuplicated == null || uuidDuplicated.isBlank()) { if (uuidDuplicated == null || uuidDuplicated.isBlank()) {
throw new InvalidRequestException(INVALID_PARAMETERS); throw new InvalidRequestException(INVALID_PARAMETERS);
} }
Bundle response = new Bundle();
try { try {
Bundle response = new Bundle();
response.setId(client.mergePatient(uuidOriginal, uuidDuplicated)); response.setId(client.mergePatient(uuidOriginal, uuidDuplicated));
return response;
} catch (PatientFeedException e) { } catch (PatientFeedException e) {
logger.error("pouet pouet ciboulette"); treatClientBaseErrors(e);
throw new InternalErrorException("");
//TODO Map errors and delete the pouet pouet ciboulette comment
} }
return response;
} }
/** /**
...@@ -245,7 +244,7 @@ public class PatientRegistryFeedClient { ...@@ -245,7 +244,7 @@ public class PatientRegistryFeedClient {
* @param e the exception thrown * @param e the exception thrown
* @throws InternalErrorException throws back the exception with the right http code and the stack trace. * @throws InternalErrorException throws back the exception with the right http code and the stack trace.
*/ */
private void treatClientBaseErrors (Exception e) throws InternalErrorException{ private void treatClientBaseErrors (Exception e) {
switch(e.getMessage()) { switch(e.getMessage()) {
case "Exception while Mapping with GITB elements !": case "Exception while Mapping with GITB elements !":
throw new InternalErrorException("Exception while Mapping with GITB elements !", e); throw new InternalErrorException("Exception while Mapping with GITB elements !", e);
......
...@@ -199,27 +199,6 @@ public class ChPatientResourceProvider implements IResourceProvider { ...@@ -199,27 +199,6 @@ public class ChPatientResourceProvider implements IResourceProvider {
} }
} }
// @Update
// public MethodOutcome merge(@IdParam IdType theId, @ResourceParam Bundle iti93Bundle) {
// String uuid = theId.getIdPart();
// if (uuid.isBlank() || uuid == null) {
// patientLogger.error(NO_ID_PROVIDED);
// throw new InvalidRequestException(NO_ID_PROVIDED);
// }
// try {
// net.ihe.gazelle.app.patientregistryapi.business.Patient patientToMerge = BundleToPatientRegistryConverter.iti93BundleToPatient
// (iti93Bundle);
// MethodOutcome methodOutcome = new MethodOutcome();
// methodOutcome.setResource(patientRegistryFeedClient.mergePatient(uuid,"stringARemplacer"));
// return methodOutcome;
// } catch (ConversionException e) {
// throw new InvalidRequestException("Bundle Could not be converted to HL7 Patient");
// }catch (PatientFeedException e) {
// throw new InternalErrorException("Patient Feed client is not set");
// }
//
// }
/** /**
* Search method for a Patient using the source identifier required parameter * Search method for a Patient using the source identifier required parameter
* and an optional list of target system * and an optional list of target system
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment