Experience MedEx Seamless Care Delivery — 10% OFF on Your First Appointment - Use 'TRYMEDEX' Coupon Code on Checkout

location
0 - ฿0.00

No products in the cart.

location
0 - ฿0.00

No products in the cart.

0 - ฿0.00

No products in the cart.

1
Search
2
Filter
3
Select Tests
4
Review Cart
5
Checkout

Find and Order Laboratory Tests

Blood Urine Hormones Cancer Cardiac Rapid Results Basic Checkup Complete Panel

Filter By Categories

Available Tests

Scroll for more tests
0
'); printWindow.document.write(''); printWindow.document.close(); printWindow.addEventListener('load', function() { setTimeout(function() { printWindow.print(); setTimeout(function() { printWindow.close(); }, 500); }, 500); }); }); }; LabDOSApp.copyCartAsBulletList = function() { if (!this.cart || this.cart.length === 0) { this.showAchievement('Empty Cart', 'Please add some tests to your cart before copying.'); return; } const bulletList = this.formatCartAsBulletList(); const textarea = document.createElement('textarea'); textarea.value = bulletList; textarea.setAttribute('readonly', ''); textarea.style.position = 'absolute'; textarea.style.left = '-9999px'; document.body.appendChild(textarea); textarea.select(); document.execCommand('copy'); document.body.removeChild(textarea); this.showAchievement('Copied to Clipboard!', 'Cart items have been copied in bullet list format.'); }; LabDOSApp.printCart = function() { if (!this.cart || this.cart.length === 0) { this.showAchievement('Empty Cart', 'Please add some tests to your cart before printing.'); return; } this.showPrintPopup(); }; LabDOSApp.addCartIcons = function() { if ($('#cart-action-icons').length > 0) { return; } const isMobile = window.innerWidth < 768; const iconContainer = `
CHECKOUT NOW
`; $('#subtotal').parent().after(iconContainer); const self = this; // Bind print event (CSS will hide on mobile) $('#print-cart-btn').on('click', function() { self.printCart.call(self); }); $('#copy-cart-btn').on('click', function() { self.copyCartAsBulletList.call(self); }); }; LabDOSApp.originalRenderCart = LabDOSApp.renderCart; LabDOSApp.renderCart = function(highlightItemName = null) { this.originalRenderCart.call(this, highlightItemName); this.addCartIcons.call(this); }; $(document).ready(function() { setTimeout(function() { if (LabDOSApp && typeof LabDOSApp.addCartIcons === 'function') { LabDOSApp.addCartIcons.call(LabDOSApp); } }, 1000); // Fresh: Toggle labdos-inview class and handle sticky search box (function(){ var rootEl = document.getElementById('lab-dos'); if (!rootEl) return; function setInView(inView){ document.body.classList.toggle('labdos-inview', !!inView); console.log('labdos-inview:', inView); // Debug } function recompute() { var rect = rootEl.getBoundingClientRect(); var vpH = window.innerHeight || document.documentElement.clientHeight; // Consider in view if significant part of #lab-dos is visible var inView = rect.bottom > vpH * 0.2 && rect.top < vpH * 0.8; setInView(inView); } if ('IntersectionObserver' in window) { try { var io = new IntersectionObserver(function(entries){ entries.forEach(function(entry){ setInView(entry.isIntersecting); }); }, { threshold: [0, 0.01], rootMargin: '0px 0px -30% 0px' }); io.observe(rootEl); } catch(e) { /* fallback to scroll checks */ } } $(window).on('scroll.labdos resize.labdos orientationchange.labdos', recompute); setTimeout(recompute, 100); })(); // Force sticky search box on mobile with aggressive approach (function(){ console.log('Initializing sticky search box'); // Debug var $searchBox = $('#lab-dos .search-box'); var $searchWrapper = $('#lab-dos .search-wrapper'); console.log('Found elements:', $searchBox.length, $searchWrapper.length); // Debug if (!$searchBox.length || !$searchWrapper.length) return; var stickyClone = null; var isStuck = false; function handleSticky() { var isMobile = window.innerWidth <= 991; if (!isMobile) { if (isStuck) unstickSearchBox(); return; } if (!document.body.classList.contains('labdos-inview')) { if (isStuck) unstickSearchBox(); return; } var searchRect = $searchBox[0].getBoundingClientRect(); var shouldStick = searchRect.top <= 60; console.log('Sticky check:', { shouldStick, searchTop: searchRect.top, isStuck }); // Debug if (shouldStick && !isStuck) { stickSearchBox(); } else if (!shouldStick && isStuck) { unstickSearchBox(); } } function stickSearchBox() { if (isStuck) return; isStuck = true; console.log('ACTIVATING sticky search box'); // Debug // Create a simple anchor-style sticky search stickyClone = $('
'); stickyClone.html(`
Tap to search lab tests...
`); stickyClone.css({ position: 'fixed', top: '60px', left: '15px', right: '15px', height: '50px', zIndex: '99999', backgroundColor: 'rgba(255, 255, 255, 0.95)', backdropFilter: 'blur(15px)', webkitBackdropFilter: 'blur(15px)', border: '1px solid rgba(255, 76, 136, 0.2)', boxShadow: '0 8px 32px rgba(255, 76, 136, 0.15)', borderRadius: '16px', cursor: 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#6a297a', fontSize: '16px', fontWeight: '500' }); // When clicked, scroll to original search and focus stickyClone.on('click', function(){ $('html, body').animate({ scrollTop: Math.max(0, $searchBox.offset().top - 100) }, 400, function(){ $searchBox.find('#searchBox').focus(); }); }); $('body').append(stickyClone); // Add spacer $searchWrapper.css('paddingTop', '70px'); } function unstickSearchBox() { if (!isStuck) return; isStuck = false; console.log('DEACTIVATING sticky search box'); // Debug if (stickyClone) { stickyClone.remove(); stickyClone = null; } $searchWrapper.css('paddingTop', ''); } $(window).on('scroll.sticky resize.sticky orientationchange.sticky', handleSticky); setTimeout(handleSticky, 500); })(); // Initialize clear (×) button visibility on page load var $sb = $('#searchBox'); $sb.closest('.search-box').toggleClass('has-value', ($sb.val() || '').trim().length > 0); // After 10 seconds, move Gravity Form (id=3) into placeholder and reveal it setTimeout(function() { var $placeholder = $('#gravityform-placeholder'); if (!$placeholder.length) return; var $gf = $('#gform_wrapper_3'); if (!$gf.length) { $gf = $('#gform_3').closest('.gform_wrapper'); } if (!$gf.length) { $gf = $('.gform_wrapper').filter(function(){ return $(this).find('#gform_3').length > 0; }).first(); } if ($gf.length) { $gf.hide(); $placeholder.append($gf); $gf.fadeIn(300); } }, 10000); // Lazy-load Google Maps API only when user interacts with the form/section (function(){ var mapsSrc = null; var mapsInjected = false; function captureAndRemoveMapsScript() { if (window.google && window.google.maps) { mapsInjected = true; // Already loaded return; } var $scripts = $('script[src*="maps.googleapis.com/maps/api/js"]'); if ($scripts.length) { mapsSrc = $scripts.eq(0).attr('src'); // Remove all matching scripts to prevent immediate load $scripts.remove(); } } function injectMapsScriptOnce() { if (mapsInjected) return; mapsInjected = true; if (!mapsSrc) return; var s = document.createElement('script'); s.src = mapsSrc; s.async = true; s.defer = true; document.head.appendChild(s); } // Try to capture script tags ASAP captureAndRemoveMapsScript(); // Load on interaction with checkout section or any input inside the form var interactionEvents = 'click focus touchstart change'; $(document).on(interactionEvents, '#checkout-section, #gform_wrapper_3, #gform_3, #gravityform-placeholder', function(){ injectMapsScriptOnce(); }); // Load when section is near viewport if ('IntersectionObserver' in window) { var observer = new IntersectionObserver(function(entries){ entries.forEach(function(entry){ if (entry.isIntersecting) { injectMapsScriptOnce(); observer.disconnect(); } }); }, { rootMargin: '200px' }); var el = document.getElementById('checkout-section'); if (el) observer.observe(el); } })(); }); })(jQuery);
Added to cart successfully! VIEW CART