From 24a47109ecb32bb58fb74b05143fb33b797e9c50 Mon Sep 17 00:00:00 2001 From: arodidev <51090527+arodidev@users.noreply.github.com> Date: Wed, 15 May 2024 12:51:41 +0300 Subject: [PATCH] return uuid from encounter type object --- packages/esm-form-engine-app/src/hooks/useFormSchema.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/esm-form-engine-app/src/hooks/useFormSchema.tsx b/packages/esm-form-engine-app/src/hooks/useFormSchema.tsx index 1af3bbbf5c..31f1ce204a 100644 --- a/packages/esm-form-engine-app/src/hooks/useFormSchema.tsx +++ b/packages/esm-form-engine-app/src/hooks/useFormSchema.tsx @@ -14,7 +14,9 @@ const useFormSchema = (formUuid: string) => { const { data, error, isLoading } = useSWR<{ data: FormSchema }>(url, openmrsFetch); - return { schema: data?.data, error, isLoading }; + const schema = { ...data?.data, encounterType: data?.data.encounterType['uuid'] }; + + return { schema, error, isLoading }; }; export default useFormSchema;