Merge branch 'develop' into MED-177
This commit is contained in:
@@ -120,7 +120,7 @@ export async function canCreateAnalysisResponseElement({
|
||||
|
||||
if (existingAnalysisResponseElement.response_value && !responseValue) {
|
||||
log(
|
||||
`Analysis response element id=${analysisElementOriginalId} already exists for order with response value ${existingAnalysisResponseElement.response_value} but new response has no value`,
|
||||
`Analysis response element id=${analysisElementOriginalId} ${existingAnalysisResponseElement.response_value} but new response has no value`,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -371,8 +371,13 @@ export async function readPrivateMessageResponse({
|
||||
const hasInvalidOrderId = isNaN(analysisOrderId);
|
||||
|
||||
if (hasInvalidOrderId || !messageResponse || !patientPersonalCode) {
|
||||
console.log({
|
||||
privateMessageContent,
|
||||
saadetis: privateMessageContent?.Saadetis,
|
||||
messageResponse,
|
||||
});
|
||||
console.error(
|
||||
`Invalid order id or message response or patient personal code, medipostExternalOrderId=${medipostExternalOrderId}, privateMessageId=${privateMessageId}`,
|
||||
`Invalid !order id or message response or patient personal code, medipostExternalOrderId=${medipostExternalOrderId}, privateMessageId=${privateMessageId}`,
|
||||
);
|
||||
await upsertMedipostActionLog({
|
||||
action: 'sync_analysis_results_from_medipost',
|
||||
@@ -397,7 +402,7 @@ export async function readPrivateMessageResponse({
|
||||
try {
|
||||
analysisOrder = await getAnalysisOrder({ analysisOrderId });
|
||||
medusaOrderId = analysisOrder.medusa_order_id;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
if (IS_ENABLED_DELETE_PRIVATE_MESSAGE) {
|
||||
await deletePrivateMessage(privateMessageId);
|
||||
}
|
||||
@@ -568,7 +573,6 @@ export async function sendOrderToMedipost({
|
||||
phone: account.phone ?? '',
|
||||
},
|
||||
orderId: medreportOrder.id,
|
||||
orderCreatedAt: new Date(medreportOrder.created_at),
|
||||
comment: '',
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user