Commit 740bcafa authored by R.W.Majeed's avatar R.W.Majeed
Browse files

fixed NPE with missing source timestamp

parent 00e3698a
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -341,7 +341,11 @@ public class PostgresPatientStore extends PostgresExtension<I2b2Patient> impleme
			update.setTimestamp(2, inaccurateSqlTimestamp(patient.getBirthDate()));
			update.setTimestamp(3, inaccurateSqlTimestamp(patient.getDeathDate()));
			update.setString(4, getSexCd(patient));
			if( patient.getSourceTimestamp() != null ){
				update.setTimestamp(5, Timestamp.from(patient.getSourceTimestamp()));
			}else{
				update.setTimestamp(5, null);				
			}
			update.setString(6, patient.getSourceId());
			update.setInt(7, patient.getNum());
			update.executeUpdate();