blob: da7a664592aef725eb4f91537503394ec1a2b08a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package xyz.driver.pdsuidomain.formats.json.sprayformats
import spray.json._
import xyz.driver.core.json.EnumJsonFormat
import xyz.driver.pdsuidomain.entities._
object patienthistory {
import DefaultJsonProtocol._
import common._
import PatientHistory._
implicit val patientStateFormat = new EnumJsonFormat[State](
"Verify" -> State.Verify,
"Curate" -> State.Curate,
"Review" -> State.Review,
"Flag" -> State.Flag
)
implicit val patientActionFormat = new EnumJsonFormat[Action](
"Start" -> Action.Start,
"Submit" -> Action.Submit,
"Unassign" -> Action.Unassign,
"Resolve" -> Action.Resolve,
"Flag" -> Action.Flag,
"Archive" -> Action.Archive
)
implicit val patientHistoryFormat: RootJsonFormat[PatientHistory] = jsonFormat6(PatientHistory.apply)
}
|