Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAH-3473 | Locale Issue while uploading the patient visit document. #248

Merged
merged 5 commits into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
//comment

import java.util.Locale;
@Service
public class VisitDocumentServiceImpl implements VisitDocumentService {

Expand Down Expand Up @@ -87,8 +88,13 @@ private void linkDocumentAndImpressionObs(VisitDocumentRequest visitDocumentRequ
}
}

private Concept getConceptsByNameAndLocale(String name, Locale locale) {
List<Concept> conceptList = conceptService.getConceptsByName(name, locale, false);
return conceptList.isEmpty() ? null : conceptList.get(0);
}

private void updateEncounter(Encounter encounter, Date encounterDateTime, List<Document> documents) {
Concept imageConcept = conceptService.getConceptByName(DOCUMENT_OBS_GROUP_CONCEPT_NAME);
Concept imageConcept = getConceptsByNameAndLocale(DOCUMENT_OBS_GROUP_CONCEPT_NAME, Locale.ENGLISH);

for (Document document : documents) {
Concept testConcept = conceptService.getConceptByUuid(document.getTestUuid());
Expand Down
Loading