|
@@ -436,7 +436,21 @@ public class ClinicController extends LifeCenterController {
|
|
|
PatientPHRHistoryDTO bp = bloodPressureResult.get(bloodPressureIndex);
|
|
|
PatientPHRHistoryDTO pr = pulseRateResult.get(pulseRateIndex);
|
|
|
|
|
|
- int dateDiffer = bp.getRecordedDateFormatted().compareTo(pr.getRecordedDateFormatted());
|
|
|
+ SimpleDateFormat originalFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
|
|
+ SimpleDateFormat targetFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+
|
|
|
+ String bpRecordedDateFormatted = bp.getRecordedDate();
|
|
|
+ String prRecordedDateFormatted = pr.getRecordedDate();
|
|
|
+ try {
|
|
|
+ Date t = originalFormat.parse(bpRecordedDateFormatted);
|
|
|
+ bpRecordedDateFormatted = targetFormat.format(t);
|
|
|
+ Date t2 = originalFormat.parse(prRecordedDateFormatted);
|
|
|
+ prRecordedDateFormatted = targetFormat.format(t2);
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ }
|
|
|
+
|
|
|
+ int dateDiffer = bpRecordedDateFormatted.compareTo(prRecordedDateFormatted);
|
|
|
if (dateDiffer == 0) {
|
|
|
union.setCreateDate(bp.getCreateDate());
|
|
|
union.setRecordedDate(bp.getRecordedDate());
|