var G_BC_WS_SERVICE = "ws://localhost:6025"; var G_BC_PRINTER = "zebra"; var g_bc_cln_printer_ready = false; var g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); g_bc_cln_socket.onmessage = function (msg) { }; g_bc_cln_socket.onopen = function () { }; g_bc_cln_socket.onerror = function (msg) { }; function cln_svc_name(svc) { switch (svc) { case "UMUM": return "Pasien Umum"; case "COM": return "Pasien Rekanan"; case "KLINIK": return "Pasien Klinik"; case "ONLINE": return "Pasien Online"; case "RES": return "Pengambilan Hasil"; case "APPDR": return "Mobile Dokter"; case "MEMBER": return "Pasien Member"; default: return "OTHER"; } } function one_print_barcode_pk(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/pk', { params: { barcodeId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { var cat_print_data_lab = ""; for (var i = 0; i < resp.data.rows.length; i++) { var r = resp.data.rows[i]; var print_data_lab = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW440" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + "^FT140,219^A0I,25,16^FH\^FD" + r.M_PatientDOB + ' / ' + r.Gender + "^FS" + "\n" + "^FT100,20^A0I,25,16^FH\^FD" + r.T_OrderHeaderDate + "^FS" + "\n" + "^FT380,46^A0I,25,24^FH\^FD" + r.M_PatientNIP + ' / ' + r.T_SampleTypeName + "^FS" + "\n" + "^FT380,20^A0I,25,24^FH\^FD" + r.CorporateName + "^FS" + "\n" + "^FT395,219^A0I,28,21^FH\^FD" + r.M_PatientName + "^FS" + "\n" + "^FO75,75^BY2^BC,120,N,N,N,A^FD" + r.T_BarcodeLabBarcode + "^FS^" + "\n" //+ "^BY2,2,141^FT365,46^BCI,,N,N"+ "\n" // + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n" + "^FT396,29^A0R,31,31^FH\^FD" + r.Full_T_OrderHeaderLabNumber + "^FS" + "\n" + "^PQ1,0,1,Y^XZ" + "\n" ; console.log(print_data_lab); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_lab }; cat_print_data_lab += print_data_lab; //console.log(print_data_lab) //g_bc_cln_socket.send(JSON.stringify(data_print)); } var all_data_print = { printer: G_BC_PRINTER, type: "zpl", data: cat_print_data_lab }; setTimeout(function () { g_bc_cln_socket.send(JSON.stringify(all_data_print)); }, 500); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_pkv2(inp) { // print berdasarkan count data yang sama g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/pkv2', { params: { barcodeId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { var cat_print_data_lab = ""; for (var i = 0; i < resp.data.rows.length; i++) { var r = resp.data.rows[i]; var print_data_lab = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW440" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + "^FT140,219^A0I,25,16^FH\^FD" + r.M_PatientDOB + ' / ' + r.Gender + "^FS" + "\n" + "^FT100,20^A0I,25,16^FH\^FD" + r.T_OrderHeaderDate + "^FS" + "\n" + "^FT380,46^A0I,25,24^FH\^FD" + r.M_PatientNIP + ' / ' + r.T_SampleTypeName + "^FS" + "\n" + "^FT380,20^A0I,25,24^FH\^FD" + r.CorporateName + "^FS" + "\n" + "^FT395,219^A0I,28,21^FH\^FD" + r.M_PatientName + "^FS" + "\n" + "^FO75,75^BY2^BC,120,N,N,N,A^FD" + r.T_BarcodeLabBarcode + "^FS^" + "\n" //+ "^BY2,2,141^FT365,46^BCI,,N,N"+ "\n" // + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n" + "^FT396,29^A0R,31,31^FH\^FD" + r.Full_T_OrderHeaderLabNumber + "^FS" + "\n" + "^PQ1,0,1,Y^XZ" + "\n" ; console.log(print_data_lab); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_lab }; cat_print_data_lab += print_data_lab; //console.log(print_data_lab) //g_bc_cln_socket.send(JSON.stringify(data_print)); } var all_data_print = { printer: G_BC_PRINTER, type: "zpl", data: cat_print_data_lab }; setTimeout(function () { g_bc_cln_socket.send(JSON.stringify(all_data_print)); }, 500); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_pk_2020(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/pk', { params: { barcodeId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { for (var i = 0; i < resp.data.rows.length; i++) { var r = resp.data.rows[i]; var print_data_lab = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW400" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + " ^CF0,25" + "\n" + " ^FO35,20^FD" + r.M_PatientName + "^FS" + "\n" + " ^CF0,20" + "\n" + " ^FO35,197^FD" + r.M_PatientDOB + "^FS" + "\n" + " ^CF0,20" + "\n" + " ^FO35,220^FD" + r.T_SampleTypeName + "^FS" + "\n" + " ^FO220,220^FD" + r.T_OrderHeaderDate + "^FS" + "\n" + " ^CF0^A0B,30" + "\n" + " ^FO2,80^FD" + r.T_OrderHeaderLabNumber + "^FS" + "\n" // + " ^BY2,2,120"+ "\n" // + "^FO25,80^BCN,,N,N^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n" + "^FO35,50^BY2^BC,140,N,N,N,A^FD" + r.T_BarcodeLabBarcode + "^FS^" + "\n" + "^PQ1,0,1,Y^XZ" + "\n"; console.log(print_data_lab); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_lab }; g_bc_cln_socket.send(JSON.stringify(data_print)); } } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_pk_bkpadhi(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/pk', { params: { barcodeId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { for (var i = 0; i < resp.data.rows.length; i++) { var r = resp.data.rows[i]; var print_data_lab = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW400" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + "^FT20,220^A0B,23,24^FH\^FD" + r.T_BarcodeLabBarcode + "^FS" + "\n" + "^FT50,220^A0N,23,24^FH\^FD" + r.T_SampleTypeName + "^FS" + "\n" + "^FT50,50^A0N,28,28^FH\^FD" + r.M_PatientName + "^FS" + "\n" // + "^BY1,2,120^FT44,188^BCN,,N,N"+ "\n" // + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n" + "^BY2,2,120" + "\n" + "^FO35,70^BCN,,N,N^FD" + r.T_BarcodeLabBarcode + "^FS" + "\n" // + "^FO40,70^BY1^BCN,100,N,N,N"+ "\n" // + "^FD"+ r.T_BarcodeLabBarcode + "^FS"+ "\n" // + "^FO44,70^BY2^B1N,N,100,N,N"+ "\n" // + "^FDL-191106003EL111^FS"+ "\n" + "^PQ1,0,1,Y^XZ" + "\n"; console.log(print_data_lab); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_lab }; g_bc_cln_socket.send(JSON.stringify(data_print)); } } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_so(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/so', { params: { orderId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { var data = resp.data.rows[0]; var print_data_so = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW400" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + "^FT5,150^A0N,23,24^FH\^FD" + data.sex_code + "/" + data.datereg + "(" + data.age + ")^FS" + "\n" + "^FT5,200^A0N,23,24^FH\^FD" + data.test + "^FS" + "\n" + "^FT5,175^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n" + "^FT3,125^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n" + "^BY2,2,45^FT22,70^BCN,,Y,N" + "\n" + "^FD" + data.nolab + "^FS" + "\n" // + "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n" + "^PQ1,0,1,Y^XZ" + "\n" console.log(print_data_so); let xdate = new Date() console.log(xdate) var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_so }; console.log("oye update ada tesnya") g_bc_cln_socket.send(JSON.stringify(data_print)); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_sov1(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/sov1', { params: { orderId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { // var data = resp.data.rows[0]; var cat_print_data_so = ""; for (var i = 0; i < resp.data.rows.length; i++) { var data = resp.data.rows[i]; var print_data_so = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW400" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + "^FT5,150^A0N,23,24^FH\^FD" + data.sex_code + "/" + data.datereg + "(" + data.age + ")^FS" + "\n" + "^FT5,200^A0N,23,24^FH\^FD" + data.test + "^FS" + "\n" + "^FT5,175^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n" + "^FT3,125^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n" + "^BY2,2,45^FT22,70^BCN,,Y,N" + "\n" + "^FD" + data.nolab + "^FS" + "\n" // + "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n" + "^PQ1,0,1,Y^XZ" + "\n" console.log(print_data_so); cat_print_data_so += print_data_so; let xdate = new Date() console.log(xdate) } var data_print = { printer: G_BC_PRINTER, type: "zpl", data: cat_print_data_so }; // var data_print = { // printer: G_BC_PRINTER, // type: "zpl", // data: print_data_so // }; console.log("oye update ada tesnya") g_bc_cln_socket.send(JSON.stringify(data_print)); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_sov2(inp) { // print berdasarkan count data yang sama g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/sov2', { params: { orderId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { // var data = resp.data.rows[0]; var cat_print_data_so = ""; for (var i = 0; i < resp.data.rows.length; i++) { var data = resp.data.rows[i]; var print_data_so = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW400" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + "^FT5,150^A0N,23,24^FH\^FD" + data.sex_code + "/" + data.datereg + "(" + data.age + ")^FS" + "\n" + "^FT5,200^A0N,23,24^FH\^FD" + data.test + "^FS" + "\n" + "^FT5,175^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n" + "^FT3,125^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n" + "^BY2,2,45^FT22,70^BCN,,Y,N" + "\n" + "^FD" + data.nolab + "^FS" + "\n" // + "^FT5,225^A0N,23,24^FH\^FD"+ data.patienttype +"^FS"+ "\n" + "^PQ1,0,1,Y^XZ" + "\n" console.log(print_data_so); cat_print_data_so += print_data_so; let xdate = new Date() console.log(xdate) } var data_print = { printer: G_BC_PRINTER, type: "zpl", data: cat_print_data_so }; // var data_print = { // printer: G_BC_PRINTER, // type: "zpl", // data: print_data_so // }; console.log("oye update ada tesnya") // g_bc_cln_socket.send(JSON.stringify(data_print)); setTimeout(function () { g_bc_cln_socket.send(JSON.stringify(data_print)) }, 500); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_so_group(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/so', { params: { orderId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { var data = resp.data.rows[0]; var print_data_so_group = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW400" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + "^FT3,50^A0N,28,28^FH\^FD" + data.test + "^FS" + "\n" + "^FT3,80^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n" + "^FT3,110^A0N,28,28^FH\^FD" + data.nolab + "^FS" + "\n" + "^FT5,140^A0N,23,24^FH\^FD" + data.sexcode + "/" + data.datereg + "(" + data.age + ")^FS" + "\n" + "^FT5,170^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n" + "^FT5,200^A0N,23,24^FH\^FD" + data.alamat + "^FS" + "\n" + "^PQ1,0,1,Y^XZ" + "\n" console.log(print_data_so_group); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_so_group }; g_bc_cln_socket.send(JSON.stringify(data_print)); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_amplop_so_group(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/so_group', { params: { orderId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { var data = resp.data.rows; var print_data_amplop_so_group = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW719" + "\n" + "^LL0480" + "\n" + "^LS0" + "\n" + "^FT18,65^A0N,31,31^FH\^GB700,1,3^FS" + "\n" + "^FT18,100^A0N,31,31^FH\^FDNO. ID / NO REG^FS" + "\n" + "^FT18,130^A0N,31,31^FH\^FDTGL REG^FS" + "\n" + "^FT18,160^A0N,31,31^FH\^FDNAMA^FS" + "\n" + "^FT18,190^A0N,31,31^FH\^FDUMUR^FS" + "\n" + "^FT18,220^A0N,31,31^FH\^FDALAMAT^FS" + "\n" + "^FT18,290^A0N,31,31^FH\^FDPENGIRIM^FS" + "\n" + "^FT18,320^A0N,31,31^FH\^FDPSN GRUP^FS" + "\n" + "^FT18,60^A0N,31,31^FH\^FD" + data.test + "^FS" + "\n" + "^FT19,60^A0N,31,31^FH\^FD" + data.test + "^FS" + "\n" + "^FT210,100^A0N,31,31^FH\^FD " + " : " + data.noreg + "/" + data.nolab + "^FS" + "\n" + "^FT210,130^A0N,31,31^FH\^FD " + " : " + data.datereg + "^FS" + "\n" + "^FT210,160^A0N,31,31^FH\^FD " + " : " + data.M_PatientName + "^FS" + "\n" + "^FT210,160^A0N,31,31^FH\^FD " + " : " + data.M_PatientName + "^FS" + "\n" + "^FT210,190^A0N,31,31^FH\^FD " + " : " + data.age + "^FS" + "\n" + "^FT210,220^A0N,31,31^FH\^FD " + " : " + data.alamat + "^FS" + "\n" + "^FT210,255^A0N,31,31^FH\^FD " + " " + data.city + "^FS" + "\n" + "^FT210,290^A0N,31,31^FH\^FD " + " : " + data.M_DoctorName + "^FS" + "\n" + "^FT212,290^A0N,31,31^FH\^FD " + " : " + data.M_DoctorName + "^FS" + "\n" + "^FT210,325^A0N,31,31^FH\^FD " + " : " + data.patienttype + "^FS" + "\n" + "^BY3,3,45^FT240,380^BCN,Y,N,N,N" + "\n" + "^FD" + data.nolab + "^FS" + "\n" + "^PQ1,0,1,Y^XZ" + "\n"; console.log(print_data_amplop_so_group); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_amplop_so_group }; g_bc_cln_socket.send(JSON.stringify(data_print)); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_amplop_so(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/so', { params: { orderId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { var data = resp.data.rows[0]; var print_data_amplop_so = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW719" + "\n" + "^LL0480" + "\n" + "^LS0" + "\n" + "^FT18,65^A0N,31,31^FH\^GB700,1,3^FS" + "\n" + "^FT18,100^A0N,31,31^FH\^FDNO. ID / NO REG^FS" + "\n" + "^FT18,130^A0N,31,31^FH\^FDTGL REG^FS" + "\n" + "^FT18,160^A0N,31,31^FH\^FDNAMA^FS" + "\n" + "^FT18,190^A0N,31,31^FH\^FDUMUR^FS" + "\n" + "^FT18,220^A0N,31,31^FH\^FDALAMAT^FS" + "\n" + "^FT18,290^A0N,31,31^FH\^FDPENGIRIM^FS" + "\n" + "^FT18,320^A0N,31,31^FH\^FDPSN GRUP^FS" + "\n" + "^FT18,60^A0N,31,31^FH\^FD" + data.test + "^FS" + "\n" + "^FT19,60^A0N,31,31^FH\^FD" + data.test + "^FS" + "\n" + "^FT210,100^A0N,31,31^FH\^FD " + " : " + data.noreg + "/" + data.nolab + "^FS" + "\n" + "^FT210,130^A0N,31,31^FH\^FD " + " : " + data.datereg + "^FS" + "\n" + "^FT210,160^A0N,31,31^FH\^FD " + " : " + data.M_PatientName + "^FS" + "\n" + "^FT210,160^A0N,31,31^FH\^FD " + " : " + data.M_PatientName + "^FS" + "\n" + "^FT210,190^A0N,31,31^FH\^FD " + " : " + data.age + "^FS" + "\n" + "^FT210,220^A0N,31,31^FH\^FD " + " : " + data.alamat + "^FS" + "\n" + "^FT210,255^A0N,31,31^FH\^FD " + " " + data.city + "^FS" + "\n" + "^FT210,290^A0N,31,31^FH\^FD " + " : " + data.M_DoctorName + "^FS" + "\n" + "^FT212,290^A0N,31,31^FH\^FD " + " : " + data.M_DoctorName + "^FS" + "\n" + "^FT210,325^A0N,31,31^FH\^FD " + " : " + data.patienttype + "^FS" + "\n" + "^BY4,3,45^FT200,390^BCN,Y,N,N,N" + "\n" + "^FD" + data.nolab + "^FS" + "\n" + "^PQ1,0,1,Y^XZ" + "\n"; console.log(print_data_amplop_so); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_amplop_so }; g_bc_cln_socket.send(JSON.stringify(data_print)); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_barcode_formulir(inp) { g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); axios.get('/one-api/v1/su/barcode/formulir', { params: { orderId: inp } }) .then(function (resp) { if (resp.data.status == "OK") { var data = resp.data.rows; var print_data_formulir = "CT~~CD,~CC^~CT~" + "\n" + "^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ" + "\n" + "^XA" + "\n" + "^MMT" + "\n" + "^PW400" + "\n" + "^LL0240" + "\n" + "^LS0" + "\n" + "^FT5,150^A0N,23,24^FH\^FD" + data.sexcode + "/" + data.datereg + "(" + data.age + ")^FS" + "\n" + "^FT3,125^A0N,28,28^FH\^FD" + data.M_PatientName + "^FS" + "\n" + "^BY2,2,45^FT22,70^BCN,,Y,N" + "\n" + "^FD" + data.nolab + "^FS" + "\n" + "^FT5,175^A0N,23,24^FH\^FD" + data.patienttype + "^FS" + "\n" + "^PQ1,0,1,Y^XZ" + "\n" console.log(print_data_formulir); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_formulir }; setTimeout(function () { g_bc_cln_socket.send(JSON.stringify(data_print)); }, 500); } else { console.log("ERR", resp.data); } }) .catch(function (e) { console.log('Err Get Barcode', e); }) } function one_print_qrcode_form(inp) { let url_header = window.location.protocol + '//cpone.aplikasi.web.id' console.log(inp) g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); var print_data_formulir = "^XA" + "\n" + "^FO15,5" + "\n" + "^BQN,2,4,H" + "\n" + "^FD>" + inp.url_qrform + "^FS" + "\n" + "^CFA,20" + "\n" + "^FO200,30^FDNama : (P)^FS" + "\n" + "^FO200,60^FD" + inp.name + "^FS" + "\n" + "^FO200,90^FDKode Form :^FS" + "\n" + "^FO200,120^FD" + inp.form_code + "^FS" + "\n" + "^FO200,150^FDTgl. Registrasi : ^FS" + "\n" + "^FO200,180^FD" + inp.register_date + "^FS" + "\n" + "^XZ" console.log(print_data_formulir) var print_data console.log(print_data_formulir); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_formulir }; setTimeout(function () { g_bc_cln_socket.send(JSON.stringify(data_print)); }, 500); } function one_print_qrcode(inp) { let url_header = window.location.protocol + '//cpone.aplikasi.web.id' console.log(inp) g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); var print_data_formulir = "^XA" + "\n" + "^FO15,5" + "\n" + "^BQN,2,4,H" + "\n" + "^FD>" + url_header + "/one-ui/test/vuex/cpone-control-card/?noreg=" + inp.no_lab + "&id=" + inp.id + "^FS" + "\n" + "^CFA,20" + "\n" + "^FO200,30^FDNama : (P)^FS" + "\n" + "^FO200,60^FD" + inp.name + "^FS" + "\n" + "^FO200,90^FDNo Lab :^FS" + "\n" + "^FO200,120^FD" + inp.no_lab + "^FS" + "\n" + "^FO200,150^FDTgl. Registrasi : ^FS" + "\n" + "^FO200,180^FD" + inp.register_date + "^FS" + "\n" + "^XZ" console.log(print_data_formulir) var print_data console.log(print_data_formulir); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_formulir }; setTimeout(function () { g_bc_cln_socket.send(JSON.stringify(data_print)); }, 500); } function one_print_qrcode_patient(inp) { console.log(inp) g_bc_cln_socket = new WebSocket(G_BC_WS_SERVICE); var print_data_formulir = "^XA" + "\n" + "^FO15,5" + "\n" + "^BQN,2,8,H" + "\n" + "^FD>" + inp.no_lab + "^FS" + "\n" + "^CFA,20" + "\n" + "^FO200,30^FDNama : ^FS" + "\n" + "^FO200,60^FD" + inp.name + "^FS" + "\n" + "^FO200,90^FDNo Lab :^FS" + "\n" + "^FO200,120^FD" + inp.no_lab + "^FS" + "\n" + "^FO200,150^FDTgl. Registrasi : ^FS" + "\n" + "^FO200,180^FD" + inp.register_date + "^FS" + "\n" + "^XZ" console.log(print_data_formulir) var print_data console.log(print_data_formulir); var data_print = { printer: G_BC_PRINTER, type: "zpl", data: print_data_formulir }; setTimeout(function () { g_bc_cln_socket.send(JSON.stringify(data_print)); }, 500); } window.one_print_barcode_pk = one_print_barcode_pk; window.one_print_barcode_pkv2 = one_print_barcode_pkv2; window.one_print_barcode_so = one_print_barcode_so; window.one_print_barcode_sov1 = one_print_barcode_sov1; window.one_print_barcode_sov2 = one_print_barcode_sov2; window.one_print_barcode_so_group = one_print_barcode_so_group; window.one_print_barcode_amplop_so_group = one_print_barcode_amplop_so_group; window.one_print_barcode_amplop_so = one_print_barcode_amplop_so; window.one_print_barcode_formulir = one_print_barcode_formulir; window.one_print_qrcode = one_print_qrcode; window.one_print_qrcode_patient = one_print_qrcode_patient; window.one_print_qrcode_form = one_print_qrcode_form;