From c404ab936d5c2ebaae8246ed658086d66e7c9a61 Mon Sep 17 00:00:00 2001 From: vlad Date: Mon, 9 Oct 2017 20:00:22 -0700 Subject: Update PatientLabelEvidenceView to support to Provider and Document type --- .../formats/json/sprayformats/PatientLabelFormatSuite.scala | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/test/scala') 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 { -- cgit v1.2.3