{"id":504,"date":"2015-12-08T11:43:34","date_gmt":"2015-12-08T11:43:34","guid":{"rendered":"http:\/\/medical.bold-themes.com\/clinic\/?page_id=504"},"modified":"2025-06-24T01:29:45","modified_gmt":"2025-06-23T18:29:45","slug":"thong-tin-y-khoa-2","status":"publish","type":"page","link":"https:\/\/benhvienthaihoa.vn\/en\/thong-tin-y-khoa-2\/","title":{"rendered":"Th\u00f4ng tin y khoa"},"content":{"rendered":"<p><section id=\"bt_section69da9061e9380\"  class=\"boldSection btDivider topSemiSpaced bottomSemiSpaced btDarkSkin gutter inherit wBackground cover\" style=\"background-color:#0176d5;background-image:url('https:\/\/benhvienthaihoa.vn\/wp-content\/uploads\/2022\/11\/Group-1.png');\"><div class=\"port\"><div class=\"boldCell\"><div class=\"boldCellInner\"><div class=\"boldRow\" ><div class=\"boldRowInner\"><div class=\"rowItem col-md-8 col-ms-12 btTextLeft animate animate-fadein animate-moveleft inherit\"  ><div class=\"rowItemContent\" ><div class=\"btClear btSeparator topExtraSmallSpaced bottomExtraSmallSpaced noBorder\" ><hr><\/div><header class=\"header btClear extralarge btDash bottomDash  btAlternateDash\" ><div class=\"dash\"><h1><span class=\"headline\">TH\u00d4NG TIN Y KHOA<\/span><\/h1><\/div><\/header><\/div><\/div><div class=\"rowItem col-md-4 col-ms-12 btTextLeft\"  ><div class=\"rowItemContent\" ><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section><section id=\"bt_section69da9061e9738\"  class=\"boldSection topSpaced bottomSpaced gutter inherit new-list-custom\" ><div class=\"port\"><div class=\"boldCell\"><div class=\"boldCellInner\"><div class=\"boldRow\" ><div class=\"boldRowInner\"><div class=\"rowItem col-md-12 col-ms-12  btTextCenter inherit btDoublePadding\"  ><div class=\"rowItemContent\" ><!-- \nCustom JavaScript to auto-generate category filter options based on the \"Category Slug\" field in the Bold Grid element.\n\n\u2714 This script reads the slug list from the \"data-cat-slug\" attribute of the Grid.\n\u2714 It hides all default category filter options.\n\u2714 It dynamically creates new options for only the selected slugs.\n\u2714 Each button uses the real Vietnamese category name (e.g., \"Th\u00f4ng tin y khoa\" instead of \"thong-tin-y-khoa\").\n\u2714 When clicked, the new option will visually activate and trigger the filter as if the original button was clicked.\n\nNote: Update the `slugMap` object inside the script if you add more category slugs.\nThis helps ensure the correct Vietnamese names are shown for each slug.\n\nDate added: 2025-06-23\nAuthor: Tony Huynh (Admin)\n-->\n\n<script>\n\n\/\/ Get category slugs from the grid element\ndocument.addEventListener(\"DOMContentLoaded\", async function () {\n    const grid = document.querySelector('[data-cat-slug]');\n    if (!grid) return;\n\n    const slugString = grid.getAttribute(\"data-cat-slug\");\n    if (!slugString) return;\n\n    const slugs = slugString.split(',').map(s => s.trim());\n\n    \/\/ Fetch all categories from WordPress REST API\n    const res = await fetch(\"\/wp-json\/wp\/v2\/categories?per_page=100\");\n    const allCategories = await res.json();\n\n    \/\/ Create a lookup of slug \u2192 Vietnamese name (get the category name - already in Vietnamese)\n    const slugMap = {};\n    allCategories.forEach(cat => {\n        if (slugs.includes(cat.slug)) {\n            slugMap[cat.slug] = cat.name;\n        }\n    });\n\n    \/\/ Hide existing filters except our new ones\n    document.querySelectorAll(\".btCatFilter .btCatFilterItem\").forEach(el => {\n        if (!el.classList.contains(\"autoSlugTag\")) el.style.display = \"none\";\n    });\n\n    const filterContainer = document.querySelector(\".btCatFilter\");\n    if (!filterContainer) return;\n\n    \/\/ Generate new filter buttons using API data\n    slugs.forEach(slug => {\n        const span = document.createElement(\"span\");\n        span.className = \"btCatFilterItem autoSlugTag\";\n        span.setAttribute(\"data-slug\", slug);\n        span.textContent = slugMap[slug] || slug;\n\n        span.addEventListener(\"click\", function () {\n            document.querySelectorAll(\".btCatFilterItem\").forEach(btn => btn.classList.remove(\"active\"));\n            this.classList.add(\"active\");\n\n            const filterBtn = document.querySelector(`.btCatFilterItem[data-slug='${slug}']`);\n            if (filterBtn && filterBtn !== this) filterBtn.click(); \/\/ trigger actual filter\n        });\n\n        filterContainer.appendChild(span);\n    });\n});\n\n<\/script>\n<div class=\"btGridContainer classic btGridGap-20 btHasTitles\" ><div class=\"btCatFilter\"><span class=\"btCatFilterTitle\">Category filter:<\/span><span class=\"btCatFilterItem all\" data-slug=\"\">All<\/span><span class=\"btCatFilterItem\" data-slug=\"bai-viet-y-khoa\">B\u00e0i vi\u1ebft y khoa<\/span><span class=\"btCatFilterItem\" data-slug=\"cntt\">CNTT<\/span><span class=\"btCatFilterItem\" data-slug=\"dich-vu\">D\u1ecbch v\u1ee5<\/span><span class=\"btCatFilterItem\" data-slug=\"quy-trinh-ngoai-tru\">Quy tr\u00ecnh ngo\u1ea1i tr\u00fa<\/span><span class=\"btCatFilterItem\" data-slug=\"thong-bao\">Th\u00f4ng B\u00e1o<\/span><span class=\"btCatFilterItem\" data-slug=\"thong-tin-y-khoa\">Th\u00f4ng tin y khoa<\/span><span class=\"btCatFilterItem\" data-slug=\"tiem-chung\">Ti\u00eam ch\u1ee7ng<\/span><\/div><div class=\"tilesWall btAjaxGrid classic\" data-num=\"6\" data-tiles-title=\"yes\" data-grid-type=\"classic\" data-post-type=\"post\" data-col=\"3\" data-cat-slug=\"thong-tin-y-khoa, bai-viet-y-khoa, dich-vu, tiem-chung\" data-scroll-loading=\"yes\" data-format=\"\" data-related=\"\" data-sticky=\"yes\"><div class=\"gridSizer\"><\/div><\/div><div class=\"btLoader btLoaderGrid\"><\/div><div class=\"btNoMore btTextCenter topSmallSpaced bottomSmallSpaced\">No more posts<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section><\/p>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"class_list":["post-504","page","type-page","status-publish","hentry"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/benhvienthaihoa.vn\/en\/wp-json\/wp\/v2\/pages\/504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benhvienthaihoa.vn\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/benhvienthaihoa.vn\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/benhvienthaihoa.vn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benhvienthaihoa.vn\/en\/wp-json\/wp\/v2\/comments?post=504"}],"version-history":[{"count":31,"href":"https:\/\/benhvienthaihoa.vn\/en\/wp-json\/wp\/v2\/pages\/504\/revisions"}],"predecessor-version":[{"id":3417,"href":"https:\/\/benhvienthaihoa.vn\/en\/wp-json\/wp\/v2\/pages\/504\/revisions\/3417"}],"wp:attachment":[{"href":"https:\/\/benhvienthaihoa.vn\/en\/wp-json\/wp\/v2\/media?parent=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}