go to post Swathi Chilukuri · Mar 19, 2020 I can definitely try that but what does CASE WHEN NVL(quantity,'')='' OR NVL(quantity_unit,'')='' THEN '' ELSE quantity || ' ' || quantity_unit || ' ' END || frequency_description END || mean? What does those symbols represent, I am new to cache so trying to learn. Thank You
go to post Swathi Chilukuri · Mar 19, 2020 full code SELECT (CASE WHEN (order_description IS NULL OR (order_description='')) THEN ''ELSE (order_description) END) !!(CASE WHEN (dosage IS NULL OR dosage_unit IS NULL OR (dosage='') OR (dosage_unit='')) THEN ''ELSE (', ' !! dosage !! ' ' !! dosage_unit !!(CASE WHEN (dosage_form IS NULL OR (dosage_form='')) THEN ''ELSE (' ' !! dosage_form) END) !! '') END) !!(CASE WHEN (administration_route IS NULL OR (administration_route='')) THEN ''ELSE (', ' !! administration_route) END) !!(CASE WHEN (frequency_description IS NULL OR (frequency_description='')) THEN ''ELSE (', ' !! (CASE WHEN (quantity IS NULL OR quantity_unit IS NULL OR(quantity='') OR (quantity_unit='')) THEN ''ELSE (quantity !! ' ' !! quantity_unit !! ' ') END) !! frequency_description) END) !!(CASE WHEN start_date IS NULL THEN '' ELSE (', ' !! 'Start Date: ' !!CONVERT(SQL_DATE,start_date,101)) END) As MedicationOrderFROM CWSOrderEntry.history_client_orderWHERE PATID='100068'--AND FACILITY=?FACILITYAND order_status_code='A'AND order_type_category_code='P'
go to post Swathi Chilukuri · Mar 19, 2020 full code SELECT (CASE WHEN (order_description IS NULL OR (order_description='')) THEN ''ELSE (order_description) END) !!(CASE WHEN (dosage IS NULL OR dosage_unit IS NULL OR (dosage='') OR (dosage_unit='')) THEN ''ELSE (', ' !! dosage !! ' ' !! dosage_unit !!(CASE WHEN (dosage_form IS NULL OR (dosage_form='')) THEN ''ELSE (' ' !! dosage_form) END) !! '') END) !!(CASE WHEN (administration_route IS NULL OR (administration_route='')) THEN ''ELSE (', ' !! administration_route) END) !!(CASE WHEN (frequency_description IS NULL OR (frequency_description='')) THEN ''ELSE (', ' !! (CASE WHEN (quantity IS NULL OR quantity_unit IS NULL OR(quantity='') OR (quantity_unit='')) THEN ''ELSE (quantity !! ' ' !! quantity_unit !! ' ') END) !! frequency_description) END) !!(CASE WHEN start_date IS NULL THEN '' ELSE (', ' !! 'Start Date: ' !!CONVERT(SQL_DATE,start_date,101)) END) As MedicationOrderFROM CWSOrderEntry.history_client_orderWHERE PATID='100068'--AND FACILITY=?FACILITYAND order_status_code='A'AND order_type_category_code='P'
go to post Swathi Chilukuri · Mar 19, 2020 Hi Garcia, The code says !!, I have never seen it too so that is the reason not understanding what it means.