feat(MED-168): clean up types
This commit is contained in:
@@ -4,12 +4,7 @@ import { ArrowDown } from 'lucide-react';
|
|||||||
|
|
||||||
import { cn } from '@kit/ui/utils';
|
import { cn } from '@kit/ui/utils';
|
||||||
import type { AnalysisResultDetailsElementResults } from '@/packages/features/user-analyses/src/types/analysis-results';
|
import type { AnalysisResultDetailsElementResults } from '@/packages/features/user-analyses/src/types/analysis-results';
|
||||||
|
import { AnalysisResultLevel } from '@/packages/features/user-analyses/src/types/analysis-results';
|
||||||
export enum AnalysisResultLevel {
|
|
||||||
NORMAL = 0,
|
|
||||||
WARNING = 1,
|
|
||||||
CRITICAL = 2,
|
|
||||||
}
|
|
||||||
|
|
||||||
type AnalysisResultLevelBarResults = Pick<AnalysisResultDetailsElementResults, 'normLower' | 'normUpper' | 'responseValue'>;
|
type AnalysisResultLevelBarResults = Pick<AnalysisResultDetailsElementResults, 'normLower' | 'normUpper' | 'responseValue'>;
|
||||||
|
|
||||||
@@ -148,34 +143,10 @@ const AnalysisLevelBar = ({
|
|||||||
const isValueInNormalRange = !isValueBelowLower && !isValueAboveUpper;
|
const isValueInNormalRange = !isValueBelowLower && !isValueAboveUpper;
|
||||||
|
|
||||||
const [first, second, third] = useMemo(() => {
|
const [first, second, third] = useMemo(() => {
|
||||||
if (!hasLowerBound) {
|
const [warning, normal, critical] = [
|
||||||
return [
|
|
||||||
{
|
|
||||||
isActive: isNormal,
|
|
||||||
color: "success",
|
|
||||||
isFirst: true,
|
|
||||||
normRangeText,
|
|
||||||
...(isNormal ? { arrowLocation } : {}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
isActive: isWarning,
|
|
||||||
color: "warning",
|
|
||||||
...(isWarning ? { arrowLocation } : {}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
isActive: isCritical,
|
|
||||||
color: "destructive",
|
|
||||||
isLast: true,
|
|
||||||
...(isCritical ? { arrowLocation } : {}),
|
|
||||||
},
|
|
||||||
] as const;
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
{
|
{
|
||||||
isActive: isWarning,
|
isActive: isWarning,
|
||||||
color: "warning",
|
color: "warning",
|
||||||
isFirst: true,
|
|
||||||
...(isWarning ? { arrowLocation } : {}),
|
...(isWarning ? { arrowLocation } : {}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -191,6 +162,20 @@ const AnalysisLevelBar = ({
|
|||||||
...(isCritical ? { arrowLocation } : {}),
|
...(isCritical ? { arrowLocation } : {}),
|
||||||
},
|
},
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
|
if (!hasLowerBound) {
|
||||||
|
return [
|
||||||
|
{ ...normal, isFirst: true },
|
||||||
|
warning,
|
||||||
|
critical,
|
||||||
|
] as const;
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
{ ...warning, isFirst: true },
|
||||||
|
normal,
|
||||||
|
{ ...critical, isLast: true },
|
||||||
|
] as const;
|
||||||
}, [isValueBelowLower, isValueAboveUpper, isValueInNormalRange, arrowLocation, normRangeText, isNormal, isWarning, isCritical]);
|
}, [isValueBelowLower, isValueAboveUpper, isValueInNormalRange, arrowLocation, normRangeText, isNormal, isWarning, isCritical]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -2,27 +2,18 @@
|
|||||||
|
|
||||||
import React, { useMemo, useState } from 'react';
|
import React, { useMemo, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import type {
|
|
||||||
AnalysisResultDetailsElementResults,
|
|
||||||
AnalysisResultDetailsElement,
|
|
||||||
AnalysisResultsDetailsElementNested,
|
|
||||||
} from '@/packages/features/user-analyses/src/types/analysis-results';
|
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import { Info } from 'lucide-react';
|
import { Info } from 'lucide-react';
|
||||||
|
|
||||||
|
import type {
|
||||||
|
AnalysisResultDetailsElement,
|
||||||
|
AnalysisResultsDetailsElementNested,
|
||||||
|
} from '@/packages/features/user-analyses/src/types/analysis-results';
|
||||||
|
import { AnalysisResultLevel } from '@/packages/features/user-analyses/src/types/analysis-results';
|
||||||
import { Trans } from '@kit/ui/trans';
|
import { Trans } from '@kit/ui/trans';
|
||||||
import { cn } from '@kit/ui/utils';
|
import { cn } from '@kit/ui/utils';
|
||||||
|
|
||||||
import AnalysisLevelBar, {
|
import AnalysisLevelBar from './analysis-level-bar';
|
||||||
AnalysisResultLevel,
|
|
||||||
} from './analysis-level-bar';
|
|
||||||
|
|
||||||
export enum AnalysisStatus {
|
|
||||||
NORMAL = 0,
|
|
||||||
MEDIUM = 1,
|
|
||||||
HIGH = 2,
|
|
||||||
}
|
|
||||||
|
|
||||||
const Analysis = ({
|
const Analysis = ({
|
||||||
element: elementOriginal,
|
element: elementOriginal,
|
||||||
@@ -41,7 +32,7 @@ const Analysis = ({
|
|||||||
}
|
}
|
||||||
return elementOriginal!;
|
return elementOriginal!;
|
||||||
})();
|
})();
|
||||||
const results: AnalysisResultDetailsElementResults = useMemo(() => {
|
const results: AnalysisResultDetailsElement['results'] = useMemo(() => {
|
||||||
if (isNestedElement) {
|
if (isNestedElement) {
|
||||||
const nestedElement = element as AnalysisResultsDetailsElementNested;
|
const nestedElement = element as AnalysisResultsDetailsElementNested;
|
||||||
return {
|
return {
|
||||||
@@ -115,7 +106,8 @@ const Analysis = ({
|
|||||||
}, [normStatus]);
|
}, [normStatus]);
|
||||||
|
|
||||||
const isCancelled = Number(results?.status) === 5;
|
const isCancelled = Number(results?.status) === 5;
|
||||||
const hasNestedElements = results?.nestedElements.length > 0;
|
const nestedElements = results?.nestedElements ?? null;
|
||||||
|
const hasNestedElements = Array.isArray(nestedElements) && nestedElements.length > 0;
|
||||||
|
|
||||||
const normRangeText = (() => {
|
const normRangeText = (() => {
|
||||||
if (normLower === null && normUpper === null) {
|
if (normLower === null && normUpper === null) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Database } from '@kit/supabase/database';
|
|||||||
import { toArray } from '@kit/shared/utils';
|
import { toArray } from '@kit/shared/utils';
|
||||||
import type { UuringuVastus } from '@kit/shared/types/medipost-analysis';
|
import type { UuringuVastus } from '@kit/shared/types/medipost-analysis';
|
||||||
|
|
||||||
import type { AnalysisResultDetails, AnalysisResultDetailsMapped, AnalysisResultsDetailsElementNested, UserAnalysis } from '../types/analysis-results';
|
import type { AnalysisResultsQuery, AnalysisResultDetailsElement, AnalysisResultDetailsMapped, AnalysisResultLevel, AnalysisResultsDetailsElementNested, AnalysisStatus, UserAnalysis } from '../types/analysis-results';
|
||||||
import type { AnalysisOrder } from '../types/analysis-orders';
|
import type { AnalysisOrder } from '../types/analysis-orders';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,7 +74,7 @@ class UserAnalysesApi {
|
|||||||
order: {
|
order: {
|
||||||
status: analysisOrder.status,
|
status: analysisOrder.status,
|
||||||
medusaOrderId: analysisOrder.medusa_order_id,
|
medusaOrderId: analysisOrder.medusa_order_id,
|
||||||
createdAt: new Date(analysisOrder.created_at),
|
createdAt: analysisOrder.created_at,
|
||||||
},
|
},
|
||||||
orderedAnalysisElements: mappedOrderedAnalysisElements,
|
orderedAnalysisElements: mappedOrderedAnalysisElements,
|
||||||
summary:
|
summary:
|
||||||
@@ -107,7 +107,7 @@ class UserAnalysesApi {
|
|||||||
.eq('analysis_order_id', analysisOrderId)
|
.eq('analysis_order_id', analysisOrderId)
|
||||||
.throwOnError();
|
.throwOnError();
|
||||||
|
|
||||||
return analysisResponse?.[0] as AnalysisResultDetails | null;
|
return analysisResponse?.[0] as AnalysisResultsQuery | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getOrderedAnalysisElements({
|
async getOrderedAnalysisElements({
|
||||||
@@ -133,9 +133,9 @@ class UserAnalysesApi {
|
|||||||
analysisResponseElements,
|
analysisResponseElements,
|
||||||
orderedAnalysisElements,
|
orderedAnalysisElements,
|
||||||
}: {
|
}: {
|
||||||
analysisResponseElements: AnalysisResultDetails['elements'];
|
analysisResponseElements: AnalysisResultsQuery['elements'];
|
||||||
orderedAnalysisElements: { analysis_id_original: string; analysis_name_lab: string }[];
|
orderedAnalysisElements: { analysis_id_original: string; analysis_name_lab: string }[];
|
||||||
}) {
|
}): Promise<AnalysisResultDetailsElement[]> {
|
||||||
const mappedOrderedAnalysisElements = orderedAnalysisElements.map(({ analysis_id_original, analysis_name_lab }) => {
|
const mappedOrderedAnalysisElements = orderedAnalysisElements.map(({ analysis_id_original, analysis_name_lab }) => {
|
||||||
return this.getOrderedAnalysisElement({
|
return this.getOrderedAnalysisElement({
|
||||||
analysisIdOriginal: analysis_id_original,
|
analysisIdOriginal: analysis_id_original,
|
||||||
@@ -186,8 +186,8 @@ class UserAnalysesApi {
|
|||||||
}: {
|
}: {
|
||||||
analysisIdOriginal: string;
|
analysisIdOriginal: string;
|
||||||
analysisNameLab: string;
|
analysisNameLab: string;
|
||||||
analysisResponseElements: AnalysisResultDetails['elements'];
|
analysisResponseElements: AnalysisResultsQuery['elements'];
|
||||||
}) {
|
}): AnalysisResultDetailsElement {
|
||||||
const elementResponse = analysisResponseElements.find((element) => element.analysis_element_original_id === analysisIdOriginal);
|
const elementResponse = analysisResponseElements.find((element) => element.analysis_element_original_id === analysisIdOriginal);
|
||||||
if (!elementResponse) {
|
if (!elementResponse) {
|
||||||
return {
|
return {
|
||||||
@@ -202,7 +202,7 @@ class UserAnalysesApi {
|
|||||||
isWaitingForResults: false,
|
isWaitingForResults: false,
|
||||||
analysisName: analysisNameLab,
|
analysisName: analysisNameLab,
|
||||||
results: {
|
results: {
|
||||||
nestedElements: (() => {
|
nestedElements: ((): AnalysisResultsDetailsElementNested[] => {
|
||||||
const nestedElements = toArray(elementResponse.original_response_element?.UuringuElement)
|
const nestedElements = toArray(elementResponse.original_response_element?.UuringuElement)
|
||||||
return nestedElements.map<AnalysisResultsDetailsElementNested>((element) => {
|
return nestedElements.map<AnalysisResultsDetailsElementNested>((element) => {
|
||||||
const mappedResponse = this.mapUuringVastus({
|
const mappedResponse = this.mapUuringVastus({
|
||||||
@@ -220,13 +220,12 @@ class UserAnalysesApi {
|
|||||||
normLowerIncluded: mappedResponse.normLowerIncluded,
|
normLowerIncluded: mappedResponse.normLowerIncluded,
|
||||||
normUpperIncluded: mappedResponse.normUpperIncluded,
|
normUpperIncluded: mappedResponse.normUpperIncluded,
|
||||||
analysisElementOriginalId: element.UuringId,
|
analysisElementOriginalId: element.UuringId,
|
||||||
status: elementResponse.status,
|
status: Number(elementResponse.status) as AnalysisStatus,
|
||||||
analysisName: undefined,
|
analysisName: undefined,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
})(),
|
})(),
|
||||||
labComment,
|
labComment,
|
||||||
//originalResponseElement: elementResponse.original_response_element ?? null,
|
|
||||||
unit: elementResponse.unit,
|
unit: elementResponse.unit,
|
||||||
normLower: elementResponse.norm_lower,
|
normLower: elementResponse.norm_lower,
|
||||||
normUpper: elementResponse.norm_upper,
|
normUpper: elementResponse.norm_upper,
|
||||||
@@ -237,9 +236,8 @@ class UserAnalysesApi {
|
|||||||
responseValueIsWithinNorm: elementResponse.response_value_is_within_norm === null ? null : elementResponse.response_value_is_within_norm === true,
|
responseValueIsWithinNorm: elementResponse.response_value_is_within_norm === null ? null : elementResponse.response_value_is_within_norm === true,
|
||||||
normLowerIncluded: elementResponse.norm_lower_included,
|
normLowerIncluded: elementResponse.norm_lower_included,
|
||||||
normUpperIncluded: elementResponse.norm_upper_included,
|
normUpperIncluded: elementResponse.norm_upper_included,
|
||||||
status: elementResponse.status,
|
status: Number(elementResponse.status) as AnalysisStatus,
|
||||||
analysisElementOriginalId: elementResponse.analysis_element_original_id,
|
analysisElementOriginalId: elementResponse.analysis_element_original_id,
|
||||||
elementResponse,
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -260,7 +258,7 @@ class UserAnalysesApi {
|
|||||||
return {
|
return {
|
||||||
normLower: uuringVastus?.NormAlum?.['#text'] ?? null,
|
normLower: uuringVastus?.NormAlum?.['#text'] ?? null,
|
||||||
normUpper: uuringVastus?.NormYlem?.['#text'] ?? null,
|
normUpper: uuringVastus?.NormYlem?.['#text'] ?? null,
|
||||||
normStatus: uuringVastus?.NormiStaatus ?? null,
|
normStatus: (uuringVastus?.NormiStaatus ?? null) as AnalysisResultLevel | null,
|
||||||
responseTime: uuringVastus?.VastuseAeg ?? null,
|
responseTime: uuringVastus?.VastuseAeg ?? null,
|
||||||
responseValue: responseValueIsNegative || !responseValueIsNumeric ? null : (responseValueNumber ?? null),
|
responseValue: responseValueIsNegative || !responseValueIsNumeric ? null : (responseValueNumber ?? null),
|
||||||
responseValueIsNegative: responseValueIsNumeric ? null : responseValueIsNegative,
|
responseValueIsNegative: responseValueIsNumeric ? null : responseValueIsNegative,
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { Database } from '@kit/supabase/database';
|
import type { Database } from '@kit/supabase/database';
|
||||||
import { AnalysisOrderStatus, NormStatus } from '@kit/shared/types/medipost-analysis';
|
import type { AnalysisOrderStatus, NormStatus } from '@kit/shared/types/medipost-analysis';
|
||||||
|
|
||||||
|
import type { AnalysisOrder } from './analysis-orders';
|
||||||
|
|
||||||
export type UserAnalysisElement =
|
export type UserAnalysisElement =
|
||||||
Database['medreport']['Tables']['analysis_response_elements']['Row'];
|
Database['medreport']['Tables']['analysis_response_elements']['Row'];
|
||||||
@@ -9,79 +11,7 @@ export type UserAnalysisResponse =
|
|||||||
};
|
};
|
||||||
export type UserAnalysis = UserAnalysisResponse[];
|
export type UserAnalysis = UserAnalysisResponse[];
|
||||||
|
|
||||||
type ElementSchema = {
|
export type AnalysisResultsQuery = {
|
||||||
unit: string,
|
|
||||||
norm_lower: number,
|
|
||||||
norm_upper: number,
|
|
||||||
norm_status: number,
|
|
||||||
analysis_name: string,
|
|
||||||
response_time: string,
|
|
||||||
response_value: number,
|
|
||||||
response_value_is_negative: boolean,
|
|
||||||
response_value_is_within_norm: boolean,
|
|
||||||
norm_lower_included: boolean,
|
|
||||||
norm_upper_included: boolean,
|
|
||||||
status: string,
|
|
||||||
analysis_element_original_id: string,
|
|
||||||
original_response_element: {
|
|
||||||
UuringuElement: {
|
|
||||||
UuringIdOID: string,
|
|
||||||
UuringId: string,
|
|
||||||
TLyhend: string,
|
|
||||||
KNimetus: string,
|
|
||||||
UuringNimi: string,
|
|
||||||
UuringuKommentaar: string | null,
|
|
||||||
TellijaUuringId: number,
|
|
||||||
TeostajaUuringId: string,
|
|
||||||
UuringOlek: keyof typeof AnalysisOrderStatus,
|
|
||||||
Mootyhik: string | null,
|
|
||||||
Kood: {
|
|
||||||
HkKood: number,
|
|
||||||
HkKoodiKordaja: number,
|
|
||||||
Koefitsient: number,
|
|
||||||
Hind: number,
|
|
||||||
},
|
|
||||||
UuringuVastus: {
|
|
||||||
VastuseVaartus: string,
|
|
||||||
VastuseAeg: string,
|
|
||||||
NormiStaatus: keyof typeof NormStatus,
|
|
||||||
ProoviJarjenumber: number,
|
|
||||||
},
|
|
||||||
UuringuTaitjaAsutuseJnr: number,
|
|
||||||
},
|
|
||||||
UuringuKommentaar: string | null,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
type OrderSchema = {
|
|
||||||
status: string,
|
|
||||||
medusa_order_id: string,
|
|
||||||
created_at: string,
|
|
||||||
};
|
|
||||||
|
|
||||||
type DoctorAnalysisFeedbackSchema = {
|
|
||||||
id: number,
|
|
||||||
status: string,
|
|
||||||
user_id: string,
|
|
||||||
created_at: string,
|
|
||||||
created_by: string,
|
|
||||||
};
|
|
||||||
|
|
||||||
type SummarySchema = {
|
|
||||||
id: number,
|
|
||||||
value: string,
|
|
||||||
status: string,
|
|
||||||
user_id: string,
|
|
||||||
created_at: string,
|
|
||||||
created_by: string,
|
|
||||||
updated_at: string | null,
|
|
||||||
updated_by: string,
|
|
||||||
doctor_user_id: string | null,
|
|
||||||
analysis_order_id: number,
|
|
||||||
doctor_analysis_feedback: DoctorAnalysisFeedbackSchema[],
|
|
||||||
};
|
|
||||||
|
|
||||||
export type AnalysisResultDetails = {
|
|
||||||
id: number,
|
id: number,
|
||||||
analysis_order_id: number,
|
analysis_order_id: number,
|
||||||
order_number: string,
|
order_number: string,
|
||||||
@@ -89,9 +19,73 @@ export type AnalysisResultDetails = {
|
|||||||
user_id: string,
|
user_id: string,
|
||||||
created_at: string,
|
created_at: string,
|
||||||
updated_at: string | null,
|
updated_at: string | null,
|
||||||
elements: ElementSchema[],
|
elements: {
|
||||||
order: OrderSchema,
|
unit: string,
|
||||||
summary: SummarySchema | null,
|
norm_lower: number,
|
||||||
|
norm_upper: number,
|
||||||
|
norm_status: number,
|
||||||
|
analysis_name: string,
|
||||||
|
response_time: string,
|
||||||
|
response_value: number,
|
||||||
|
response_value_is_negative: boolean,
|
||||||
|
response_value_is_within_norm: boolean,
|
||||||
|
norm_lower_included: boolean,
|
||||||
|
norm_upper_included: boolean,
|
||||||
|
status: string,
|
||||||
|
analysis_element_original_id: string,
|
||||||
|
original_response_element: {
|
||||||
|
UuringuElement: {
|
||||||
|
UuringIdOID: string,
|
||||||
|
UuringId: string,
|
||||||
|
TLyhend: string,
|
||||||
|
KNimetus: string,
|
||||||
|
UuringNimi: string,
|
||||||
|
UuringuKommentaar: string | null,
|
||||||
|
TellijaUuringId: number,
|
||||||
|
TeostajaUuringId: string,
|
||||||
|
UuringOlek: keyof typeof AnalysisOrderStatus,
|
||||||
|
Mootyhik: string | null,
|
||||||
|
Kood: {
|
||||||
|
HkKood: number,
|
||||||
|
HkKoodiKordaja: number,
|
||||||
|
Koefitsient: number,
|
||||||
|
Hind: number,
|
||||||
|
},
|
||||||
|
UuringuVastus: {
|
||||||
|
VastuseVaartus: string,
|
||||||
|
VastuseAeg: string,
|
||||||
|
NormiStaatus: keyof typeof NormStatus,
|
||||||
|
ProoviJarjenumber: number,
|
||||||
|
},
|
||||||
|
UuringuTaitjaAsutuseJnr: number,
|
||||||
|
},
|
||||||
|
UuringuKommentaar: string | null,
|
||||||
|
},
|
||||||
|
}[],
|
||||||
|
order: {
|
||||||
|
status: string,
|
||||||
|
medusa_order_id: string,
|
||||||
|
created_at: string,
|
||||||
|
},
|
||||||
|
summary: {
|
||||||
|
id: number,
|
||||||
|
value: string,
|
||||||
|
status: string,
|
||||||
|
user_id: string,
|
||||||
|
created_at: string,
|
||||||
|
created_by: string,
|
||||||
|
updated_at: string | null,
|
||||||
|
updated_by: string,
|
||||||
|
doctor_user_id: string | null,
|
||||||
|
analysis_order_id: number,
|
||||||
|
doctor_analysis_feedback: {
|
||||||
|
id: number,
|
||||||
|
status: string,
|
||||||
|
user_id: string,
|
||||||
|
created_at: string,
|
||||||
|
created_by: string,
|
||||||
|
}[],
|
||||||
|
} | null,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type AnalysisResultsDetailsElementNested = {
|
export type AnalysisResultsDetailsElementNested = {
|
||||||
@@ -113,18 +107,33 @@ export type AnalysisResultsDetailsElementNested = {
|
|||||||
'analysisElementOriginalId'
|
'analysisElementOriginalId'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
export enum AnalysisResultLevel {
|
||||||
|
NORMAL = 0,
|
||||||
|
WARNING = 1,
|
||||||
|
CRITICAL = 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum AnalysisStatus {
|
||||||
|
QUEUED = 1,
|
||||||
|
PENDING = 2,
|
||||||
|
ONGOING = 3,
|
||||||
|
COMPLETED = 4,
|
||||||
|
REFUSED = 5,
|
||||||
|
CANCELLED = 6,
|
||||||
|
}
|
||||||
|
|
||||||
export type AnalysisResultDetailsElementResults = {
|
export type AnalysisResultDetailsElementResults = {
|
||||||
unit: string | null;
|
unit: string | null;
|
||||||
normLower: number | null;
|
normLower: number | null;
|
||||||
normUpper: number | null;
|
normUpper: number | null;
|
||||||
normStatus: number | null;
|
normStatus: AnalysisResultLevel | null;
|
||||||
responseTime: string | null;
|
responseTime: string | null;
|
||||||
responseValue: number | null;
|
responseValue: number | null;
|
||||||
responseValueIsNegative: boolean | null;
|
responseValueIsNegative: boolean | null;
|
||||||
responseValueIsWithinNorm: boolean | null;
|
responseValueIsWithinNorm: boolean | null;
|
||||||
normLowerIncluded: boolean;
|
normLowerIncluded: boolean;
|
||||||
normUpperIncluded: boolean;
|
normUpperIncluded: boolean;
|
||||||
status: string;
|
status: AnalysisStatus;
|
||||||
analysisElementOriginalId: string;
|
analysisElementOriginalId: string;
|
||||||
nestedElements: AnalysisResultsDetailsElementNested[];
|
nestedElements: AnalysisResultsDetailsElementNested[];
|
||||||
labComment?: string | null;
|
labComment?: string | null;
|
||||||
@@ -140,10 +149,9 @@ export type AnalysisResultDetailsElement = {
|
|||||||
export type AnalysisResultDetailsMapped = {
|
export type AnalysisResultDetailsMapped = {
|
||||||
id: number;
|
id: number;
|
||||||
order: {
|
order: {
|
||||||
status: string;
|
|
||||||
medusaOrderId: string;
|
medusaOrderId: string;
|
||||||
createdAt: Date | string;
|
createdAt: string;
|
||||||
};
|
} & Pick<AnalysisOrder, 'status'>;
|
||||||
orderedAnalysisElements: AnalysisResultDetailsElement[];
|
orderedAnalysisElements: AnalysisResultDetailsElement[];
|
||||||
summary: {
|
summary: {
|
||||||
id: number;
|
id: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user