aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/patienthistory.scala
diff options
context:
space:
mode:
authorKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-20 16:25:04 +0700
committerKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-20 16:25:04 +0700
commit54b15dae509212f6661dc1f1bc4ca248cb487443 (patch)
tree85b1ceafd9a56da511513797bd263977f52b556c /src/main/scala/xyz/driver/pdsuidomain/formats/json/patienthistory.scala
parent6d6e732368e97e319653f00e498189afceeb4671 (diff)
downloadrest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.tar.gz
rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.tar.bz2
rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.zip
PDSUI-2336 Deleted api classes of play format, userhistory and message services
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.scala30
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)
+
+}