diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-08-04 17:57:12 +0600 |
---|---|---|
committer | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-08-11 14:41:17 +0600 |
commit | ef9517e1b8f599fbdd15c474cf7dfea61e803c2f (patch) | |
tree | c31a139d35dab0c10c70bb7afef2bca8e48f0fee /src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/recordhistory.scala | |
parent | 5519c219e2404cb19b6116dee90b40b5e5e2a720 (diff) | |
download | rest-query-ef9517e1b8f599fbdd15c474cf7dfea61e803c2f.tar.gz rest-query-ef9517e1b8f599fbdd15c474cf7dfea61e803c2f.tar.bz2 rest-query-ef9517e1b8f599fbdd15c474cf7dfea61e803c2f.zip |
PDSUI-2188 Created and fixed spray json formats for tric and rep
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/recordhistory.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/recordhistory.scala | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/recordhistory.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/recordhistory.scala new file mode 100644 index 0000000..bd14d43 --- /dev/null +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/recordhistory.scala @@ -0,0 +1,30 @@ +package xyz.driver.pdsuidomain.formats.json.sprayformats + +import spray.json._ +import xyz.driver.core.json.EnumJsonFormat +import xyz.driver.pdsuidomain.entities._ + +object recordhistory { + import DefaultJsonProtocol._ + import common._ + import MedicalRecordHistory._ + + implicit val recordStateFormat = new EnumJsonFormat[State]( + "Clean" -> State.Clean, + "Organize" -> State.Organize, + "Review" -> State.Review, + "Flag" -> State.Flag + ) + + implicit val recordActionFormat = new EnumJsonFormat[Action]( + "Start" -> Action.Start, + "Submit" -> Action.Submit, + "Unassign" -> Action.Unassign, + "Resolve" -> Action.Resolve, + "Flag" -> Action.Flag, + "Archive" -> Action.Archive + ) + + implicit val recordHistoryFormat: RootJsonFormat[MedicalRecordHistory] = jsonFormat6(MedicalRecordHistory.apply) + +} |