update
This commit is contained in:
@@ -255,24 +255,10 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<select id="cekbln" class="form-control">
|
|
||||||
<option value="ALL">ALL</option>
|
|
||||||
<option value="01">Jan</option>
|
|
||||||
<option value="02">Feb</option>
|
|
||||||
<option value="03">Mar</option>
|
|
||||||
<option value="04">Apr</option>
|
|
||||||
<option value="05">May</option>
|
|
||||||
<option value="06">Jun</option>
|
|
||||||
<option value="07">Jul</option>
|
|
||||||
<option value="08">Aug</option>
|
|
||||||
<option value="09">Sep</option>
|
|
||||||
<option value="10">Oct</option>
|
|
||||||
<option value="11">Nov</option>
|
|
||||||
<option value="12">Dec</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<input type="text" class="form-control" id="cekthn" value="{{ $tahunne }}">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2">
|
<div class="col-lg-2">
|
||||||
<button class="btn btn-warning btn-flat" type="button" id="btnviewdata">View Report</button>
|
<button class="btn btn-warning btn-flat" type="button" id="btnviewdata">View Report</button>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@extends('dokter.ppdsdeveloper')
|
@extends(Session::get('previlage') == 'developer' ? 'dokter.ppdsdeveloper' : 'dokter.ppds')
|
||||||
|
|
||||||
@push('styles')
|
@push('styles')
|
||||||
<style>
|
<style>
|
||||||
#divawal {
|
#divawal {
|
||||||
display: none !important;
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@endpush
|
@endpush
|
||||||
@@ -11,7 +11,106 @@
|
|||||||
@push('script')
|
@push('script')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$('#divawal').hide();
|
var focusPeriksaId = @json((string) ($focusPeriksaId ?? ''));
|
||||||
|
var returnUrl = @json($expertiseReturnUrl ?? url('/'));
|
||||||
|
var shouldOpenOnLoad = @json((bool) ($openExpertiseOnLoad ?? false));
|
||||||
|
var initialListMode = @json($initialListMode ?? 'searchbydate');
|
||||||
|
var initialStartDate = @json($initialStartDate ?? '');
|
||||||
|
var initialEndDate = @json($initialEndDate ?? '');
|
||||||
|
var autoOpenAttempts = 0;
|
||||||
|
var maxAutoOpenAttempts = 12;
|
||||||
|
var hasOpenedTarget = false;
|
||||||
|
|
||||||
|
function setInitialFilters() {
|
||||||
|
if ($('#mulai').length) {
|
||||||
|
$('#mulai').val(initialStartDate);
|
||||||
|
}
|
||||||
|
if ($('#akhir').length) {
|
||||||
|
$('#akhir').val(initialEndDate);
|
||||||
|
}
|
||||||
|
if ($('#valjenis').length) {
|
||||||
|
$('#valjenis').val(initialListMode);
|
||||||
|
}
|
||||||
|
if ($('#master_set01').length) {
|
||||||
|
$('#master_set01').val(initialListMode);
|
||||||
|
}
|
||||||
|
if ($('#valcari').length) {
|
||||||
|
$('#valcari').val('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function findExpertiseButton(boundIndex) {
|
||||||
|
var row = $('#gridpemeriksaan').find('[role="row"][boundindex="' + boundIndex + '"]').first();
|
||||||
|
if (!row.length) {
|
||||||
|
return $();
|
||||||
|
}
|
||||||
|
|
||||||
|
return row.find('button, input, .jqx-button').filter(function () {
|
||||||
|
var text = $.trim($(this).text());
|
||||||
|
var value = $.trim($(this).val());
|
||||||
|
return text === 'Expertise' || value === 'Expertise';
|
||||||
|
}).first();
|
||||||
|
}
|
||||||
|
|
||||||
|
function openFocusedPeriksa() {
|
||||||
|
if (!shouldOpenOnLoad || hasOpenedTarget || !focusPeriksaId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var rows = $('#gridpemeriksaan').jqxGrid('getrows') || [];
|
||||||
|
var matchedRow = null;
|
||||||
|
|
||||||
|
for (var i = 0; i < rows.length; i++) {
|
||||||
|
if (String(rows[i].id) === focusPeriksaId) {
|
||||||
|
matchedRow = rows[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!matchedRow) {
|
||||||
|
autoOpenAttempts++;
|
||||||
|
if (autoOpenAttempts >= maxAutoOpenAttempts) {
|
||||||
|
$('#divawal').show();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var boundIndex = matchedRow.boundindex;
|
||||||
|
$('#gridpemeriksaan').jqxGrid('selectrow', boundIndex);
|
||||||
|
$('#gridpemeriksaan').jqxGrid('ensurerowvisible', boundIndex);
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
var button = findExpertiseButton(boundIndex);
|
||||||
|
if (button.length) {
|
||||||
|
hasOpenedTarget = true;
|
||||||
|
button.trigger('click');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
autoOpenAttempts++;
|
||||||
|
if (autoOpenAttempts >= maxAutoOpenAttempts) {
|
||||||
|
$('#divawal').show();
|
||||||
|
}
|
||||||
|
}, 150);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#gridpemeriksaan').off('bindingcomplete.mikro-expertise').on('bindingcomplete.mikro-expertise', function () {
|
||||||
|
openFocusedPeriksa();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#btnkembali2').off('click.mikro-expertise').on('click.mikro-expertise', function () {
|
||||||
|
window.location.href = returnUrl;
|
||||||
|
});
|
||||||
|
|
||||||
|
setInitialFilters();
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
if (typeof openedpage === 'function') {
|
||||||
|
openedpage();
|
||||||
|
} else {
|
||||||
|
$('#divawal').show();
|
||||||
|
}
|
||||||
|
}, 250);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
+10
-4
@@ -90,7 +90,7 @@ GENEXPERT_RESPONSE_MODE_BY_IP = {
|
|||||||
# Pastikan IP ini SESUAI dengan settingan "Server IP" di masing-masing alat (Client Mode)
|
# Pastikan IP ini SESUAI dengan settingan "Server IP" di masing-masing alat (Client Mode)
|
||||||
TARGET_MAPPING = {
|
TARGET_MAPPING = {
|
||||||
'flg_gxp1': '10.10.120.73',
|
'flg_gxp1': '10.10.120.73',
|
||||||
'flg_gxp2': '10.10.123.74',
|
'flg_gxp2': '10.10.120.13',
|
||||||
'flg_gxp3': '10.10.120.75'
|
'flg_gxp3': '10.10.120.75'
|
||||||
}
|
}
|
||||||
# GeneXpert Configuration
|
# GeneXpert Configuration
|
||||||
@@ -150,7 +150,7 @@ GENEXPERT_TEST_MAPPING = {
|
|||||||
}
|
}
|
||||||
GENEXPERT_IP_CAPABILITIES = {
|
GENEXPERT_IP_CAPABILITIES = {
|
||||||
"10.10.120.75": ["MTB-RIF", "MTB-RIF_ULTRA2", "MTB-XDR", "HIV-1_VL", "COV-2 2"],
|
"10.10.120.75": ["MTB-RIF", "MTB-RIF_ULTRA2", "MTB-XDR", "HIV-1_VL", "COV-2 2"],
|
||||||
"10.10.120.74": ["HCV", "HBV"],
|
"10.10.120.13": ["HCV", "HBV"],
|
||||||
"10.10.120.73": ["MTB-RIF"]
|
"10.10.120.73": ["MTB-RIF"]
|
||||||
}
|
}
|
||||||
# Default code jika nama tes di database tidak dikenali
|
# Default code jika nama tes di database tidak dikenali
|
||||||
@@ -2205,6 +2205,11 @@ def handle_genexpert_client(conn, addr):
|
|||||||
try:
|
try:
|
||||||
data = conn.recv(4096)
|
data = conn.recv(4096)
|
||||||
if not data:
|
if not data:
|
||||||
|
if pending_astm_hl7:
|
||||||
|
log_genexpert_handshake(addr[0], "ASTM-MSG-PROCESS", detail="reason=connection-close")
|
||||||
|
process_genexpert_hl7_message(conn, addr[0], pending_astm_hl7, pending_astm_framing or "astm")
|
||||||
|
pending_astm_hl7 = None
|
||||||
|
pending_astm_framing = None
|
||||||
print(f"[GenExpert_TCP] Client {addr} menutup koneksi.")
|
print(f"[GenExpert_TCP] Client {addr} menutup koneksi.")
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -2294,8 +2299,9 @@ def handle_genexpert_client(conn, addr):
|
|||||||
# Sisa buffer (jika ada paket nempel di belakangnya) disimpan untuk loop berikutnya
|
# Sisa buffer (jika ada paket nempel di belakangnya) disimpan untuk loop berikutnya
|
||||||
buffer = buffer[end_marker_pos:]
|
buffer = buffer[end_marker_pos:]
|
||||||
|
|
||||||
# Bersihkan buffer dari sisa marker di awal (jika loop sebelumnya menyisakan sampah)
|
# Jangan buang EOT di sini; jika EOT datang menempel setelah frame ASTM,
|
||||||
buffer = buffer.lstrip(b'\x04').lstrip(b'\r').lstrip(b'\n')
|
# ia harus diproses pada iterasi berikutnya agar pending ASTM message dijalankan.
|
||||||
|
buffer = buffer.lstrip(b'\r').lstrip(b'\n')
|
||||||
|
|
||||||
# Decode ke string
|
# Decode ke string
|
||||||
temp_str = full_message_bytes.decode('latin-1', errors='ignore')
|
temp_str = full_message_bytes.decode('latin-1', errors='ignore')
|
||||||
|
|||||||
Reference in New Issue
Block a user