|
|
@@ -144,6 +144,15 @@ public class DBHandler { |
|
|
"`timestamp`," + |
|
|
"`timestamp`," + |
|
|
"`source`) " + |
|
|
"`source`) " + |
|
|
"VALUES (?, ?, ?)"; |
|
|
"VALUES (?, ?, ?)"; |
|
|
|
|
|
private static final String INSERT_DIAGNOSE = "INSERT INTO `diagnose` " + |
|
|
|
|
|
"(`Arzt`," + |
|
|
|
|
|
"`DiagArt`," + |
|
|
|
|
|
"`Ersteller`," + |
|
|
|
|
|
"`Freitext`," + |
|
|
|
|
|
"`ICD10Code`," + |
|
|
|
|
|
"`ICD10Version`," + |
|
|
|
|
|
"`LetzterBearbeiter`) " + |
|
|
|
|
|
"VALUES (?, ?, ?, ?, ?, ?, ?)"; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Gibt alle {@link Patient} aus der DB zurueck. |
|
|
* Gibt alle {@link Patient} aus der DB zurueck. |
|
|
@@ -776,6 +785,18 @@ public class DBHandler { |
|
|
return kasse; |
|
|
return kasse; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void setDiagnose(Diagnose diagnose) throws SQLException { |
|
|
|
|
|
PreparedStatement statement = MySqlConnectionFactory.getConnection().prepareStatement(INSERT_DIAGNOSE); |
|
|
|
|
|
statement.setInt(1, diagnose.getArzt().getMitarbID()); // `Arzt` |
|
|
|
|
|
statement.setInt(2, diagnose.getDiagArt().id()); // `DiagArt` |
|
|
|
|
|
statement.setInt(3, diagnose.getErsteller()); // `Ersteller` |
|
|
|
|
|
statement.setString(4, diagnose.getFreiText()); // `Freitext` |
|
|
|
|
|
statement.setString(5, diagnose.getIcd10code().getCode()); // `ICD10Code` |
|
|
|
|
|
statement.setInt(6, diagnose.getIcd10code().getVersion()); // `ICD10Version` |
|
|
|
|
|
statement.setInt(7, diagnose.getBearbeiter()); // `LetzterBearbeiter` |
|
|
|
|
|
statement.execute(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
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); |
|
|
|