DELIMITER $$

ALTER ALGORITHM=UNDEFINED DEFINER=`khanza_ip`@`%` SQL SECURITY DEFINER VIEW `v_taskid` AS (
SELECT `X`.`no_rawat` AS `no_rawat`,GROUP_CONCAT(`X`.`ts1` SEPARATOR ',') AS `t1`,GROUP_CONCAT(`X`.`ts2` SEPARATOR ',') AS `t2`,GROUP_CONCAT(`X`.`ts3` SEPARATOR ',') AS `t3`,GROUP_CONCAT(`X`.`ts4` SEPARATOR ',') AS `t4`,GROUP_CONCAT(`X`.`ts5` SEPARATOR ',') AS `t5`,GROUP_CONCAT(`X`.`ts6` SEPARATOR ',') AS `t6`,GROUP_CONCAT(`X`.`ts7` SEPARATOR ',') AS `t7`,GROUP_CONCAT(`X`.`ts99` SEPARATOR ',') AS `t99` FROM (SELECT `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`no_rawat` AS `no_rawat`,CASE WHEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`taskid` = '1' THEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`waktu` END AS `ts1`,CASE WHEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`taskid` = '2' THEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`waktu` END AS `ts2`,CASE WHEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`taskid` = '3' THEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`waktu` END AS `ts3`,CASE WHEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`taskid` = '4' THEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`waktu` END AS `ts4`,CASE WHEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`taskid` = '5' THEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`waktu` END AS `ts5`,CASE WHEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`taskid` = '6' THEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`waktu` END AS `ts6`,CASE WHEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`taskid` = '7' THEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`waktu` END AS `ts7`,CASE WHEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`taskid` = '99' THEN `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`.`waktu` END AS `ts99` FROM `khanza_rsip`.`referensi_mobilejkn_bpjs_taskid`) `X` GROUP BY `X`.`no_rawat`)$$

DELIMITER ;