feat(MED-161): create analysis-order service
This commit is contained in:
17
lib/services/analysis-order.service.ts
Normal file
17
lib/services/analysis-order.service.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { getSupabaseServerAdminClient } from "@/packages/supabase/src/clients/server-admin-client";
|
||||
import type { AnalysisResponseElement } from "../types/analysis-response-element";
|
||||
|
||||
export async function getExistingAnalysisResponseElements({
|
||||
analysisResponseId,
|
||||
}: {
|
||||
analysisResponseId: number;
|
||||
}) {
|
||||
const { data } = await getSupabaseServerAdminClient()
|
||||
.schema('medreport')
|
||||
.from('analysis_response_elements')
|
||||
.select('*')
|
||||
.eq('analysis_response_id', analysisResponseId)
|
||||
.throwOnError();
|
||||
|
||||
return data as AnalysisResponseElement[];
|
||||
}
|
||||
Reference in New Issue
Block a user