diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/patienthistory.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/patienthistory.scala | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/patienthistory.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/patienthistory.scala new file mode 100644 index 0000000..bd20b27 --- /dev/null +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/patienthistory.scala @@ -0,0 +1,30 @@ +package xyz.driver.pdsuidomain.formats.json + +import spray.json._ +import xyz.driver.core.json.EnumJsonFormat +import xyz.driver.pdsuidomain.entities._ + +object patienthistory { + import DefaultJsonProtocol._ + import PatientHistory._ + import common._ + + 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) + +} |