Advertisement
blackcolliy

export kendo grid to excel

Apr 5th, 2023 (edited)
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 46.00 KB | Help | 0 0
  1. $("#grid").kendoGrid({
  2.             dataSource: {
  3.                 type: "json",
  4.                 transport: {
  5.                     read: {
  6.                         url: $("#urlPath").val() + "/TViewMCU/AjaxRead?s_periode=" + $("#fl_periode").val() +
  7.                             "&s_dstrct_code=" + $("#fl_distrik").val() +
  8.                             "&s_is_pama=" + $("#fl_is_pama").val() +
  9.                             "&s_dept=" + dept +
  10.                             "&s_kkr=" + $("#fl_kkr").val(),
  11.                         contentType: "application/json",
  12.                         type: "POST"
  13.                     },
  14.                     destroy: {
  15.                         url: $("#urlPath").val() + "/TViewMCU/AjaxDelete",
  16.                         contentType: "application/json",
  17.                         type: "POST",
  18.                         complete: function (e) {
  19.                             if (e.responseJSON.status) {
  20.                                 show_alert("Success!", e.responseJSON.remarks, "green");
  21.                             } else {
  22.                                 show_alert("Error!", e.responseJSON.remarks, "red");
  23.                             }
  24.                             $("#grid").data("kendoGrid").dataSource.read();
  25.                         }
  26.                     },
  27.                     parameterMap: function (data, operation) {
  28.                         return kendo.stringify(data)
  29.                     }
  30.                 },
  31.                 pageSize: 15,
  32.                 serverPaging: true,
  33.                 serverFiltering: true,
  34.                 serverSorting: true,
  35.                 schema: {
  36.                     data: "Data",
  37.                     total: "Total",
  38.                     model: {
  39.                         id: "pid",
  40.                         fields: {
  41.                             pid: { type: "string" },
  42.                             nrp_pasien: { type: "string" },
  43.                             nama_pasien: { type: "string" },
  44.                             company_pasien: { type: "string" },
  45.                             is_pama: { type: "string" },
  46.                             distrik: { type: "string" },
  47.                             dept_code_desc: { type: "string" },
  48.                             pos_title: { type: "string" },
  49.                             tgl_lahir: { type: "date" },
  50.                             jenis_kelamin: { type: "string" },
  51.                             tgl_periksa: { type: "date" },
  52.                             bulan_tahun_periksa: { type: "string" },
  53.                             sakit_saat_ini: { type: "string" },
  54.                             minum_obat: { type: "string" },
  55.                             is_stress: { type: "boolean" },
  56.                             is_sakit_jantung: { type: "boolean" },
  57.                             is_hipertensi: { type: "boolean" },
  58.                             is_diabetes: { type: "boolean" },
  59.                             is_stroke: { type: "boolean" },
  60.                             is_epilepsi: { type: "boolean" },
  61.                             kejiwaan: { type: "string" },
  62.                             kanker: { type: "string" },
  63.                             sakit_pinggang: { type: "string" },
  64.                             ambeien: { type: "string" },
  65.                             patah_tulang: { type: "string" },
  66.                             is_sesak_nafas: { type: "boolean" },
  67.                             riwayat_penyakit_keluarga: { type: "string" },
  68.                             alergi: { type: "string" },
  69.                             rutin_olahraga: { type: "boolean" },
  70.                             merokok: { type: "boolean" },
  71.                             miras: { type: "boolean" },
  72.                             tb_cm: { type: "number" },
  73.                             bb_kg: { type: "number" },
  74.                             bmi: { type: "number" },
  75.                             nadi: { type: "number" },
  76.                             rr: { type: "number" },
  77.                             sistolik: { type: "number" },
  78.                             diastolik: { type: "number" },
  79.                             buta_warna: { type: "string" },
  80.                             visus_od: { type: "string" },
  81.                             visus_os: { type: "string" },
  82.                             visus_od_kcmt: { type: "string" },
  83.                             visus_os_kcmt: { type: "string" },
  84.                             anatomi_mata: { type: "string" },
  85.                             kedalaman_mata: { type: "string" },
  86.                             lapangan_lihat: { type: "string" },
  87.                             lihat_malam: { type: "string" },
  88.                             pemulihan_silau: { type: "string" },
  89.                             jaeger_test: { type: "string" },
  90.                             tht: { type: "string" },
  91.                             orodental: { type: "string" },
  92.                             sistem_kardiovaskuler: { type: "string" },
  93.                             sistem_pernafasan: { type: "string" },
  94.                             sistem_digestivus: { type: "string" },
  95.                             sistem_genito: { type: "string" },
  96.                             sistem_neuro: { type: "string" },
  97.                             laseque_test: { type: "string" },
  98.                             phalen_test: { type: "string" },
  99.                             balance_test: { type: "string" },
  100.                             pemeriksaan_others: { type: "string" },
  101.                             rontgen_dada: { type: "string" },
  102.                             kesimpulan_rontgen_dada: { type: "string" },
  103.                             rontgen_lumbo: { type: "string" },
  104.                             kesimpulan_rontgen_lumbo: { type: "string" },
  105.                             ekg: { type: "string" },
  106.                             kesimpulan_ekg: { type: "string" },
  107.                             treadmill: { type: "string" },
  108.                             kesimpulan_treadmill: { type: "string" },
  109.                             echocardiografi: { type: "string" },
  110.                             ct_cardio: { type: "string" },
  111.                             cathlab: { type: "string" },
  112.                             audiometri: { type: "string" },
  113.                             kesimpulan_audiometri: { type: "string" },
  114.                             spirometri: { type: "string" },
  115.                             kesimpulan_spirometri: { type: "string" },
  116.                             foto_sinus: { type: "string" },
  117.                             led: { type: "number" },
  118.                             hb: { type: "number" },
  119.                             leukosit: { type: "number" },
  120.                             trombosit: { type: "number" },
  121.                             ht: { type: "string" },
  122.                             basofil: { type: "string" },
  123.                             eosinofil: { type: "string" },
  124.                             batang: { type: "string" },
  125.                             segment: { type: "string" },
  126.                             limfosit: { type: "string" },
  127.                             monosit: { type: "string" },
  128.                             eritrosit: { type: "string" },
  129.                             gol_darah: { type: "string" },
  130.                             rhesus: { type: "string" },
  131.                             sgot: { type: "number" },
  132.                             sgpt: { type: "number" },
  133.                             kolesterol_total: { type: "number" },
  134.                             kolesterol_hdl: { type: "number" },
  135.                             indeks_kolesterol: { type: "number" },
  136.                             kolesterol_ldl: { type: "number" },
  137.                             trigliserida: { type: "number" },
  138.                             glukosa_puasa: { type: "number" },
  139.                             reduksi_puasa: { type: "string" },
  140.                             glukosa_sewaktu: { type: "string" },
  141.                             hba1c: { type: "number" },
  142.                             reduksi_sewaktu: { type: "string" },
  143.                             ureum: { type: "number" },
  144.                             creatinin: { type: "number" },
  145.                             asam_urat: { type: "number" },
  146.                             vdrl: { type: "string" },
  147.                             hbs_ag: { type: "string" },
  148.                             anti_hbs: { type: "string" },
  149.                             anti_hiv: { type: "string" },
  150.                             urin_warna: { type: "string" },
  151.                             urin_kejernihan: { type: "string" },
  152.                             urin_ph: { type: "number" },
  153.                             urin_berat_jenis: { type: "number" },
  154.                             urin_albumin: { type: "string" },
  155.                             urin_glukosa: { type: "string" },
  156.                             urin_bilirubin: { type: "string" },
  157.                             urin_urobilinogen: { type: "string" },
  158.                             urin_keton: { type: "string" },
  159.                             urin_darah_samar: { type: "string" },
  160.                             urin_lekositesterase: { type: "string" },
  161.                             urin_nitrit: { type: "string" },
  162.                             urin_leukosit: { type: "string" },
  163.                             urin_eritrosit: { type: "string" },
  164.                             urin_epitel: { type: "string" },
  165.                             urin_silinder: { type: "string" },
  166.                             urin_kristal: { type: "string" },
  167.                             urin_bakteri: { type: "string" },
  168.                             urin_lain: { type: "string" },
  169.                             amfetamin: { type: "string" },
  170.                             methamfetamin: { type: "string" },
  171.                             canabis: { type: "string" },
  172.                             benzodiazepin: { type: "string" },
  173.                             opiat: { type: "string" },
  174.                             coccaine: { type: "string" },
  175.                             edinburgh: { type: "number" },
  176.                             australian_diabetes: { type: "number" },
  177.                             is_ncep_atp: { type: "boolean" },
  178.                             jumlah_bintang: { type: "number" },
  179.                             kesimpulan_umum: { type: "string" },
  180.                             risiko_kesehatan_umum: { type: "string" },
  181.                             saran_umum: { type: "string" },
  182.                             kkr: { type: "string" },
  183.                             status_followup_mcu: { type: "string" }
  184.                         }
  185.                     }
  186.                 }
  187.             },
  188.             height: 500,
  189.             filterable: true,
  190.             sortable: true,
  191.             pageable: true,
  192.             editable: "inline",
  193.             resizable: true,
  194.             pageable: {
  195.                 refresh: true,
  196.                 buttonCount: 10,
  197.                 input: true,
  198.                 pageSizes: [10, 20, 50, 100, 1000, 100000],
  199.                 info: true,
  200.                 messages: {}
  201.             },
  202.             toolbar: [{ template: $('#lblbtnAdd').html() }, "excel"],
  203.             excel: {
  204.                 fileName: "Transaksi MCU.xlsx",
  205.                 allPages: true
  206.             },
  207.             excelExport: function(e) {
  208.                 var sheet = e.workbook.sheets[0];
  209.                 for (var rowIndex = 0; rowIndex < sheet.rows.length; rowIndex++) {
  210.                     var row = sheet.rows[rowIndex];
  211.                     for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex ++) {              
  212.                         var cell =row.cells[cellIndex];
  213.                         while(cell.value && cell.value.toString().indexOf("<br/>") >= 0){
  214.                             cell.value = cell.value.replace("<br/>", " ");  
  215.                             cell.wrap = true;
  216.                         }
  217.                     }
  218.                 }
  219.             },
  220.             columns: [
  221.                 {template: "#=++rowNo#", title: "No. ", width: "50px"},
  222.                 {
  223.                     title: 'Action', width: "180px",
  224.                     command: [
  225.                         { click: Edit, text: 'Edit', iconClass: "k-icon k-edit" },
  226.                         "destroy"
  227.                     ]
  228.                 },
  229.                 {
  230.                     title: 'PROFILE', headerAttributes: { style: "text-align: center" },
  231.                     columns: [
  232.                         { field: 'nrp_pasien', title: 'NRP', width: "150px" },
  233.                         { field: 'nama_pasien', title: 'NAMA', width: "200px" },
  234.                         { field: 'company_pasien', title: 'PERUSAHAAN', width: "150px" },
  235.                         { field: 'distrik', title: 'DISTRIK', width: "100px" },
  236.                         { field: 'is_pama', title: 'PAMA/<br/>NONPAMA', width: "100px" },
  237.                         { field: 'dept_code_desc', title: 'DEPARTEMEN', width: "200px" },
  238.                         { field: 'pos_title', title: 'POSISI/<br/>PEKERJAAN', width: "200px" },
  239.                         { field: 'tgl_lahir', title: 'TTL', width: "100px", format: "{0:yyyy-MM-dd}" },
  240.                         { field: 'jenis_kelamin', title: 'JENIS<br/>KELAMIN', width: "100px" },
  241.                         { field: 'tgl_periksa', title: 'TANGGAL<br/>PERIKSA', width: "150px", format: "{0:yyyy-MM-dd}" }
  242.                     ]
  243.                 },
  244.                 {
  245.                     title: 'RIWAYAT MEDIK', headerAttributes: { style: "text-align: center" },
  246.                     columns: [
  247.                         {
  248.                             title: 'KELUHAN', headerAttributes: { style: "text-align: center" },
  249.                             columns: [
  250.                                 { field: 'sakit_saat_ini', title: 'Sakit Saat Ini', width: "150px" },
  251.                                 { field: 'minum_obat', title: 'Minum Obat<br/>(sebutkan nama<br/>obat)', width: "150px" },
  252.                                 { field: 'is_stress', title: 'Stress', width: "100px", template: "#if(is_stress==null){# #: '' # #}else{# #if(is_stress==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" }
  253.                             ]
  254.                         },
  255.                         {
  256.                             title: 'RIWAYAT PENYAKIT DAHULU', headerAttributes: { style: "text-align: center" },
  257.                             columns: [
  258.                                 { field: 'is_sakit_jantung', title: 'Sakit<br/>Jantung', width: "100px", template: "#if(is_sakit_jantung==null){# #: '' # #}else{# #if(is_sakit_jantung==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" },
  259.                                 { field: 'is_hipertensi', title: 'Hipertensi', width: "100px", template: "#if(is_hipertensi==null){# #: '' # #}else{# #if(is_hipertensi==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" },
  260.                                 { field: 'is_diabetes', title: 'Diabetes', width: "100px", template: "#if(is_diabetes==null){# #: '' # #}else{# #if(is_diabetes==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" },
  261.                                 { field: 'is_stroke', title: 'Stroke', width: "100px", template: "#if(is_stroke==null){# #: '' # #}else{# #if(is_stroke==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" },
  262.                                 { field: 'is_epilepsi', title: 'Epilepsi', width: "100px", template: "#if(is_epilepsi==null){# #: '' # #}else{# #if(is_epilepsi==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" },
  263.                                 { field: 'kejiwaan', title: 'Kejiwaan', width: "100px" },
  264.                                 { field: 'kanker', title: 'Kanker', width: "100px" },
  265.                                 { field: 'sakit_pinggang', title: 'Sakit<br/>Pinggang', width: "100px" },
  266.                                 { field: 'ambeien', title: 'Ambeien', width: "100px" },
  267.                                 { field: 'patah_tulang', title: 'Patah<br/>Tulang', width: "100px" },
  268.                                 { field: 'is_sesak_nafas', title: 'Sesak<br/>Nafas', width: "100px", template: "#if(is_sesak_nafas==null){# #: '' # #}else{# #if(is_sesak_nafas==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" }
  269.                             ]
  270.                         },
  271.                         { field: 'riwayat_penyakit_keluarga', title: 'Riwayat<br/>Penyakit<br/>Keluarga', width: "150px" },
  272.                         { field: 'alergi', title: 'Alergi', width: "150px" },
  273.                         {
  274.                             title: 'KEBIASAAN', headerAttributes: { style: "text-align: center" },
  275.                             columns: [
  276.                                 { field: 'rutin_olahraga', title: 'Olahraga <br/>3x seminggu<br/>> 30menit', width: "120px", template: "#if(rutin_olahraga==null){# #: '' # #}else{# #if(rutin_olahraga==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" },
  277.                                 { field: 'merokok', title: 'Merokok', width: "100px", template: "#if(merokok==null){# #: '' # #}else{# #if(merokok==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" },
  278.                                 { field: 'miras', title: 'Miras', width: "100px", template: "#if(miras==null){# #: '' # #}else{# #if(miras==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" }
  279.                             ]
  280.                         }
  281.                     ]
  282.                 },
  283.                 {
  284.                     title: 'PEMERIKSAAN FISIK', headerAttributes: { style: "text-align: center" },
  285.                     columns: [
  286.                         {
  287.                             title: 'TB', headerAttributes: { style: "text-align: center" },
  288.                             columns: [
  289.                                 { field: 'tb_cm', title: 'cm', width: "80px" }
  290.                             ]
  291.                         },
  292.                         {
  293.                             title: 'BB', headerAttributes: { style: "text-align: center" },
  294.                             columns: [
  295.                                 { field: 'bb_kg', title: 'Kg', width: "80px" }
  296.                             ]
  297.                         },
  298.                         { field: 'bmi', title: 'BMI', width: "80px" },
  299.                         {
  300.                             title: 'Nadi', headerAttributes: { style: "text-align: center" },
  301.                             columns: [
  302.                                 { field: 'nadi', title: 'x/menit', width: "100px" }
  303.                             ]
  304.                         },
  305.                         {
  306.                             title: 'RR', headerAttributes: { style: "text-align: center" },
  307.                             columns: [
  308.                                 { field: 'rr', title: 'x/menit', width: "100px" }
  309.                             ]
  310.                         },
  311.                         {
  312.                             title: 'Tekanan Darah', headerAttributes: { style: "text-align: center" },
  313.                             columns: [
  314.                                 { field: 'sistolik', title: 'Sistolik', width: "100px" },
  315.                                 { field: 'diastolik', title: 'Diastolik', width: "100px" }
  316.                             ]
  317.                         },
  318.                         {
  319.                             title: 'MATA', headerAttributes: { style: "text-align: center" },
  320.                             columns: [
  321.                                 { field: 'buta_warna', title: 'Buta<br/>Warna', width: "100px" },
  322.                                 {
  323.                                     title: 'VISUS', headerAttributes: { style: "text-align: center" },
  324.                                     columns: [
  325.                                         { field: 'visus_od', title: 'OD<br/>(TP KCMT)', width: "120px" }, //missing column title in excel
  326.                                         { field: 'visus_os', title: 'OS<br/>(TP KCMT)', width: "120px" }, //missing column title in excel
  327.                                         { field: 'visus_od_kcmt', title: 'OS<br/>(KCMT)', width: "120px" }, //missing column title in excel
  328.                                         { field: 'visus_os_kcmt', title: 'OS<br/>(KCMT)', width: "120px" }
  329.                                     ]
  330.                                 },
  331.                                 { field: 'anatomi_mata', title: 'Anatomi', width: "100px" },
  332.                                 {
  333.                                     title: 'Pemeriksaan Khusus Mata', headerAttributes: { style: "text-align: center" },
  334.                                     columns: [
  335.                                         { field: 'kedalaman_mata', title: 'Kedalaman<br/>Pengelihatan', width: "150px" }, //misplaced in excel
  336.                                         { field: 'lapangan_lihat', title: 'Lapangan<br/>Pengelihatan', width: "150px" }, //misplaced in excel
  337.                                         { field: 'lihat_malam', title: 'Pengelihatan<br/>Malam', width: "150px" }, //misplaced in excel
  338.                                         { field: 'pemulihan_silau', title: 'Pemulihan<br/>karena silau', width: "150px" }
  339.                                     ]
  340.                                 },
  341.                                 { field: 'jaeger_test', title: 'Jaeger<br/>Test', width: "100px" }
  342.                             ]
  343.                         },
  344.                         { field: 'tht', title: 'THT', width: "100px" },
  345.                         { field: 'orodental', title: 'Orodental', width: "100px" },
  346.                         { field: 'sistem_kardiovaskuler', title: 'Sistem<br/>Kardiovaskuler', width: "150px" },
  347.                         { field: 'sistem_pernafasan', title: 'Sistem<br/>Pernafasan', width: "150px" },
  348.                         { field: 'sistem_digestivus', title: 'Sistem<br/>Digestivus', width: "150px" },
  349.                         { field: 'sistem_genito', title: 'Sistem<br/>Genitourinovenerelogi', width: "180px" },
  350.                         { field: 'sistem_neuro', title: 'Sistem<br/>Neuromuskuloskeletal', width: "180px" },
  351.                         {
  352.                             title: 'Pemeriksaan Neurologis', headerAttributes: { style: "text-align: center" },
  353.                             columns: [
  354.                                 { field: 'laseque_test', title: 'Laseque, Patrick,<br/>Kontra Patrick', width: "150px" }, //missing column title in excel
  355.                                 { field: 'phalen_test', title: 'Phalen &<br/>Tinel Test', width: "150px" }, //missing column title in excel
  356.                                 { field: 'balance_test', title: 'Balance<br/>Test', width: "120px" }, //missing column title in excel
  357.                                 { field: 'pemeriksaan_others', title: 'Pemeriksaan<br/>Lainnya', width: "120px" } //missing column title in excel
  358.                             ]
  359.                         }
  360.                     ]
  361.                 },
  362.                 {
  363.                     title: 'PEMERIKSAAN PENUNJANG', headerAttributes: { style: "text-align: center" },
  364.                     columns: [
  365.                         { field: 'rontgen_dada', title: 'Rontgen Dada', width: "150px" },
  366.                         { field: 'kesimpulan_rontgen_dada', title: 'Kesimpulan<br/>Rontgen Dada', width: "150px" },
  367.                         { field: 'rontgen_lumbo', title: 'Rontgen<br/>Lumbosakral', width: "150px" },
  368.                         { field: 'kesimpulan_rontgen_lumbo', title: 'Kesimpulan<br/>Rontgen<br/>Lumbosakral', width: "150px" },
  369.                         {
  370.                             title: 'Pemeriksaan Jantung', headerAttributes: { style: "text-align: center" },
  371.                             columns: [
  372.                                 { field: 'ekg', title: 'EKG', width: "150px" }, //missing column title in excel
  373.                                 { field: 'kesimpulan_ekg', title: 'Kesimpulan EKG', width: "150px" }, //missing column title in excel
  374.                                 { field: 'treadmill', title: 'Treadmill', width: "150px" }, //missing column title in excel
  375.                                 { field: 'kesimpulan_treadmill', title: 'Kesimpulan<br/>Treadmill', width: "150px" }, //missing column title in excel
  376.                                 { field: 'echocardiografi', title: 'Echocardiografi', width: "150px" },
  377.                                 { field: 'ct_cardio', title: 'CT Cardio', width: "150px" },
  378.                                 { field: 'cathlab', title: 'Cathlab', width: "150px" }
  379.                             ]
  380.                         },
  381.                         { field: 'audiometri', title: 'Audiometri', width: "150px" },
  382.                         { field: 'kesimpulan_audiometri', title: 'Kesimpulan<br/>Audiometri', width: "150px" },
  383.                         { field: 'spirometri', title: 'Spirometri', width: "150px" },
  384.                         { field: 'kesimpulan_spirometri', title: 'Kesimpulan<br/>Spirometri', width: "150px" },
  385.                         { field: 'foto_sinus', title: 'Foto Sinus', width: "150px" },
  386.                         {
  387.                             title: 'LED', headerAttributes: { style: "text-align: center" },
  388.                             columns: [
  389.                                 { field: 'led', title: '< 10 < 20', width: "100px" } //missing column title in excel
  390.                             ]
  391.                         },
  392.                         {
  393.                             title: 'Hb', headerAttributes: { style: "text-align: center" },
  394.                             columns: [
  395.                                 { field: 'hb', title: '13.2 - 17.3<br/>11.7 - 15.5', width: "120px" } //missing column title in excel
  396.                             ]
  397.                         },
  398.                         {
  399.                             title: 'Leukosit', headerAttributes: { style: "text-align: center" },
  400.                             columns: [
  401.                                 { field: 'leukosit', title: '3600 - 11000', width: "150px" } //missing column title in excel
  402.                             ]
  403.                         },
  404.                         {
  405.                             title: 'Thrombosit', headerAttributes: { style: "text-align: center" },
  406.                             columns: [
  407.                                 { field: 'trombosit', title: '150000 - 440000', width: "150px" } //missing column title in excel
  408.                             ]
  409.                         },
  410.                         {
  411.                             title: 'Ht', headerAttributes: { style: "text-align: center" },
  412.                             columns: [
  413.                                 { field: 'ht', title: '40 - 52<br/>35 - 47', width: "120px" } //missing column title in excel
  414.                             ]
  415.                         },
  416.                         {
  417.                             title: 'HITUNG JENIS', headerAttributes: { style: "text-align: center" },
  418.                             columns: [
  419.                                 {
  420.                                     title: 'Basofil', headerAttributes: { style: "text-align: center" }, //misplaced in excel
  421.                                     columns: [
  422.                                         { field: 'basofil', title: '0 - 1%', width: "100px" } //misplaced in excel
  423.                                     ]
  424.                                 },
  425.                                 {
  426.                                     title: 'Eosinofil', headerAttributes: { style: "text-align: center" },
  427.                                     columns: [
  428.                                         { field: 'eosinofil', title: '0 - 5%', width: "100px" } //misplaced in excel
  429.                                     ]
  430.                                 },
  431.                                 {
  432.                                     title: 'Batang', headerAttributes: { style: "text-align: center" },
  433.                                     columns: [
  434.                                         { field: 'batang', title: '2 - 6%', width: "100px" } //misplaced in excel
  435.                                     ]
  436.                                 },
  437.                                 {
  438.                                     title: 'Segment', headerAttributes: { style: "text-align: center" },
  439.                                     columns: [
  440.                                         { field: 'segment', title: '50 - 70%', width: "100px" } //missing column title in excel
  441.                                     ]
  442.                                 },
  443.                                 {
  444.                                     title: 'Limfosit', headerAttributes: { style: "text-align: center" },
  445.                                     columns: [
  446.                                         { field: 'limfosit', title: '25 - 40%', width: "100px" } //misplaced in excel
  447.                                     ]
  448.                                 },
  449.                                 {
  450.                                     title: 'Monosit', headerAttributes: { style: "text-align: center" },
  451.                                     columns: [
  452.                                         { field: 'monosit', title: '2 - 8%', width: "100px" } //misplaced in excel
  453.                                     ]
  454.                                 }
  455.                             ]
  456.                         },
  457.                         {
  458.                             title: 'Eritrosit', headerAttributes: { style: "text-align: center" },
  459.                             columns: [
  460.                                 { field: 'eritrosit', title: '4.5 - 5.9', width: "100px" }
  461.                             ]
  462.                         },
  463.                         { field: 'gol_darah', title: 'Gol Darah', width: "100px" },
  464.                         { field: 'rhesus', title: 'Rhesus', width: "100px" }
  465.                     ]
  466.                 },
  467.                 {
  468.                     title: 'FUNGSI HATI', headerAttributes: { style: "text-align: center" },
  469.                     columns: [
  470.                         {
  471.                             title: 'SGOT', headerAttributes: { style: "text-align: center" },
  472.                             columns: [
  473.                                 { field: 'sgot', title: '< 40<br/>< 32', width: "100px" } //missing column title in excel
  474.                             ]
  475.                         },
  476.                         {
  477.                             title: 'SGPT', headerAttributes: { style: "text-align: center" },
  478.                             columns: [
  479.                                 { field: 'sgpt', title: '< 41<br/>< 33', width: "100px" } //missing column title in excel
  480.                             ]
  481.                         }
  482.                     ]
  483.                 },
  484.                 {
  485.                     title: 'FUNGSI LEMAK', headerAttributes: { style: "text-align: center" },
  486.                     columns: [
  487.                         {
  488.                             title: 'Kolesterol Total', headerAttributes: { style: "text-align: center" },
  489.                             columns: [
  490.                                 { field: 'kolesterol_total', title: '< 200', width: "100px" } //misplaced in excel
  491.                             ]
  492.                         },
  493.                         {
  494.                             title: 'Kolesterol HDL', headerAttributes: { style: "text-align: center" },
  495.                             columns: [
  496.                                 { field: 'kolesterol_hdl', title: '40 - 59', width: "100px" } //misplaced in excel
  497.                             ]
  498.                         },
  499.                         {
  500.                             title: 'Indeks Kolesterol<br/>Total / HDL', headerAttributes: { style: "text-align: center" },
  501.                             columns: [
  502.                                 { field: 'indeks_kolesterol', title: '< 4', width: "120px" } //misplaced in excel
  503.                             ]
  504.                         },
  505.                         {
  506.                             title: 'Kolesterol LDL', headerAttributes: { style: "text-align: center" },
  507.                             columns: [
  508.                                 { field: 'kolesterol_ldl', title: '< 100', width: "100px" } //misplaced in excel
  509.                             ]
  510.                         },
  511.                         {
  512.                             title: 'Trigliserida', headerAttributes: { style: "text-align: center" },
  513.                             columns: [
  514.                                 { field: 'trigliserida', title: '< 150', width: "100px" }
  515.                             ]
  516.                         }
  517.                     ]
  518.                 },
  519.                 {
  520.                     title: 'GULA DARAH', headerAttributes: { style: "text-align: center" },
  521.                     columns: [
  522.                         {
  523.                             title: 'Glukosa Puasa', headerAttributes: { style: "text-align: center" },
  524.                             columns: [
  525.                                 { field: 'glukosa_puasa', title: '60 - 100', width: "100px" }
  526.                             ]
  527.                         },
  528.                         {
  529.                             title: 'Reduksi Puasa', headerAttributes: { style: "text-align: center" },
  530.                             columns: [
  531.                                 { field: 'reduksi_puasa', title: 'Negatif', width: "100px" }
  532.                             ]
  533.                         },
  534.                         {
  535.                             title: 'Glukosa Sewaktu', headerAttributes: { style: "text-align: center" },
  536.                             columns: [
  537.                                 { field: 'glukosa_sewaktu', title: '< 140', width: "120px" }
  538.                             ]
  539.                         },
  540.                         {
  541.                             title: 'HbA1c', headerAttributes: { style: "text-align: center" },
  542.                             columns: [
  543.                                 { field: 'hba1c', title: '', width: "100px" }
  544.                             ]
  545.                         },
  546.                         {
  547.                             title: 'Reduksi<br/>Sewaktu', headerAttributes: { style: "text-align: center" },
  548.                             columns: [
  549.                                 { field: 'reduksi_sewaktu', title: 'Negatif', width: "100px" },
  550.                             ]
  551.                         }
  552.                     ]
  553.                 },
  554.                 {
  555.                     title: 'FUNGSI GINJAL', headerAttributes: { style: "text-align: center" },
  556.                     columns: [
  557.                         {
  558.                             title: 'Ureum', headerAttributes: { style: "text-align: center" },
  559.                             columns: [
  560.                                 { field: 'ureum', title: '10 - 50', width: "100px" }
  561.                             ]
  562.                         },
  563.                         {
  564.                             title: 'Creatinin', headerAttributes: { style: "text-align: center" },
  565.                             columns: [
  566.                                 { field: 'creatinin', title: '< 1.20', width: "100px" }
  567.                             ]
  568.                         },
  569.                         {
  570.                             title: 'Asam Urat', headerAttributes: { style: "text-align: center" },
  571.                             columns: [
  572.                                 { field: 'asam_urat', title: '3.4 - 7.0<br/>2.4 - 5.7', width: "120px" }
  573.                             ]
  574.                         }
  575.                     ]
  576.                 },
  577.                 {
  578.                     title: 'IMUNO-SEROLOGI', headerAttributes: { style: "text-align: center" },
  579.                     columns: [
  580.                         {
  581.                             title: 'VDRL', headerAttributes: { style: "text-align: center" },
  582.                             columns: [
  583.                                 { field: 'vdrl', title: 'Negatif', width: "100px" }
  584.                             ]
  585.                         },
  586.                         {
  587.                             title: 'HBs-Ag', headerAttributes: { style: "text-align: center" },
  588.                             columns: [
  589.                                 { field: 'hbs_ag', title: 'Negatif', width: "100px" }
  590.                             ]
  591.                         },
  592.                         {
  593.                             title: 'Anti HBs', headerAttributes: { style: "text-align: center" },
  594.                             columns: [
  595.                                 { field: 'anti_hbs', title: '>= 100', width: "100px" }
  596.                             ]
  597.                         },
  598.                         {
  599.                             title: 'Anti HIV (Elisa)', headerAttributes: { style: "text-align: center" },
  600.                             columns: [
  601.                                 { field: 'anti_hiv', title: 'Negatif', width: "100px" }
  602.                             ]
  603.                         }
  604.                     ]
  605.                 },
  606.                 {
  607.                     title: 'URINALISIS', headerAttributes: { style: "text-align: center" },
  608.                     columns: [
  609.                         {
  610.                             title: 'Warna', headerAttributes: { style: "text-align: center" },
  611.                             columns: [
  612.                                 { field: 'urin_warna', title: 'Kuning', width: "100px" }
  613.                             ]
  614.                         },
  615.                         {
  616.                             title: 'Kejernihan', headerAttributes: { style: "text-align: center" },
  617.                             columns: [
  618.                                 { field: 'urin_kejernihan', title: 'Jernih', width: "100px" }
  619.                             ]
  620.                         },
  621.                         {
  622.                             title: 'pH', headerAttributes: { style: "text-align: center" },
  623.                             columns: [
  624.                                 { field: 'urin_ph', title: '4.5 - 8.5', width: "100px" }
  625.                             ]
  626.                         },
  627.                         {
  628.                             title: 'Berat Jenis', headerAttributes: { style: "text-align: center" },
  629.                             columns: [
  630.                                 { field: 'urin_berat_jenis', title: '1003 - 1030', width: "120px" }
  631.                             ]
  632.                         },
  633.                         {
  634.                             title: 'Albumin', headerAttributes: { style: "text-align: center" },
  635.                             columns: [
  636.                                 { field: 'urin_albumin', title: 'Negatif', width: "100px" }
  637.                             ]
  638.                         },
  639.                         {
  640.                             title: 'Glukosa', headerAttributes: { style: "text-align: center" },
  641.                             columns: [
  642.                                 { field: 'urin_glukosa', title: 'Negatif', width: "100px" }
  643.                             ]
  644.                         },
  645.                         {
  646.                             title: 'Bilirubin', headerAttributes: { style: "text-align: center" },
  647.                             columns: [
  648.                                 { field: 'urin_bilirubin', title: 'Negatif', width: "100px" }
  649.                             ]
  650.                         },
  651.                         {
  652.                             title: 'Urobilinogen', headerAttributes: { style: "text-align: center" },
  653.                             columns: [
  654.                                 { field: 'urin_urobilinogen', title: '3 - 16<br/>/ normal', width: "120px" }
  655.                             ]
  656.                         },
  657.                         {
  658.                             title: 'Keton', headerAttributes: { style: "text-align: center" },
  659.                             columns: [
  660.                                 { field: 'urin_keton', title: 'Negatif', width: "100px" }
  661.                             ]
  662.                         },
  663.                         {
  664.                             title: 'Darah Samar', headerAttributes: { style: "text-align: center" },
  665.                             columns: [
  666.                                 { field: 'urin_darah_samar', title: 'Negatif', width: "100px" }
  667.                             ]
  668.                         },
  669.                         {
  670.                             title: 'Lekositesterase', headerAttributes: { style: "text-align: center" },
  671.                             columns: [
  672.                                 { field: 'urin_lekositesterase', title: 'Negatif', width: "120px" }
  673.                             ]
  674.                         },
  675.                         {
  676.                             title: 'Nitrit', headerAttributes: { style: "text-align: center" },
  677.                             columns: [
  678.                                 { field: 'urin_nitrit', title: 'Negatif', width: "100px" }
  679.                             ]
  680.                         },
  681.                         {
  682.                             title: 'SEDIMENT', headerAttributes: { style: "text-align: center" },
  683.                             columns: [
  684.                                 {
  685.                                     title: 'Leukosit', headerAttributes: { style: "text-align: center" },
  686.                                     columns: [
  687.                                         { field: 'urin_leukosit', title: '<3+: 10-29', width: "120px" } //missing column title in excel
  688.                                     ]
  689.                                 },
  690.                                 {
  691.                                     title: 'Eritrosit', headerAttributes: { style: "text-align: center" },
  692.                                     columns: [
  693.                                         { field: 'urin_eritrosit', title: '<3+: 10-29', width: "120px" } //missing column title in excel
  694.                                     ]
  695.                                 },
  696.                                 {
  697.                                     title: 'Epitel', headerAttributes: { style: "text-align: center" },
  698.                                     columns: [
  699.                                         { field: 'urin_epitel', title: '<3+: 10-29', width: "120px" } //misplaced in excel
  700.                                     ]
  701.                                 },
  702.                                 {
  703.                                     title: 'Silinder', headerAttributes: { style: "text-align: center" },
  704.                                     columns: [
  705.                                         { field: 'urin_silinder', title: '<3+: 10-100', width: "120px" } //misplaced in excel
  706.                                     ]
  707.                                 },
  708.                                 {
  709.                                     title: 'Kristal', headerAttributes: { style: "text-align: center" },
  710.                                     columns: [
  711.                                         { field: 'urin_kristal', title: '<3+: 10', width: "120px" } //misplaced in excel
  712.                                     ]
  713.                                 },
  714.                                 {
  715.                                     title: 'Bakteri', headerAttributes: { style: "text-align: center" },
  716.                                     columns: [
  717.                                         { field: 'urin_bakteri', title: '<2+: banYk', width: "120px" } //misplaced in excel
  718.                                     ]
  719.                                 },
  720.                                 {
  721.                                     title: 'Lain-lain', headerAttributes: { style: "text-align: center" },
  722.                                     columns: [
  723.                                         { field: 'urin_lain', title: 'Negatif', width: "100px" } //misplaced in excel
  724.                                     ]
  725.                                 }
  726.                             ]
  727.                         }
  728.                     ]
  729.                 },
  730.                 {
  731.                     title: 'NARKOBA / DRUGS SCREENING', headerAttributes: { style: "text-align: center" },
  732.                     columns: [
  733.                         { field: 'amfetamin', title: 'Amfetamin', width: "120px" },
  734.                         { field: 'methamfetamin', title: 'Methamfetamin', width: "150px" },
  735.                         { field: 'canabis', title: 'Canabis', width: "100px" },
  736.                         { field: 'benzodiazepin', title: 'Benzodiazepin', width: "150px" },
  737.                         { field: 'opiat', title: 'Opiat', width: "100px" },
  738.                         { field: 'coccaine', title: 'Coccaine', width: "100px" }
  739.                     ]
  740.                 },
  741.                 {
  742.                     title: 'KRITERIA JANTUNG', headerAttributes: { style: "text-align: center" },
  743.                     columns: [
  744.                         { field: 'edinburgh', title: 'Edinburgh (%)', width: "150px" }
  745.                     ]
  746.                 },
  747.                 {
  748.                     title: 'KRITERIA DIABETES', headerAttributes: { style: "text-align: center" },
  749.                     columns: [
  750.                         { field: 'australian_diabetes', title: 'Australian Type 2<br/>Diabetes Risk<br/>Asessment Tool<br/>(%)', width: "150px" }
  751.                     ]
  752.                 },
  753.                 {
  754.                     title: 'SINDROM METABOLIK', headerAttributes: { style: "text-align: center" },
  755.                     columns: [
  756.                         { field: 'is_ncep_atp', title: 'NCEP-ATP<br/>(3 dari total 5<br/>kriteria)', width: "150px", template: "#if(is_ncep_atp==null){# #: '' # #}else{# #if(is_ncep_atp==true){# #: 'Y' # #}else{# #: 'N' # #}# #}#" }
  757.                     ]
  758.                 },
  759.                 {
  760.                     title: 'KRITERIA ASTERIX (^) MICHIGAN WELLNESS STUDY (MODIFIED)', headerAttributes: { style: "text-align: center" },
  761.                     columns: [
  762.                         { field: 'jumlah_bintang', title: 'Jumlah', width: "200px" }
  763.                     ]
  764.                 },
  765.                 { field: 'kesimpulan_umum', title: 'KESIMPULAN', width: "400px" },
  766.                 {
  767.                     title: 'RESIKO KESEHATAN DI PAMA', headerAttributes: { style: "text-align: center" },
  768.                     columns: [
  769.                         { field: 'risiko_kesehatan_umum', title: 'Low Risk, Medium Risk,<br/>High Risk, Critical Risk', width: "200px" }  //missing column title in excel
  770.                     ]
  771.                 },
  772.                 { field: 'saran_umum', title: 'SARAN', width: "400px" },
  773.                 { field: 'kkr', title: 'KLASIFIKASI KKR', width: "150px" },
  774.                 { field: 'status_followup_mcu', title: 'STATUS<br/>FOLLOWUP MCU', width: "150px" }
  775.             ],
  776.             dataBinding: function () {
  777.                 window.rowNo = (this.dataSource.page() - 1) * this.dataSource.pageSize();
  778.             }
  779.         });}
Tags: html jQuery kendo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement