diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/storage')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/storage/MedicalRecordDocumentStorage.scala | 3 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/storage/RequestStorage.scala | 10 |
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) } |