Skip to content

Commit

Permalink
BAH-4120 | Fix. Avoid opening session on existingPatient search (#135)
Browse files Browse the repository at this point in the history
mohan-13 authored Dec 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent a6926fd commit 92828ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ public String getPatientUuidWithHealthId(String healthId) {
String getPatientWithHealthIdQuery = "SELECT p.uuid FROM person AS p INNER JOIN \n" +
"\t\t\t\t patient_identifier AS pi ON p.person_id = pi.patient_id \n" +
"\t\t\t\t WHERE identifier = :healthId ;";
Query query = this.sessionFactory.openSession().createSQLQuery(getPatientWithHealthIdQuery);
Query query = this.sessionFactory.getCurrentSession().createSQLQuery(getPatientWithHealthIdQuery);
query.setParameter("healthId", healthId);
List<String> patientUuids = query.list();
return patientUuids.size() > 0 ? patientUuids.get(0) : null;

0 comments on commit 92828ee

Please sign in to comment.