OpenMRS is configured with 15 Patient Identifier Sources of type Local Identifier Generator. Names, 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