Skip to content

Commit 69315e3

Browse files
OZ-578: Update patient details for synced patient in ERPNext regardless of patient sync status (#5)
1 parent b31b937 commit 69315e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

erpnext-openmrs/src/main/java/com/ozonehis/eip/erpnext/openmrs/routes/PatientRouting.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public class PatientRouting extends RouteBuilder {
3131

3232
Predicate isPatientSyncEnabled() {
3333
return exchange -> isPatientSyncEnabled
34-
|| Boolean.TRUE.equals(exchange.getIn().getHeader(HEADER_ENABLE_PATIENT_SYNC, Boolean.class));
34+
|| exchange.getMessage().getHeader(HEADER_ENABLE_PATIENT_SYNC, false, Boolean.class)
35+
|| "u".equals(exchange.getMessage().getHeader(HEADER_FHIR_EVENT_TYPE, String.class));
3536
}
3637

3738
@Override

0 commit comments

Comments
 (0)