filter column in event_log table is not updated to correct value in Bahmni Connect

Description

Open MRS Talk Thread : https://talk.openmrs.org/t/filter-column-in-event-log-table-is-not-updated-to-correct-value/25657

Issue description : OpenMRS is configured with 15 Patient Identifier Sources of type Local Identifier Generator.
Name, Prefix, min length and max length are as follows
ABC1 ABC1 4 15
ABC2 ABC2 4 15
ABC3 ABC3 4 15
… …
ABC9 ABC9 4 15
ABC10 ABC10 4 16
ABC11 ABC11 4 16
… …
ABC15 ABC15 4 16

When new patient is created with patient identifier as ABC10, the right Patient identifier is being assigned to the patient(i.e ABC10000000001 in event_records table), however when the patient data is flowing to event_log table, the filter column is getting update with ABC1, Expected value is ABC10.

Because of this when initial sync is performed in the offline device. The index DB in the device is not getting any information related to the ID ABC10(assuming there is no patient created under the ID ABC10)

It is observed that filter is populating from method evaluateFilterForPatient() in https://github.com/Bahmni/bahmni-offline-sync/blob/release-0.91/omod/src/main/java/org/bahmni/module/bahmniOfflineSync/strategy/IDBasedSyncStrategy.java

Resolution :
Using the query to fetch prefix for local identifier source.

PR :

Status

Assignee

Unassigned

Reporter

Siva Reddy Pathuri

Labels

Units

None

PercentDone

None

DueTime

None

Clients

None

External issue ID

None

UAT Assignee

None

Reviewer

None

Sprint

Fix versions

Configure