                    'normalRange' => $request->normalRange[$key],
                    // 'finalNormalValue' => $request->finalNormalValue[$key],
                    'firstCriticalValue' => $request->firstCriticalValue[$key],
                    'finalCriticalValue' => $request->finalCriticalValue[$key],
                    'unit' => $request->units[$key],
                ]);
            }
        //for type 5 (two tables)
        if (isset($request->title2))
            foreach ($request->title2 as $key => $value) {
                if ($value == null  || $value == "")
                    continue;