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