Skip to content

Commit

Permalink
make manager search great again
Browse files Browse the repository at this point in the history
  • Loading branch information
mafasva committed Dec 2, 2024
1 parent 01f2f4d commit 3ed89e0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public class EhrBaseService {
private static final String NAME = "name";
private static final String PATH = "path";
private static final String PSEUDONYM = "pseudonym";
private static final String EXTERNAL_REF_ID_VALUE = "/subject/external_ref/id/value";

private final DefaultRestClient restClient;
private final CompositionResponseDataBuilder compositionResponseDataBuilder;
Expand Down Expand Up @@ -320,7 +321,7 @@ private List<String> getAndRemoveEhrStatusColumn(QueryResponseData compositions)
throw new BadRequestException(EhrBaseService.class, NO_DATA_COLUMNS_IN_THE_QUERY_RESULT);
}
String ehrStatusPath = columns.get(0).get(PATH);
if (ehrStatusPath == null || !ehrStatusPath.equals("/" + ehrBaseProperties.getIdPath())) {
if (ehrStatusPath == null || !ehrStatusPath.endsWith(EXTERNAL_REF_ID_VALUE)) {
throw new SystemException(EhrBaseService.class, QUERY_RESULT_DOESN_T_CONTAIN_EHR_STATUS_COLUMN);
}
columns.remove(0);
Expand Down

0 comments on commit 3ed89e0

Please sign in to comment.