From 848754fbb6948e8bc39ac3310bb97f06f88909c0 Mon Sep 17 00:00:00 2001 From: Vishal Bothe <102521345+vbothe23@users.noreply.github.com> Date: Thu, 9 Mar 2023 00:17:14 +0530 Subject: [PATCH] Test case changes for Observation non-primitive value extraction. (#1833) * ValueCoding extraction issue fix * Removed unused line * Changed parameter type to resource type. * used forchached for iparser * Changed link ids in test case --------- Co-authored-by: Omar Ismail <44980219+omarismail94@users.noreply.github.com> Co-authored-by: Jing Tang --- .../datacapture/mapping/ResourceMapperTest.kt | 44 +++---------------- 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/datacapture/src/test/java/com/google/android/fhir/datacapture/mapping/ResourceMapperTest.kt b/datacapture/src/test/java/com/google/android/fhir/datacapture/mapping/ResourceMapperTest.kt index 4e8f15c582..9c3af08f8d 100644 --- a/datacapture/src/test/java/com/google/android/fhir/datacapture/mapping/ResourceMapperTest.kt +++ b/datacapture/src/test/java/com/google/android/fhir/datacapture/mapping/ResourceMapperTest.kt @@ -500,7 +500,7 @@ class ResourceMapperTest { "resourceType": "Questionnaire", "item": [ { - "linkId": "9", + "linkId": "observation", "type": "group", "extension": [ { @@ -512,36 +512,16 @@ class ResourceMapperTest { ], "item": [ { - "linkId": "9.1", + "linkId": "observation-value", "type": "group", "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueCodeableConcept", "item": [ { - "linkId": "9.1.1", + "linkId": "observation-value-coding", "type": "choice", "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueCodeableConcept.coding" } ] - }, - { - "linkId": "9.1.3", - "type": "choice", - "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "initial": [ - { - "valueCoding": { - "code": "8888", - "display": "dummy", - "system": "dummy" - } - } - ] } ] } @@ -556,13 +536,13 @@ class ResourceMapperTest { "resourceType": "QuestionnaireResponse", "item": [ { - "linkId": "9", + "linkId": "observation", "item": [ { - "linkId": "9.1", + "linkId": "observation-value", "item": [ { - "linkId": "9.1.1", + "linkId": "observation-value-coding", "answer": [ { "valueCoding": { @@ -574,18 +554,6 @@ class ResourceMapperTest { ] } ] - }, - { - "linkId": "9.1.3", - "answer": [ - { - "valueCoding": { - "system": "dummy", - "code": "8888", - "display": "dummy" - } - } - ] } ] }