|
|
|
@@ -928,7 +928,7 @@ public class DBHandler { |
|
|
|
*/ |
|
|
|
public static void setHL7Nachricht(String hl7msg, LocalDateTime timestamp, String source) throws SQLException { |
|
|
|
PreparedStatement statement = MySqlConnectionFactory.getConnection().prepareStatement(INSERT_HL7NACHRICHT); |
|
|
|
statement.setString(1, hl7msg); |
|
|
|
statement.setString(1, hl7msg.replaceAll("\r", "\n")); |
|
|
|
statement.setTimestamp(2, Timestamp.valueOf(timestamp)); |
|
|
|
statement.setString(3, source); |
|
|
|
statement.execute(); |
|
|
|
@@ -971,7 +971,7 @@ public class DBHandler { |
|
|
|
*/ |
|
|
|
public static void setHL7LogEntry(HL7LogEntry entry) throws SQLException { |
|
|
|
PreparedStatement statement = MySqlConnectionFactory.getConnection().prepareStatement(INSERT_HL7NACHRICHT_); |
|
|
|
statement.setString(1, entry.getMessage()); |
|
|
|
statement.setString(1, entry.getMessage().replaceAll("\r", "\n")); |
|
|
|
statement.setTimestamp(2, Timestamp.valueOf(entry.getTimestamp())); |
|
|
|
statement.setString(3, entry.getSource()); |
|
|
|
statement.setString(4, entry.getDirection().toString()); |
|
|
|
@@ -980,7 +980,7 @@ public class DBHandler { |
|
|
|
|
|
|
|
private static HL7LogEntry getHL7LogEntry(ResultSet rs) throws SQLException { |
|
|
|
HL7LogEntry entry = new HL7LogEntry(rs.getInt("msgid")); |
|
|
|
entry.setMessage(rs.getString("hl7msg")); |
|
|
|
entry.setMessage(rs.getString("hl7msg").replaceAll("\r", "\n")); |
|
|
|
entry.setTimestamp(rs.getTimestamp("timestamp").toLocalDateTime()); |
|
|
|
entry.setSource(rs.getString("source")); |
|
|
|
entry.setDirection(HL7LogEntry.Direction.parseDirection(rs.getString("direction"))); |
|
|
|
|