Skip to content

Commit

Permalink
fix duplicate patient bug
Browse files Browse the repository at this point in the history
  • Loading branch information
levine12 committed Dec 19, 2019
1 parent 7881f10 commit 7bcd401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion omod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<artifactId>aws-java-sdk</artifactId>
<version>1.11.327</version>
</dependency>

<dependency>
<groupId>org.openmrs.web</groupId>
<artifactId>openmrs-web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public Object invoke(MethodInvocation invocation) throws Throwable {
}
// the proceed() method does not have to be called
Patient newPatient = (Patient) invocation.proceed();
System.out.println("AFTER SAVE - ADDING NEW PATIENT TO PATIENTLIST o: " + o.getClass());
System.out.println("AFTER SAVE - ADDING NEW PATIENT TO PATIENTLIST: " + newPatient.getGivenName() + " "
+ newPatient.getFamilyName());

addPatientToActiveList(patient);
log.debug("After " + invocation.getMethod().getName() + ".");
Expand Down Expand Up @@ -102,8 +103,8 @@ private boolean isOldPatientInActiveList() {

private boolean isPatientAlreadyRegistered(Patient patient) {
List<Patient> patients = Context.getPatientService().getAllPatients();
System.out.println("patientAlreadyRegistered: " + patient.getGivenName() + " " + patient.getFamilyName() + " "
+ patient.getGender() + " " + patient.getAge() + " "
System.out.println("in method patientAlreadyRegistered: " + patient.getGivenName() + " "
+ patient.getFamilyName() + " " + patient.getGender() + " " + patient.getAge() + " "
+ patient.getAttribute("Telephone Number").getValue());
for (Patient oldPat : patients) {
if ((oldPat.getGender().equals(patient.getGender()))
Expand Down

0 comments on commit 7bcd401

Please sign in to comment.