aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/patient/eligible/ApiPartialPatientEligibleTrial.scala
blob: 03ff275e3c2b1591e6d87eb567ed960696f2f821 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package xyz.driver.pdsuidomain.formats.json.patient.eligible

import xyz.driver.pdsuidomain.entities.PatientTrialArmGroupView
import play.api.libs.json.{Format, Json}

final case class ApiPartialPatientEligibleTrial(isVerified: Option[Boolean]) {

  def applyTo(orig: PatientTrialArmGroupView): PatientTrialArmGroupView = {
    orig.copy(
      isVerified = isVerified.getOrElse(orig.isVerified)
    )
  }
}

object ApiPartialPatientEligibleTrial {

  implicit val format: Format[ApiPartialPatientEligibleTrial] = Json.format
}