diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala | 3 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/entities/MedicalRecord.scala | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala index a838d64..f02bedc 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala @@ -208,8 +208,7 @@ final case class Intervention(id: LongId[Intervention], isActive: Boolean, deliveryMethod: Option[String]) { def deliveryMethodIsCorrect: Boolean = { - if (this.typeId.nonEmpty) { - this.deliveryMethod.nonEmpty && + if (this.typeId.nonEmpty && this.deliveryMethod.nonEmpty) { InterventionType.All .getOrElse(this.typeId.get, throw new IllegalArgumentException(s"Not found Intervention type ${this.typeId}")) .deliveryMethods diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/MedicalRecord.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/MedicalRecord.scala index ed35db4..591b8bd 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/entities/MedicalRecord.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/entities/MedicalRecord.scala @@ -156,7 +156,8 @@ final case class MedicalRecord(id: LongId[MedicalRecord], caseId: Option[CaseId], physician: Option[String], meta: Option[TextJson[List[Meta]]], - lastUpdate: LocalDateTime) { + lastUpdate: LocalDateTime, + totalPages: Int) { import MedicalRecord.Status._ |