diff options
author | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-11-10 20:48:44 +0700 |
---|---|---|
committer | Kseniya Tomskikh <ktomskih@datamonsters.co> | 2017-11-10 20:48:44 +0700 |
commit | dfdb1c689615ab79bafa4e904dc61a15db3bbffe (patch) | |
tree | 3f01d7d4c49edad0f843546ba1d5b18dbaad723b /src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala | |
parent | 005b186725fac14b5361292456dd5025742b7646 (diff) | |
download | rest-query-dfdb1c689615ab79bafa4e904dc61a15db3bbffe.tar.gz rest-query-dfdb1c689615ab79bafa4e904dc61a15db3bbffe.tar.bz2 rest-query-dfdb1c689615ab79bafa4e904dc61a15db3bbffe.zip |
Fixed calculation of eligibility status with "Unknown" value (instead of NULL)
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala index b83aad1..289de53 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/PatientLabelFormatSuite.scala @@ -17,8 +17,8 @@ class PatientLabelFormatSuite extends FlatSpec with Matchers { id = LongId(1), patientId = UuidId("748b5884-3528-4cb9-904b-7a8151d6e343"), labelId = LongId(20), - primaryValue = Some(LabelValue.Yes), - verifiedPrimaryValue = None, + primaryValue = LabelValue.Yes, + verifiedPrimaryValue = LabelValue.Unknown, isVisible = true, score = 1, isImplicitMatch = false @@ -26,11 +26,11 @@ class PatientLabelFormatSuite extends FlatSpec with Matchers { val writtenJson = richPatientLabelFormat.write(RichPatientLabel(orig, isVerified = true)) writtenJson should be( - """{"id":1,"labelId":20,"primaryValue":"Yes","isVisible":true,"isVerified":true, + """{"id":1,"labelId":20,"primaryValue":"Yes","isVisible":true,"isVerified":true,"verifiedPrimaryValue":"Unknown", "score":1,"isImplicitMatch":false, "patientId":"748b5884-3528-4cb9-904b-7a8151d6e343"}""".parseJson) val updatePatientLabelJson = """{"verifiedPrimaryValue":"No"}""".parseJson - val expectedUpdatedPatientLabel = orig.copy(verifiedPrimaryValue = Some(LabelValue.No)) + val expectedUpdatedPatientLabel = orig.copy(verifiedPrimaryValue = LabelValue.No) val parsedUpdatePatientLabel = applyUpdateToPatientLabel(updatePatientLabelJson, orig) parsedUpdatePatientLabel should be(expectedUpdatedPatientLabel) } @@ -65,8 +65,8 @@ class PatientLabelFormatSuite extends FlatSpec with Matchers { id = LongId(1), patientId = UuidId("748b5884-3528-4cb9-904b-7a8151d6e343"), labelId = LongId(20), - primaryValue = Some(LabelValue.Yes), - verifiedPrimaryValue = Some(LabelValue.Yes), + primaryValue = LabelValue.Yes, + verifiedPrimaryValue = LabelValue.Yes, isVisible = true, score = 1, isImplicitMatch = false |