Commit 51e2b00f authored by Franck Desaize's avatar Franck Desaize
Browse files

PATREG-162/125

parent 4d708457
Pipeline #262156 failed with stages
in 10 minutes and 27 seconds
......@@ -45,7 +45,7 @@ public class CrossReferenceSearchProcessingService {
* @return ProcessResponse corresponding to the received request
*/
public ProcessResponse processPatientCrossReferenceSearch(ProcessRequest processRequest) {
PatientAliases patient;
PatientAliases patientAliases;
List<AnyContent> searchParameter = processRequest.getInput();
if (searchParameter.size() != 1) {
throw new IllegalArgumentException("ProcessRequest.input shall contain one and only one patient !");
......@@ -55,8 +55,8 @@ public class CrossReferenceSearchProcessingService {
CrossReferenceProcessingWebServiceConstants.CROSS_REFERENCE_PATIENT_SEARCH_OPERATION));
}
try {
patient = crossReferenceSearch.search(mapper.getObject(searchParameter.get(0), EntityIdentifier.class));
return createPatientSearchProcessResponse(patient);
patientAliases = crossReferenceSearch.search(mapper.getObject(searchParameter.get(0), EntityIdentifier.class));
return createPatientSearchProcessResponse(patientAliases);
} catch (MappingException e) {
throw new IllegalArgumentException("Cannot decode Request inputs as SourceIdentifier !", e);
} catch (SearchCrossReferenceException e) {
......
......@@ -49,9 +49,9 @@ public class XRefSearchClient implements PatientCrossReferenceSearch {
public PatientAliases search(EntityIdentifier sourceIdentifier) throws SearchCrossReferenceException {
ProcessRequest processRequest = new ProcessRequest();
processRequest.setOperation(CrossReferenceProcessingWebServiceConstants.CROSS_REFERENCE_PATIENT_SEARCH_OPERATION);
AnyContent patientToFeedAnyContent = null;
try {
patientToFeedAnyContent =
AnyContent patientToFeedAnyContent =
new MapperObjectToAnyContent().getAnyContent(CrossReferenceProcessingWebServiceConstants.CROSS_REFERENCE_INPUT_NAME,
sourceIdentifier);
processRequest.getInput().add(patientToFeedAnyContent);
......
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