aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/storage
diff options
context:
space:
mode:
authorvlad <vlad@driver.xyz>2017-06-13 16:15:07 -0700
committervlad <vlad@driver.xyz>2017-06-13 16:15:07 -0700
commit91a4120b4253dc4a1e9552ec39fcb25c303a21e1 (patch)
tree9173797ed8e3d780f98ac8d0f85507eeb10c8016 /src/main/scala/xyz/driver/pdsuidomain/storage
parentcd1b635b2ae90d9ac2d8b1779183a1fbd8c5fd5c (diff)
downloadrest-query-91a4120b4253dc4a1e9552ec39fcb25c303a21e1.tar.gz
rest-query-91a4120b4253dc4a1e9552ec39fcb25c303a21e1.tar.bz2
rest-query-91a4120b4253dc4a1e9552ec39fcb25c303a21e1.zip
Scalafmtv0.1.2v0.1.1
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/storage')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/storage/MedicalRecordDocumentStorage.scala3
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/storage/RequestStorage.scala10
2 files changed, 4 insertions, 9 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/storage/MedicalRecordDocumentStorage.scala b/src/main/scala/xyz/driver/pdsuidomain/storage/MedicalRecordDocumentStorage.scala
index d50be2c..192512f 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/storage/MedicalRecordDocumentStorage.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/storage/MedicalRecordDocumentStorage.scala
@@ -9,8 +9,7 @@ import scala.concurrent.{ExecutionContext, Future, blocking}
object MedicalRecordDocumentStorage extends StrictLogging {
private val storage = StorageOptions.getDefaultInstance.getService
- def fetchPdf(bucket: String, path: String)
- (implicit ec: ExecutionContext): Future[PdfSource] = {
+ def fetchPdf(bucket: String, path: String)(implicit ec: ExecutionContext): Future[PdfSource] = {
logger.trace(s"fetchPdf(bucket=$bucket, path=$path)")
Future {
blocking {
diff --git a/src/main/scala/xyz/driver/pdsuidomain/storage/RequestStorage.scala b/src/main/scala/xyz/driver/pdsuidomain/storage/RequestStorage.scala
index d9651ca..9e3ad67 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/storage/RequestStorage.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/storage/RequestStorage.scala
@@ -7,7 +7,7 @@ import xyz.driver.pdsuidomain.entities.{Arm, Patient}
import scala.collection.concurrent.TrieMap
object RequestStorage {
- type Key = (UuidId[Patient], String)
+ type Key = (UuidId[Patient], String)
type Value = Set[LongId[Arm]]
}
@@ -16,9 +16,7 @@ class RequestStorage extends PhiLogging {
private val storage = new TrieMap[Key, Value]()
- def put(patientId: UuidId[Patient],
- disease: String,
- ineligibleArms: Set[LongId[Arm]]): Unit = {
+ def put(patientId: UuidId[Patient], disease: String, ineligibleArms: Set[LongId[Arm]]): Unit = {
logger.debug(phi"put($patientId, ${Unsafe(disease)}, $ineligibleArms")
val key = (patientId, disease.toLowerCase)
get(patientId, disease.toLowerCase) match {
@@ -37,9 +35,7 @@ class RequestStorage extends PhiLogging {
storage.get(key)
}
- def contains(patientId: UuidId[Patient],
- disease: String,
- value: Set[LongId[Arm]]): Boolean = {
+ def contains(patientId: UuidId[Patient], disease: String, value: Set[LongId[Arm]]): Boolean = {
logger.debug(phi"contains(key=($patientId,${Unsafe(disease)}),value=$value")
get(patientId, disease.toLowerCase).contains(value)
}