Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlSjostrand committed Feb 11, 2019
1 parent 9e350c1 commit b690238
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -38,7 +38,7 @@ class AnonymizationDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Exe
class AnonymizationKeyTable(tag: Tag) extends Table[AnonymizationKey](tag, AnonymizationKeyTable.name) {
def id = column[Long]("id", O.PrimaryKey, O.AutoInc)
def created = column[Long]("created")
def imageId = column[Long]("imageid")
def imageId = column[Long]("imageId")
def patientName = column[String](DicomProperty.PatientName.name, O.Length(512))
def anonPatientName = column[String]("anonPatientName", O.Length(512))
def patientID = column[String](DicomProperty.PatientID.name, O.Length(128))
Expand Down Expand Up @@ -280,7 +280,7 @@ class AnonymizationDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Exe

val query = queryAnonymizationKeysSelectPart +
wherePart(queryPart(queryProperties)) +
orderByPart(orderBy, orderAscending) +
orderByPart(orderBy.map(o => s""""$o""""), orderAscending) +
pagePart(startIndex, count)

sql"#$query".as[AnonymizationKey]
Expand Down
14 changes: 7 additions & 7 deletions src/main/scala/se/nimsa/sbx/metadata/PropertiesDAO.scala
Expand Up @@ -335,7 +335,7 @@ class PropertiesDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Execut
seriesTypesPart(seriesTypeIds) +
andPart(filter, sourceRefs, seriesTypeIds, seriesTagIds) +
seriesTagsPart(seriesTagIds) +
orderByPart(orderBy, orderAscending) +
orderByPart(flatSeriesOrderBy(orderBy), orderAscending) +
pagePart(startIndex, count)

sql"#$query".as[FlatSeries]
Expand Down Expand Up @@ -369,7 +369,7 @@ class PropertiesDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Execut
seriesTypesPart(seriesTypeIds) +
andPart(filter, sourceRefs, seriesTypeIds, seriesTagIds) +
seriesTagsPart(seriesTagIds) +
orderByPart(orderBy, orderAscending) +
orderByPart(orderBy.map(o => s""""Patients"."$o""""), orderAscending) +
pagePart(startIndex, count)

sql"#$query".as[Patient]
Expand Down Expand Up @@ -416,7 +416,7 @@ class PropertiesDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Execut

val query =
metaDataDao.queryPatientsSelectPart +
queryMainPart(startIndex, count, orderBy, orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)
queryMainPart(startIndex, count, orderBy.map(o => s""""Patients"."$o""""), orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)

sql"#$query".as[Patient]
}
Expand All @@ -443,7 +443,7 @@ class PropertiesDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Execut

val query =
metaDataDao.queryStudiesSelectPart +
queryMainPart(startIndex, count, orderBy, orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)
queryMainPart(startIndex, count, orderBy.map(o => s""""Studies"."$o""""), orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)

sql"#$query".as[Study]
}
Expand All @@ -470,7 +470,7 @@ class PropertiesDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Execut

val query =
metaDataDao.querySeriesSelectPart +
queryMainPart(startIndex, count, orderBy, orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)
queryMainPart(startIndex, count, orderBy.map(o => s""""Series"."$o""""), orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)

sql"#$query".as[Series]
}
Expand All @@ -497,7 +497,7 @@ class PropertiesDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Execut

val query =
metaDataDao.queryImagesSelectPart +
queryMainPart(startIndex, count, orderBy, orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)
queryMainPart(startIndex, count, orderBy.map(o => s""""Images"."$o""""), orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)

sql"#$query".as[Image]
}
Expand All @@ -524,7 +524,7 @@ class PropertiesDAO(val dbConf: DatabaseConfig[JdbcProfile])(implicit ec: Execut

val query =
metaDataDao.flatSeriesBasePart +
queryMainPart(startIndex, count, orderBy, orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)
queryMainPart(startIndex, count, flatSeriesOrderBy(orderBy), orderAscending, filters.sourceRefs, filters.seriesTypeIds, filters.seriesTagIds, queryProperties)

sql"#$query".as[FlatSeries]
}
Expand Down

0 comments on commit b690238

Please sign in to comment.