Skip to content

Commit

Permalink
GOK-318 | Test. Update mock structure for panel test | [Sweety/Riya]
Browse files Browse the repository at this point in the history
  • Loading branch information
riyaTw committed Sep 13, 2023
1 parent 305f249 commit 03c365f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/__mocks__/selectTests.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,4 +561,4 @@ export const testResultsdiagnosticNumericReportRequestBody = reportDate =>
export const testResultsdiagnosticInterpretationReportRequestBody = reportDate =>
`{"resourceType":"DiagnosticReport","status":"final","code":{"coding":[{"code":"21AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}]},"subject":{"reference":"Patient/123"},"issued":"${reportDate}","contained":[{"resourceType":"Observation","id":"lab-test-result1","status":"final","code":{"coding":[{"code":"21AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","display":"Haemoglobin"}]},"subject":{"reference":"Patient/123"},"interpretation":[{"coding":[{"code":"A"}]}],"valueQuantity":{"value":"11"}}],"result":[{"reference":"#lab-test-result1","type":"Observation"}],"conclusion":"Normal Report","basedOn":[{"identifier":{"value":"abf-123"},"reference":"ServiceRequest"}],"performer":[{"reference":"Practitioner/2"}]}`
export const panelTestResultsDiagnosticReportRequestBody = reportDate =>
`{"resourceType":"DiagnosticReport","status":"final","code":{"coding":[{"code":"5b0cdc41-7371-4c2f-a1e4-ed1bf7416a8d","display":"Anaemia panel"}]},"subject":{"reference":"Patient/123"},"issued":"${reportDate}","contained":[{"resourceType":"Observation","id":"lab-test-result1","status":"final","code":{"coding":[{"code":"07a128f7-f596-45d5-a2a9-c447bc9e5112","display":"Absolute Eosinphil Count"}]},"subject":{"reference":"Patient/123"}},{"resourceType":"Observation","id":"lab-test-result2","status":"final","code":{"coding":[{"code":"21AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","display":"Haemoglobin"}]},"subject":{"reference":"Patient/123"}}],"result":[{"reference":"#lab-test-result1","type":"Observation"},{"reference":"#lab-test-result2","type":"Observation"}],"basedOn":[{"identifier":{"value":"5b0cdc41-7371-4c2f-a1e4-ed1bf7416a8d"},"reference":"ServiceRequest","display":"Anaemia panel"}]}`
`{"resourceType":"DiagnosticReport","status":"final","code":{"coding":[{"code":"5b0cdc41-7371-4c2f-a1e4-ed1bf7416a8d","display":"Anaemia panel"}]},"subject":{"reference":"Patient/123"},"issued":"${reportDate}","contained":[{"resourceType":"Observation","id":"lab-test-result1","status":"final","code":{"coding":[{"code":"07a128f7-f596-45d5-a2a9-c447bc9e5112","display":"Absolute Eosinphil Count"}]},"subject":{"reference":"Patient/123"},"valueQuantity":{"value":"40"}},{"resourceType":"Observation","id":"lab-test-result2","status":"final","code":{"coding":[{"code":"21AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","display":"Haemoglobin"}]},"subject":{"reference":"Patient/123"},"valueCodeableConcept":{"coding":[{"code":"703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","display":"Positive"}]}}],"result":[{"reference":"#lab-test-result1","type":"Observation"},{"reference":"#lab-test-result2","type":"Observation"}],"basedOn":[{"identifier":{"value":"5b0cdc41-7371-4c2f-a1e4-ed1bf7416a8d"},"reference":"ServiceRequest","display":"Anaemia panel"}]}`
26 changes: 13 additions & 13 deletions src/__mocks__/testResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ export const mockTestResultResponse: any = {

export const mockPanelTestResult = {
data: {
uuid: '161430AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
uuid: '5b0cdc41-7371-4c2f-a1e4-ed1bf7416a8d',
name: {
display: 'Routine blood panel',
uuid: '110966BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB',
name: 'Routine blood panel',
display: 'Anaemia Panel',
uuid: '8ce76a2c-e63d-4358-aabb-f8c5a6239fbd',
name: 'Anaemia Panel',
locale: 'en',
localePreferred: true,
conceptNameType: 'FULLY_SPECIFIED',
Expand All @@ -106,9 +106,9 @@ export const mockPanelTestResult = {
},
names: [
{
display: 'Routine blood panel',
display: 'Anaemia Panel',
uuid: '110966BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB',
name: 'Routine blood panel',
name: 'Anaemia Panel',
locale: 'en',
localePreferred: true,
conceptNameType: 'FULLY_SPECIFIED',
Expand Down Expand Up @@ -149,11 +149,11 @@ export const mockPanelTestResult = {
answers: [],
setMembers: [
{
uuid: '1015AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
uuid: '07a128f7-f596-45d5-a2a9-c447bc9e5112',
name: {
display: 'Hematocrit',
uuid: '1066BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB',
name: 'Hematocrit',
display: 'Absolute Eosinphil Count',
uuid: 'fd2ec116-74c9-4d48-86cf-1c7e8aa1a748',
name: 'Absolute Eosinphil Count',
locale: 'en',
localePreferred: true,
conceptNameType: 'FULLY_SPECIFIED',
Expand Down Expand Up @@ -229,10 +229,10 @@ export const mockPanelTestResult = {
resourceVersion: '2.0',
},
{
uuid: '1643AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
uuid: '21AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
name: {
display: 'Rapid test for malaria',
uuid: '1923BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB',
display: 'Haemoglobin',
uuid: 'b8b8c317-43d2-4c4b-a67d-2ef3782c53eb',
name: 'Rapid test for malaria',
locale: 'en',
localePreferred: true,
Expand Down

0 comments on commit 03c365f

Please sign in to comment.