aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientLabelFormatSuite.scala
diff options
context:
space:
mode:
authorvlad <vlad@driver.xyz>2017-10-09 20:00:22 -0700
committervlad <vlad@driver.xyz>2017-10-09 20:00:22 -0700
commitc404ab936d5c2ebaae8246ed658086d66e7c9a61 (patch)
tree2deec9cab3030754d77b14a4845d57fb292796ab /src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientLabelFormatSuite.scala
parent9cfd099d063016c313d4fb8d69202a6184ecdffc (diff)
downloadrest-query-c404ab936d5c2ebaae8246ed658086d66e7c9a61.tar.gz
rest-query-c404ab936d5c2ebaae8246ed658086d66e7c9a61.tar.bz2
rest-query-c404ab936d5c2ebaae8246ed658086d66e7c9a61.zip
Update PatientLabelEvidenceView to support to Provider and Document typev0.7.3
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientLabelFormatSuite.scala')
-rw-r--r--src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientLabelFormatSuite.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientLabelFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientLabelFormatSuite.scala
index 47b251a..e837861 100644
--- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientLabelFormatSuite.scala
+++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientLabelFormatSuite.scala
@@ -6,7 +6,7 @@ import spray.json._
import org.scalatest.{FlatSpec, Matchers}
import xyz.driver.entities.labels.LabelValue
import xyz.driver.pdsuicommon.domain.{LongId, UuidId}
-import xyz.driver.pdsuidomain.entities.{PatientLabel, PatientLabelEvidenceView}
+import xyz.driver.pdsuidomain.entities._
import xyz.driver.pdsuidomain.services.PatientLabelService.RichPatientLabel
class PatientLabelFormatSuite extends FlatSpec with Matchers {
@@ -44,9 +44,9 @@ class PatientLabelFormatSuite extends FlatSpec with Matchers {
documentId = Some(LongId(21)),
evidenceId = Some(LongId(10)),
reportId = None,
- documentType = "document type",
+ documentType = DocumentType.LaboratoryReport,
date = Some(LocalDate.parse("2017-08-10")),
- providerType = "provider type",
+ providerType = ProviderType.EmergencyMedicine,
patientId = UuidId("748b5884-3528-4cb9-904b-7a8151d6e343"),
labelId = LongId(20),
isImplicitMatch = false
@@ -55,7 +55,8 @@ class PatientLabelFormatSuite extends FlatSpec with Matchers {
writtenJson should be (
"""{"id":1,"value":"Maybe","evidenceText":"evidence text","documentId":21,"evidenceId":10,"reportId":null,
- "documentType":"document type","date":"2017-08-10","providerType":"provider type"}""".parseJson)
+ "documentType":{"id":3,"name":"Laboratory Report"},"date":"2017-08-10",
+ "providerType":{"id":26,"name":"Emergency Medicine"}}""".parseJson)
}
"Json format for PatientLabelDefiningCriteria" should "read and write correct JSON" in {