public void set_Visit(MsgParse mp)
            throws SQLException {
        if (!mp.visit.getPatient_class().isEmpty())
        try {

            PreparedStatement prepStmt = connection.prepareStatement(
                    "insert into visit (patient_class, admission_type, location, prior_location, "
                            + "attending_provider_number, attending_provider_name, hospital_service, visit_number, admit_date,"                           
                            + "discharge_date, patient_pid) "
                            //   + "attending_provider_number, attending_provider_name, hospital_service, admit_date,"                           
                            // + "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + patientId + ")");
                            // This pid comes from SET_PATIENT where we select MAX(PID)  
                            + "values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?," + patientId + ")");

            prepStmt.setString(1, mp.visit.getPatient_class());
            prepStmt.setString(2, mp.visit.getAdmission_type());
            prepStmt.setString(3, mp.visit.getLocation());
            prepStmt.setString(4, mp.visit.getPrior_location());
            prepStmt.setString(5, mp.visit.getAttending_provider_number());
            prepStmt.setString(6, mp.visit.getAttending_provider_name());
            prepStmt.setString(7, mp.visit.getHospital_service());
            prepStmt.setString(8, mp.patient.getAcctNum());
            prepStmt.setString(9, mp.visit.getAdmit_date());
            prepStmt.setString(10, mp.visit.getDischarge_date());
            //prepStmt.setString(8, mp.visit.getAdmit_date());
            //prepStmt.setString(9, mp.visit.getDischarge_date());
    

            prepStmt.execute();

            prepStmt.close();
            patientId = 0;
        } catch (SQLException se) {
            System.out.println("Error in DBLoader.set_Visit: " + se);
        }
    }