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

@@ -37,7 +37,7 @@ import { Tables } from '@kit/supabase/database';
import { createAnalysisGroup } from './analysis-group.service';
import { getSupabaseServerAdminClient } from '@/packages/supabase/src/clients/server-admin-client';
import { getOrder } from './order.service';
import { getAnalysisElements } from './analysis-element.service';
import { getAnalysisElementsAdmin } from './analysis-element.service';
import { getAnalyses } from './analyses.service';
const BASE_URL = process.env.MEDIPOST_URL!;
@@ -407,7 +407,7 @@ export async function composeOrderXML({
orderCreatedAt: Date;
comment?: string;
}) {
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'>[] =