feat(MED-131): move jobs to /api/job/* secured with key
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
getClientInstitution,
|
||||
getClientPerson,
|
||||
getConfidentiality,
|
||||
getOrderEnteredByPerson,
|
||||
getPais,
|
||||
getPatient,
|
||||
getProviderInstitution,
|
||||
@@ -149,6 +148,7 @@ export async function getPrivateMessage(messageId: string) {
|
||||
const parsed = parser.parse(data);
|
||||
|
||||
if (parsed.ANSWER?.CODE && parsed.ANSWER?.CODE !== 0) {
|
||||
console.error("Bad response", data);
|
||||
throw new Error(`Failed to get private message (id: ${messageId})`);
|
||||
}
|
||||
|
||||
@@ -378,10 +378,13 @@ export async function syncPublicMessage(
|
||||
}
|
||||
}
|
||||
|
||||
// TODO use actual parameters
|
||||
export async function composeOrderXML(
|
||||
/* chosenAnalysisElements?: number[],
|
||||
chosenAnalyses?: number[], */
|
||||
person: {
|
||||
idCode: string,
|
||||
firstName: string,
|
||||
lastName: string,
|
||||
phone: string,
|
||||
},
|
||||
comment?: string,
|
||||
) {
|
||||
const supabase = createCustomClient(
|
||||
@@ -512,11 +515,9 @@ export async function composeOrderXML(
|
||||
<!--<TeostajaAsutus>-->
|
||||
${getProviderInstitution()}
|
||||
<!--<TellijaIsik>-->
|
||||
${getClientPerson()}
|
||||
<!--<SisestajaIsik>-->
|
||||
${getOrderEnteredByPerson()}
|
||||
${getClientPerson(person)}
|
||||
<TellijaMarkused>${comment ?? ''}</TellijaMarkused>
|
||||
${getPatient(49610230861, 'Surname', 'First Name', '1996-10-23', 'N')}
|
||||
${getPatient(person)}
|
||||
${getConfidentiality()}
|
||||
${specimenSection.join('')}
|
||||
${analysisSection?.join('')}
|
||||
|
||||
Reference in New Issue
Block a user