daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Aug 16th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @Test(alwaysRun = true, dataProvider = "json-file", dataProviderClass = FileDataProvider.class)
  2.     @TestMethodParams(parameters = "UseCase useCase, Comparison comp, String date")
  3.     public void testAgeInEquality(UseCase useCase, Comparison comp, String date) throws Exception {
  4.        
  5.         SQLQueryExpr queryExpr = new SQLQueryExpr() ;
  6.  
  7.         Assert.notNull(advancedPatientSearcher);
  8.         Assert.notNull(advancedPatientSearcher.getSelectSQL());
  9.         SQLExpr dobExpr = queryExpr.createExpr(DATE_OF_BIRTH_ATTR, comp, date) ;
  10.         logger.info("Getting patients where " + dobExpr.toString() + ";") ;
  11.         List<AdvancedPatientSearchDTO> patientList = advancedPatientSearcher.findPatients(dobExpr.toString(), " order by " + DATE_OF_BIRTH_ATTR, 1) ;
  12.         for(AdvancedPatientSearchDTO patient : patientList) {
  13.             logger.info(patient.getFirstName() + ", " + patient.getLastName() + ", " + patient.getDateOfBirth()) ;
  14.         }
  15.     }
  16.  
  17.  
  18.  
  19.     public List<AdvancedPatientSearchDTO> findPatients(String searchCriteria, String orderByClause, int firmId) throws Exception
  20.     {
  21.         setFirmId(firmId) ;
  22.         ParameterizedRowMapper<AdvancedPatientSearchDTO> parameterizedRowMapper = new ParameterizedRowMapper<AdvancedPatientSearchDTO>(){
  23.             public AdvancedPatientSearchDTO mapRow(ResultSet rs, int rowNum) throws SQLException {
  24.                 AdvancedPatientSearchDTO dto = new AdvancedPatientSearchDTO() ;
  25.                 dto.setFirmId(rs.getInt(1)) ;
  26.                 dto.setPatientId(rs.getInt(2)) ;
  27.  
  28.                 dto.setEncryptedId(CryptoUtil.encrypt(String.valueOf(dto.getPatientId()))) ;
  29.  
  30.                 dto.setGender(rs.getString(3)) ;
  31.                 dto.setEthnicGroup(rs.getString(4)) ;
  32.                 dto.setLanguagePreference(rs.getString(5)) ;
  33.                 dto.setRace(rs.getString(6)) ;
  34.                 dto.setFirstName(rs.getString(7)) ;
  35.                 dto.setLastName(rs.getString(8)) ;
  36.                 dto.setMrn(rs.getString(9)) ;
  37.                 dto.setDateOfBirth(rs.getDate(10)) ;
  38.                 dto.setEmail(rs.getString(11)) ;
  39.                 dto.setEstablishedPatient(rs.getBoolean(12)) ;
  40.                 dto.setDateOfLastVisit(rs.getDate(13)) ;
  41.                 dto.setProblemId(rs.getInt(14)) ;
  42.                 dto.setProblem(rs.getString(15)) ;
  43.                 dto.setMedicationId(rs.getInt(16)) ;
  44.                 dto.setMedication(rs.getString(17)) ;
  45.                 dto.setAllergyId(rs.getInt(18)) ;
  46.                 dto.setAllergy(rs.getString(19)) ;
  47.                 dto.setLabId(rs.getInt(20)) ;
  48.                 dto.setLabResult(rs.getString(21)) ;
  49.                 dto.setLabFlag(rs.getString(22)) ;
  50.                 return dto ;
  51.             }
  52.         };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top