{"id":21227,"date":"2026-05-20T14:34:27","date_gmt":"2026-05-20T12:34:27","guid":{"rendered":"https:\/\/www.drugshortage.ch\/?page_id=21227"},"modified":"2026-06-18T18:30:56","modified_gmt":"2026-06-18T16:30:56","slug":"auswertung-nach-atc","status":"publish","type":"page","link":"https:\/\/www.drugshortage.ch\/index.php\/auswertung-nach-atc\/","title":{"rendered":"Auswertung nach ATC"},"content":{"rendered":"\n<!-- ============================================================\n     ANLEITUNG: In WordPress als \"Benutzerdefiniertes HTML\"-Block einf\u00fcgen.\n     Slug dieser Seite: lieferengpaesse-nach-atc\n     Aufruf: \/index.php\/lieferengpaesse-nach-atc\/?ATC=A02\n     ============================================================ -->\n<style>\n  #atc-outer { width:100%; box-sizing:border-box; font-family:'Segoe UI',Arial,sans-serif; font-size:13px; color:#2d3748; }\n  .container,.container-fluid,.entry-content,.post-content,.page-content,\n  .site-content,.content-area,#content,#primary,main,article {\n    max-width:100% !important; overflow:visible !important;\n  }\n\n  \/* Ladeanimation *\/\n  #atc-loading { display:flex; align-items:center; gap:12px; padding:30px 20px; color:#718096; font-size:15px; }\n  .atc-spinner { width:24px; height:24px; border:3px solid #e2e8f0; border-top-color:#e53e3e; border-radius:50%; animation:atcspin .8s linear infinite; flex-shrink:0; }\n  @keyframes atcspin { to { transform:rotate(360deg); } }\n\n  \/* Titel-Box *\/\n  .atc-title-box { background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:20px 24px; margin-bottom:20px; box-shadow:0 1px 4px rgba(0,0,0,.06); }\n  .atc-title { font-size:20px; font-weight:700; color:#2d3748; margin-bottom:4px; }\n  .atc-code { font-size:15px; color:#e53e3e; font-weight:600; margin-top:6px; }\n\n  \/* Abschnittstitel *\/\n  .atc-section-title { font-size:15px; font-weight:700; color:#2d3748; margin:0 0 12px 0; padding-bottom:6px; border-bottom:2px solid #e53e3e; display:flex; align-items:center; gap:8px; }\n  .atc-icon { background:#e53e3e; color:#fff; border-radius:6px; padding:2px 8px; font-size:11px; font-weight:600; }\n\n  \/* Tabelle *\/\n  .atc-table-wrap { overflow-x:auto; width:100%; border-radius:8px; box-shadow:0 1px 4px rgba(0,0,0,.07); }\n  .atc-table { width:100%; border-collapse:collapse; background:#fff; }\n  .atc-table thead tr { background:#2d3748; }\n  .atc-table th { padding:9px 12px; text-align:left; font-size:13px; font-weight:600; color:#fff; white-space:nowrap; cursor:pointer; user-select:none; }\n  .atc-table th:hover { background:#4a5568; }\n  .atc-table td { padding:7px 12px; border-bottom:1px solid #edf2f7; font-size:13px; vertical-align:middle; }\n  .atc-table tbody tr:last-child td { border-bottom:none; }\n  .atc-table tbody tr:hover td { background:#f7fafc !important; }\n  .atc-table a { color:#e53e3e; text-decoration:none; font-weight:500; }\n  .atc-table a:hover { text-decoration:underline; }\n\n  \/* Leer \/ Eingabe *\/\n  .atc-leer { padding:20px; color:#718096; text-align:center; font-style:italic; background:#f7fafc; border-radius:8px; }\n  .atc-input-box { background:#fffbeb; border:1px solid #fbd38d; border-radius:10px; padding:20px 24px; }\n  .atc-input { padding:10px 14px; border:1px solid #e2e8f0; border-radius:8px; font-size:14px; width:200px; outline:none; }\n  .atc-input:focus { border-color:#e53e3e; }\n  .atc-btn { padding:10px 20px; background:#e53e3e; color:#fff; border:none; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; margin-left:8px; }\n  .atc-btn:hover { background:#c53030; }\n\n  \/* Footer *\/\n  .atc-footer { font-size:11px; color:#a0aec0; margin-top:12px; text-align:right; }\n<\/style>\n\n<div id=\"atc-outer\">\n  <div id=\"atc-loading\" style=\"display:none;\"><div class=\"atc-spinner\"><\/div> Daten werden geladen\u2026<\/div>\n\n  <!-- Eingabe falls kein URL-Parameter -->\n  <div id=\"atc-input-box\" class=\"atc-input-box\" style=\"display:none;\">\n    <p style=\"font-weight:600;margin-bottom:12px;\">Bitte ATC-Code eingeben:<\/p>\n    <input type=\"text\" id=\"atc-input\" class=\"atc-input\" placeholder=\"z.B. A02\u2026\" maxlength=\"20\">\n    <button class=\"atc-btn\" onclick=\"atcSuche()\">Suchen \u2192<\/button>\n  <\/div>\n\n  <div id=\"atc-inhalt\" style=\"display:none;\">\n    <div class=\"atc-title-box\">\n      <div class=\"atc-title\">\u00dcbersicht Lieferengp\u00e4sse nach ATC (Therapeutische Gruppen)<\/div>\n      <div class=\"atc-code\">ATC: <span id=\"atc-code-anzeige\">\u2013<\/span><\/div>\n      <div style=\"font-size:12px;color:#718096;margin-top:4px;\">\n        <span id=\"atc-anzahl\">0<\/span> offene Lieferengp\u00e4sse\n      <\/div>\n    <\/div>\n\n    <div class=\"atc-section-title\"><span class=\"atc-icon\">&#x1f48a;<\/span> Lieferengp\u00e4sse<\/div>\n    <div class=\"atc-table-wrap\">\n      <table class=\"atc-table\" style=\"min-width:900px;\">\n        <thead><tr>\n          <th onclick=\"atcSortiere('atc')\">ATC &#x2195;<\/th>\n          <th onclick=\"atcSortiere('bezeichnung')\">Bezeichnung &#x2195;<\/th>\n          <th onclick=\"atcSortiere('firma')\">Firma &#x2195;<\/th>\n          <th onclick=\"atcSortiere('ersteMeldung')\">Datum erste Meldung &#x2195;<\/th>\n          <th onclick=\"atcSortiere('status')\">Status &#x2195;<\/th>\n          <th onclick=\"atcSortiere('lieferdatum')\">Lieferf\u00e4higkeit ab &#x2195;<\/th>\n          <th onclick=\"atcSortiere('mutation')\">Letzte Mutation &#x2195;<\/th>\n          <th>M\u00f6gliche Alternativen<\/th>\n        <\/tr><\/thead>\n        <tbody id=\"atc-tbody\"><\/tbody>\n      <\/table>\n    <\/div>\n    <div class=\"atc-footer\">drugshortage.ch<\/div>\n  <\/div>\n<\/div>\n\n<script>\nconst ATC_BASE = \"https:\/\/www.drugshortage.ch\";\nconst ATC_API  = ATC_BASE + \"\/ds.php?a=nachatc\";\n\/\/ Signierung erfolgt serverseitig in ds.php (Origin-geschuetzt). Kein Schluessel im Browser.\n\nlet atcAlleDaten = [];\nlet atcSortiereNach = \"atc\";\nlet atcAufsteigend = true;\n\nfunction atcGetParam(name) {\n  return new URLSearchParams(window.location.search).get(name) || \"\";\n}\n\nasync function atcLade(atc) {\n  document.getElementById(\"atc-loading\").style.display   = \"flex\";\n  document.getElementById(\"atc-input-box\").style.display = \"none\";\n  document.getElementById(\"atc-inhalt\").style.display    = \"none\";\n\n  try {\n    const res = await fetch(ATC_API + \"&ATC=\" + encodeURIComponent(atc), {headers: {'X-Requested-With': 'XMLHttpRequest'}});\n    const d = await res.json();\n\n    if (d.fehler) {\n      document.getElementById(\"atc-loading\").innerHTML =\n        \"<div style='color:#c53030;padding:20px;background:#fff5f5;border-radius:8px;width:100%;'>\" +\n        \"<strong>&#x26a0;&#xfe0f; Fehler:<\/strong> \" + d.fehler + \"<\/div>\";\n      return;\n    }\n\n    document.getElementById(\"atc-code-anzeige\").textContent = d.atc || atc;\n    atcAlleDaten = d.engpaesse || [];\n    document.getElementById(\"atc-anzahl\").textContent = atcAlleDaten.length;\n    atcZeigeTabelle(atcAlleDaten);\n\n    document.getElementById(\"atc-loading\").style.display = \"none\";\n    document.getElementById(\"atc-inhalt\").style.display  = \"block\";\n\n  } catch(err) {\n    document.getElementById(\"atc-loading\").innerHTML =\n      \"<div style='color:#c53030;padding:20px;'>&#x274c; Fehler beim Laden: \" + err + \"<\/div>\";\n  }\n}\n\nfunction atcZeigeTabelle(daten) {\n  const tbody = document.getElementById(\"atc-tbody\");\n  tbody.innerHTML = \"\";\n  if (!daten.length) {\n    tbody.innerHTML = \"<tr><td colspan='8' class='atc-leer'>Keine offenen Lieferengp\u00e4sse f\u00fcr diesen ATC-Code gefunden.<\/td><\/tr>\";\n    return;\n  }\n  daten.forEach(function(e) {\n    const tr = document.createElement(\"tr\");\n    const detailUrl = ATC_BASE + \"\/index.php\/detail-lieferengpass\/?ID=\" + e.id;\n    const altUrl    = ATC_BASE + \"\/index.php\/alternativen\/?GTIN=\" + encodeURIComponent(e.gtin || \"\");\n    tr.innerHTML =\n      \"<td style='white-space:nowrap;font-weight:600;color:#4a5568;'>\" + (e.atc || \"\u2013\") + \"<\/td>\" +\n      \"<td style='white-space:nowrap;'><a href='\" + detailUrl + \"' target='_blank'>\" + (e.bezeichnung || \"\u2013\") + \"<\/a><\/td>\" +\n      \"<td style='white-space:nowrap;'>\" + (e.firma || \"\u2013\") + \"<\/td>\" +\n      \"<td style='white-space:nowrap;'>\" + atcDatum(e.ersteMeldung)  + \"<\/td>\" +\n      \"<td style='white-space:nowrap;font-size:12px;'>\" + (e.status || \"\u2013\") + \"<\/td>\" +\n      \"<td style='white-space:nowrap;'>\" + atcDatum(e.lieferdatum)   + \"<\/td>\" +\n      \"<td style='white-space:nowrap;color:#718096;'>\" + atcDatum(e.mutation) + \"<\/td>\" +\n      \"<td><a href='\" + altUrl + \"' target='_blank' style='font-size:11px;border:1px solid #e53e3e;padding:2px 7px;border-radius:4px;white-space:nowrap;'>Alternativen \u2192<\/a><\/td>\";\n    tbody.appendChild(tr);\n  });\n}\n\nfunction atcSortiere(feld) {\n  atcAufsteigend = (atcSortiereNach === feld) ? !atcAufsteigend : true;\n  atcSortiereNach = feld;\n  const liste = atcAlleDaten.slice().sort(function(a, b) {\n    const va = (a[feld] || \"\").toLowerCase();\n    const vb = (b[feld] || \"\").toLowerCase();\n    return atcAufsteigend ? va.localeCompare(vb) : vb.localeCompare(va);\n  });\n  atcZeigeTabelle(liste);\n}\n\nfunction atcSuche() {\n  const atc = document.getElementById(\"atc-input\").value.trim();\n  if (!atc) { alert(\"Bitte einen ATC-Code eingeben.\"); return; }\n  atcLade(atc);\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", function() {\n  const atc = atcGetParam(\"ATC\");\n  if (atc) {\n    atcLade(atc);\n  } else {\n    document.getElementById(\"atc-input-box\").style.display = \"block\";\n  }\n  const inp = document.getElementById(\"atc-input\");\n  if (inp) inp.addEventListener(\"keydown\", function(e) {\n    if (e.key === \"Enter\") atcSuche();\n  });\n});\n\nfunction atcDatum(s) { return s ? s.substring(0, 10) : \"\u2013\"; }\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Daten werden geladen\u2026 Bitte ATC-Code eingeben: Suchen \u2192 \u00dcbersicht Lieferengp\u00e4sse nach ATC (Therapeutische Gruppen) ATC: \u2013 0 offene Lieferengp\u00e4sse &#x1f48a; Lieferengp\u00e4sse ATC &#x2195; Bezeichnung &#x2195; Firma &#x2195; Datum erste Meldung &#x2195; Status &#x2195; Lieferf\u00e4higkeit ab &#x2195; Letzte Mutation &#x2195; M\u00f6gliche Alternativen drugshortage.ch<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":"","_members_access_role":[],"_members_access_error":""},"class_list":["post-21227","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/comments?post=21227"}],"version-history":[{"count":2,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21227\/revisions"}],"predecessor-version":[{"id":21827,"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/pages\/21227\/revisions\/21827"}],"wp:attachment":[{"href":"https:\/\/www.drugshortage.ch\/index.php\/wp-json\/wp\/v2\/media?parent=21227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}