From 25e8370250f2c75ab3f76f4b27df1faff321258c Mon Sep 17 00:00:00 2001 From: Vineet Sharma Date: Fri, 10 Jan 2025 22:01:19 +0530 Subject: [PATCH] Make the reference number and instructions fields nullish --- .../general-order-form/general-order-form.component.tsx | 4 ++-- .../test-orders/add-test-order/test-order-form.component.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/esm-patient-orders-app/src/order-basket/general-order-type/general-order-form/general-order-form.component.tsx b/packages/esm-patient-orders-app/src/order-basket/general-order-type/general-order-form/general-order-form.component.tsx index e976b88f01..d7b618c7cc 100644 --- a/packages/esm-patient-orders-app/src/order-basket/general-order-type/general-order-form/general-order-form.component.tsx +++ b/packages/esm-patient-orders-app/src/order-basket/general-order-type/general-order-form/general-order-form.component.tsx @@ -58,11 +58,11 @@ export function OrderForm({ const OrderFormSchema = useMemo( () => z.object({ - instructions: z.string().optional(), + instructions: z.string().nullish(), urgency: z.string().refine((value) => value !== '', { message: translateFrom(moduleName, 'addLabOrderPriorityRequired', 'Priority is required'), }), - accessionNumber: z.string().optional(), + accessionNumber: z.string().nullish(), concept: z.object( { display: z.string(), uuid: z.string() }, { diff --git a/packages/esm-patient-tests-app/src/test-orders/add-test-order/test-order-form.component.tsx b/packages/esm-patient-tests-app/src/test-orders/add-test-order/test-order-form.component.tsx index 01ba8f0fc7..fa48c81f60 100644 --- a/packages/esm-patient-tests-app/src/test-orders/add-test-order/test-order-form.component.tsx +++ b/packages/esm-patient-tests-app/src/test-orders/add-test-order/test-order-form.component.tsx @@ -62,11 +62,11 @@ export function LabOrderForm({ const labOrderFormSchema = useMemo( () => z.object({ - instructions: z.string().optional(), + instructions: z.string().nullish(), urgency: z.string().refine((value) => value !== '', { message: translateFrom(moduleName, 'addLabOrderPriorityRequired', 'Priority is required'), }), - accessionNumber: z.string().nullable(), + accessionNumber: z.string().nullish(), testType: z.object( { label: z.string(), conceptUuid: z.string() }, {