feat(MED-131): update analyses on package logic

This commit is contained in:
2025-08-04 11:55:23 +03:00
parent c02cb046a5
commit 7c3aa45ec7
9 changed files with 88 additions and 51 deletions

View File

@@ -16,7 +16,7 @@ import { uniqBy } from 'lodash';
import { Tables } from '@kit/supabase/database';
import { formatDate } from 'date-fns';
import { getAnalyses } from './analyses.service';
import { getAnalysisElements } from './analysis-element.service';
import { getAnalysisElementsAdmin } from './analysis-element.service';
import { validateMedipostResponse } from './medipost.service';
const BASE_URL = process.env.MEDIPOST_URL!;
@@ -70,7 +70,7 @@ export async function composeOrderTestResponseXML({
orderId: string;
orderCreatedAt: Date;
}) {
const analysisElements = await getAnalysisElements({ ids: orderedAnalysisElementsIds });
const analysisElements = await getAnalysisElementsAdmin({ ids: orderedAnalysisElementsIds });
const analyses = await getAnalyses({ ids: orderedAnalysesIds });
const analysisGroups: Tables<{ schema: 'medreport' }, 'analysis_groups'>[] =