Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Adds the given CPT codes to the given office visit
- * @param icd A double representing the ICD code to be added.
- * @param visitID The ID of the office visit we are adding the code to.
- * @return A long for the new ICD code's ID.
- * @throws DBException
- */
- public long addDiagnosisToOfficeVisit(double icd, long visitID) throws DBException {
- Connection conn = null;
- PreparedStatement ps = null;
- try {
- conn = factory.getConnection();
- ps = conn.prepareStatement("INSERT INTO OVDiagnosis (ICDCode,VisitID) VALUES (?,?)");
- ps.setDouble(1, icd);
- ps.setLong(2, visitID);
- ps.executeUpdate();
- return DBUtil.getLastInsert(conn);
- } catch (SQLException e) {
- e.printStackTrace();
- throw new DBException(e);
- } finally {
- DBUtil.closeConnection(conn, ps);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement