Merge branch 'develop' into MED-157
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import Modal from '@modules/common/components/modal';
|
||||
|
||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
import { Button } from '@kit/ui/shadcn/button';
|
||||
import Modal from "@modules/common/components/modal"
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import Analysis from '../_components/analysis';
|
||||
import { analysisResponses } from './test-responses';
|
||||
@@ -19,16 +20,15 @@ export default function AnalysisResultsPage() {
|
||||
<PageBody className="gap-4">
|
||||
<div className="mt-8 flex flex-col justify-between gap-4 sm:flex-row sm:items-center sm:gap-0">
|
||||
<div>
|
||||
<h2>
|
||||
Analüüsi tulemused demo
|
||||
</h2>
|
||||
<h2>Analüüsi tulemused demo</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-2">
|
||||
{analysisResponses.map(({ id, orderedAnalysisElements }, index) => {
|
||||
const isOpen = openBlocks.includes(id);
|
||||
const closeModal = () => setOpenBlocks(openBlocks.filter((block) => block !== id));
|
||||
const closeModal = () =>
|
||||
setOpenBlocks(openBlocks.filter((block) => block !== id));
|
||||
return (
|
||||
<div key={index} className="flex flex-col gap-2 py-4">
|
||||
<div className="flex flex-col gap-2 pb-4">
|
||||
@@ -52,12 +52,21 @@ export default function AnalysisResultsPage() {
|
||||
{isOpen && (
|
||||
<Modal isOpen={isOpen} close={closeModal} size="large">
|
||||
<div className="overflow-y-auto">
|
||||
|
||||
<p>NormiStaatus</p>
|
||||
<ul>
|
||||
<li>0 - testi väärtus jääb normaalväärtuste piirkonda või on määramata,</li>
|
||||
<li>1 - testi väärtus jääb hoiatava (tähelepanu suunava) märkega piirkonda,</li>
|
||||
<li>2 - testi väärtus on normaalväärtuste piirkonnast väljas või kõrgendatud tähelepanu nõudvas piirkonnas.</li>
|
||||
<li>
|
||||
0 - testi väärtus jääb normaalväärtuste piirkonda
|
||||
või on määramata,
|
||||
</li>
|
||||
<li>
|
||||
1 - testi väärtus jääb hoiatava (tähelepanu
|
||||
suunava) märkega piirkonda,
|
||||
</li>
|
||||
<li>
|
||||
2 - testi väärtus on normaalväärtuste piirkonnast
|
||||
väljas või kõrgendatud tähelepanu nõudvas
|
||||
piirkonnas.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>UuringOlek</p>
|
||||
@@ -70,7 +79,7 @@ export default function AnalysisResultsPage() {
|
||||
<li>6 - Tühistatud,</li>
|
||||
</ul>
|
||||
|
||||
<pre className="text-sm bg-muted p-4 rounded-md">
|
||||
<pre className="bg-muted rounded-md p-4 text-sm">
|
||||
{JSON.stringify(orderedAnalysisElements, null, 2)}
|
||||
</pre>
|
||||
</div>
|
||||
@@ -90,7 +99,7 @@ export default function AnalysisResultsPage() {
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
)
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</PageBody>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AnalysisResultDetailsMapped } from '@/packages/features/accounts/src/types/analysis-results';
|
||||
import type { AnalysisResultDetailsMapped } from '@/packages/features/user-analyses/src/types/analysis-results';
|
||||
|
||||
export type AnalysisTestResponse = Omit<
|
||||
AnalysisResultDetailsMapped,
|
||||
@@ -29,7 +29,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '1744-2',
|
||||
},
|
||||
},
|
||||
@@ -49,7 +49,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '1920-8',
|
||||
},
|
||||
},
|
||||
@@ -69,7 +69,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '1988-5',
|
||||
},
|
||||
},
|
||||
@@ -89,7 +89,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '57747-8',
|
||||
},
|
||||
},
|
||||
@@ -109,7 +109,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '2276-4',
|
||||
},
|
||||
},
|
||||
@@ -129,10 +129,30 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '14771-0',
|
||||
},
|
||||
},
|
||||
{
|
||||
analysisIdOriginal: '59156-0',
|
||||
isWaitingForResults: false,
|
||||
analysisName: 'Glükoos',
|
||||
results: {
|
||||
nestedElements: [],
|
||||
unit: null,
|
||||
normLower: null,
|
||||
normUpper: 2,
|
||||
normStatus: 2,
|
||||
responseTime: '2024-02-29T10:13:01+00:00',
|
||||
responseValue: null,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: false,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: 4,
|
||||
analysisElementOriginalId: '59156-0',
|
||||
},
|
||||
},
|
||||
{
|
||||
analysisIdOriginal: '59156-0',
|
||||
isWaitingForResults: false,
|
||||
@@ -146,10 +166,10 @@ const big1: AnalysisTestResponse = {
|
||||
responseTime: '2024-02-29T10:13:01+00:00',
|
||||
responseValue: null,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: false,
|
||||
responseValueIsWithinNorm: true,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '59156-0',
|
||||
},
|
||||
},
|
||||
@@ -169,7 +189,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '13955-0',
|
||||
},
|
||||
},
|
||||
@@ -189,7 +209,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '14646-4',
|
||||
},
|
||||
},
|
||||
@@ -209,7 +229,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '2000-8',
|
||||
},
|
||||
},
|
||||
@@ -229,7 +249,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '59158-6',
|
||||
},
|
||||
},
|
||||
@@ -249,7 +269,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '14647-2',
|
||||
},
|
||||
},
|
||||
@@ -269,7 +289,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '14682-9',
|
||||
},
|
||||
},
|
||||
@@ -289,7 +309,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '22748-8',
|
||||
},
|
||||
},
|
||||
@@ -309,7 +329,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '58805-3',
|
||||
},
|
||||
},
|
||||
@@ -329,7 +349,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '2601-3',
|
||||
},
|
||||
},
|
||||
@@ -350,7 +370,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '70204-3',
|
||||
},
|
||||
},
|
||||
@@ -370,7 +390,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '14798-3',
|
||||
},
|
||||
},
|
||||
@@ -391,7 +411,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '14927-8',
|
||||
},
|
||||
},
|
||||
@@ -411,7 +431,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '3016-3',
|
||||
},
|
||||
},
|
||||
@@ -431,7 +451,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '22664-7',
|
||||
},
|
||||
},
|
||||
@@ -451,7 +471,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '50561-0',
|
||||
},
|
||||
},
|
||||
@@ -472,7 +492,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '60493-4',
|
||||
},
|
||||
},
|
||||
@@ -492,7 +512,7 @@ const big1: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: true,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '60025-4',
|
||||
},
|
||||
},
|
||||
@@ -518,7 +538,7 @@ const big2: AnalysisTestResponse = {
|
||||
responseValueIsWithinNorm: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '1988-5',
|
||||
},
|
||||
},
|
||||
@@ -538,6 +558,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 150,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '718-7',
|
||||
},
|
||||
{
|
||||
@@ -550,6 +572,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 45,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '4544-3',
|
||||
},
|
||||
{
|
||||
@@ -562,6 +586,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 5,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '6690-2',
|
||||
},
|
||||
{
|
||||
@@ -574,6 +600,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 5,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '789-8',
|
||||
},
|
||||
{
|
||||
@@ -586,6 +614,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 85,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '787-2',
|
||||
},
|
||||
{
|
||||
@@ -598,6 +628,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 30,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '785-6',
|
||||
},
|
||||
{
|
||||
@@ -610,6 +642,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 355,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '786-4',
|
||||
},
|
||||
{
|
||||
@@ -622,6 +656,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 15,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '788-0',
|
||||
},
|
||||
{
|
||||
@@ -634,6 +670,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 255,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '777-3',
|
||||
},
|
||||
{
|
||||
@@ -646,6 +684,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 0.2,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '51637-7',
|
||||
},
|
||||
{
|
||||
@@ -658,6 +698,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 10,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '32623-1',
|
||||
},
|
||||
{
|
||||
@@ -670,6 +712,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 15,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '32207-3',
|
||||
},
|
||||
{
|
||||
@@ -682,6 +726,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 0.05,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '704-7',
|
||||
},
|
||||
{
|
||||
@@ -694,6 +740,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 0.05,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '711-2',
|
||||
},
|
||||
{
|
||||
@@ -706,6 +754,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 5,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '751-8',
|
||||
},
|
||||
{
|
||||
@@ -718,6 +768,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 0.5,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '742-7',
|
||||
},
|
||||
{
|
||||
@@ -730,6 +782,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 1.5,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '731-0',
|
||||
},
|
||||
{
|
||||
@@ -742,6 +796,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 0,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '51584-1',
|
||||
},
|
||||
{
|
||||
@@ -754,6 +810,8 @@ const big2: AnalysisTestResponse = {
|
||||
responseValue: 0,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '38518-7',
|
||||
},
|
||||
{
|
||||
@@ -762,8 +820,12 @@ const big2: AnalysisTestResponse = {
|
||||
normStatus: 0,
|
||||
responseTime: '2025-09-12 14:02:04',
|
||||
responseValue: 0,
|
||||
normUpper: null,
|
||||
normLower: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '771-6',
|
||||
},
|
||||
{
|
||||
@@ -772,8 +834,12 @@ const big2: AnalysisTestResponse = {
|
||||
normStatus: 0,
|
||||
responseTime: '2025-09-12 14:02:04',
|
||||
responseValue: 0,
|
||||
normUpper: null,
|
||||
normLower: null,
|
||||
normLowerIncluded: false,
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
analysisElementOriginalId: '58413-6',
|
||||
},
|
||||
],
|
||||
@@ -787,7 +853,7 @@ const big2: AnalysisTestResponse = {
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: false,
|
||||
responseValueIsWithinNorm: false,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '57021-8',
|
||||
},
|
||||
},
|
||||
@@ -808,7 +874,7 @@ const big2: AnalysisTestResponse = {
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: false,
|
||||
responseValueIsWithinNorm: false,
|
||||
status: '5',
|
||||
status: 5,
|
||||
analysisElementOriginalId: '43583-4',
|
||||
},
|
||||
},
|
||||
@@ -830,7 +896,7 @@ const big2: AnalysisTestResponse = {
|
||||
normUpperIncluded: false,
|
||||
responseValueIsNegative: null,
|
||||
responseValueIsWithinNorm: null,
|
||||
status: '4',
|
||||
status: 4,
|
||||
analysisElementOriginalId: '60493-4',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user