{"id":19,"date":"2025-04-17T22:16:17","date_gmt":"2025-04-17T13:16:17","guid":{"rendered":"https:\/\/hoken.one\/?page_id=19"},"modified":"2025-04-18T13:27:21","modified_gmt":"2025-04-18T04:27:21","slug":"%e8%a1%8c%e5%8b%95%e3%82%bf%e3%82%a4%e3%83%97","status":"publish","type":"page","link":"https:\/\/hoken.one\/?page_id=19","title":{"rendered":"\u884c\u52d5\u30bf\u30a4\u30d7"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"ja\">\n<head>\n  <meta charset=\"UTF-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n  <title>\u3042\u306a\u305f\u306e\u5f37\u307f\u8a3a\u65ad<\/title>\n  <style>\n    body {\n      font-family: sans-serif;\n      line-height: 1.6;\n      margin: 2em;\n    }\n    .question {\n      margin-bottom: 1em;\n    }\n    #result {\n      margin-top: 2em;\n      padding: 1em;\n      border: 1px solid #ccc;\n      background: #f9f9f9;\n    }\n    button {\n      padding: 0.5em 1em;\n      font-size: 1em;\n      margin-top: 1em;\n    }\n    .input-group {\n      margin-bottom: 1em;\n    }\n    label span {\n      display: inline-block;\n      width: 8em;\n    }\n    #summaryTable {\n      margin-top: 2em;\n      border-collapse: collapse;\n      width: 100%;\n    }\n    #summaryTable th, #summaryTable td {\n      border: 1px solid #ccc;\n      padding: 8px;\n      text-align: left;\n    }\n    #summaryTable th {\n      background-color: #f0f0f0;\n    }\n  <\/style>\n<\/head>\n<body>\n  <h1>\u3042\u306a\u305f\u306e\u5f37\u307f\u8a3a\u65ad\uff08\u884c\u52d5\u30bf\u30a4\u30d7\uff09<\/h1>\n\n  <form id=\"diagnosisForm\">\n    <div class=\"input-group\">\n      <label><span>\u6240\u5c5e\u652f\u793e\uff1a<\/span><input type=\"text\" id=\"group1\" required \/><\/label>\n    <\/div>\n    <div class=\"input-group\">\n      <label><span>\u6240\u5c5e\u62e0\u70b9\uff1a<\/span><input type=\"text\" id=\"group2\" required \/><\/label>\n    <\/div>\n    <div class=\"input-group\">\n      <label><span>\u6c0f\u540d\uff1a<\/span><input type=\"text\" id=\"name\" required \/><\/label>\n    <\/div>\n    <div class=\"input-group\">\n      <label><span>\u5165\u793e\u5e74\uff1a<\/span><input type=\"text\" id=\"year\" required placeholder=\"\u4f8b: 2023\" \/><\/label>\n    <\/div>\n    <div class=\"input-group\">\n      <label><span>\u5165\u793e\u6708\uff1a<\/span><input type=\"text\" id=\"month\" required placeholder=\"\u4f8b: 04\" \/><\/label>\n    <\/div>\n\n    <div class=\"question\">\n      <label><input type=\"checkbox\" name=\"Dd\" \/> Q1\uff1a\u76ee\u6a19\u3092\u7acb\u3066\u3066\u884c\u52d5\u3059\u308b\u306e\u304c\u597d\u304d\u3060<\/label>\n    <\/div>\n    <div class=\"question\">\n      <label><input type=\"checkbox\" name=\"Aa\" \/> Q2\uff1a\u4eba\u306e\u6c17\u6301\u3061\u306b\u654f\u611f\u3060\u3068\u3088\u304f\u8a00\u308f\u308c\u308b<\/label>\n    <\/div>\n    <div class=\"question\">\n      <label><input type=\"checkbox\" name=\"Cc\" \/> Q3\uff1a\u8a08\u753b\u7684\u306b\u7269\u4e8b\u3092\u9032\u3081\u305f\u3044\u30bf\u30a4\u30d7\u3060<\/label>\n    <\/div>\n    <div class=\"question\">\n      <label><input type=\"checkbox\" name=\"Bb\" \/> Q4\uff1a\u4ef2\u9593\u3068\u306e\u3064\u306a\u304c\u308a\u3092\u5927\u5207\u306b\u3057\u3066\u3044\u308b<\/label>\n    <\/div>\n    <div class=\"question\">\n      <label><input type=\"checkbox\" name=\"Dd\" \/> Q5\uff1a\u3059\u3050\u306b\u884c\u52d5\u306b\u79fb\u3059\u3053\u3068\u304c\u3067\u304d\u308b<\/label>\n    <\/div>\n    <button type=\"button\" onclick=\"diagnose()\">\u8a3a\u65ad\u3059\u308b<\/button>\n  <\/form>\n\n  <div id=\"result\"><\/div>\n\n  <h2>\u96c6\u8a08\u7528\u30c7\u30fc\u30bf<\/h2>\n  <button onclick=\"downloadCSV()\">CSV\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/button>\n  <table id=\"summaryTable\">\n    <thead>\n      <tr>\n        <th>\u6240\u5c5e\u652f\u793e<\/th>\n        <th>\u6240\u5c5e\u62e0\u70b9<\/th>\n        <th>\u6c0f\u540d<\/th>\n        <th>\u5165\u793e\u5e74<\/th>\n        <th>\u5165\u793e\u6708<\/th>\n        <th>\u71b1\u60c5 (A)<\/th>\n        <th>\u53cb\u597d (B)<\/th>\n        <th>\u5b89\u5168 (C)<\/th>\n        <th>\u9054\u6210 (D)<\/th>\n        <th>\u71b1\u60c5 (a)<\/th>\n        <th>\u53cb\u597d (b)<\/th>\n        <th>\u5b89\u5168 (c)<\/th>\n        <th>\u9054\u6210 (d)<\/th>\n        <th>\u5f37\u307f\u5408\u8a08<\/th>\n        <th>\u5f31\u307f\u5408\u8a08<\/th>\n        <th>\u30a8\u30cd\u30eb\u30ae\u30fc\u5024<\/th>\n        <th>\u30bf\u30a4\u30d7<\/th>\n      <\/tr>\n    <\/thead>\n    <tbody id=\"summaryBody\"><\/tbody>\n  <\/table>\n\n  <script>\n    const summaryRows = [];\n\n    function diagnose() {\n      const group1 = document.getElementById('group1').value.trim();\n      const group2 = document.getElementById('group2').value.trim();\n      const name = document.getElementById('name').value.trim();\n      const year = document.getElementById('year').value.trim();\n      const month = document.getElementById('month').value.trim();\n      if (!group1 || !group2 || !name || !year || !month) {\n        alert('\u6240\u5c5e\u652f\u793e\u30fb\u6240\u5c5e\u62e0\u70b9\u30fb\u6c0f\u540d\u30fb\u5165\u793e\u5e74\u30fb\u5165\u793e\u6708\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002');\n        return;\n      }\n\n      const form = document.getElementById('diagnosisForm');\n      const scores = { A: 0, B: 0, C: 0, D: 0, a: 0, b: 0, c: 0, d: 0 };\n      const inputs = form.querySelectorAll('input[type=\"checkbox\"]');\n      inputs.forEach(input => {\n        if (input.checked && scores.hasOwnProperty(input.name)) {\n          scores[input.name]++;\n        }\n      });\n\n      const strengths = ['A', 'B', 'C', 'D'];\n      const weaknesses = ['a', 'b', 'c', 'd'];\n      const strengthScores = strengths.map(k => scores[k]);\n      const weaknessScores = weaknesses.map(k => scores[k]);\n\n      const totalStrength = strengthScores.reduce((a, b) => a + b, 0);\n      const totalWeakness = weaknessScores.reduce((a, b) => a + b, 0);\n      const energy = totalStrength - totalWeakness;\n\n      const topStrengthKey = strengths.reduce((a, b) => scores[a] >= scores[b] ? a : b);\n      const bottomWeaknessKey = weaknesses.reduce((a, b) => scores[a] <= scores[b] ? a : b);\n\n      const type = topStrengthKey + bottomWeaknessKey;\n      const typeMap = { A: '\u71b1\u60c5\u578b', B: '\u53cb\u597d\u578b', C: '\u5b89\u5168\u578b', D: '\u9054\u6210\u578b' };\n      const weakMap = { a: '\u71b1\u60c5\u578b', b: '\u53cb\u597d\u578b', c: '\u5b89\u5168\u578b', d: '\u9054\u6210\u578b' };\n\n      const resultDiv = document.getElementById('result');\n      resultDiv.innerHTML = `\n        <h2>\u8a3a\u65ad\u7d50\u679c<\/h2>\n        <p><strong>\u6240\u5c5e\u652f\u793e\uff1a<\/strong>${group1}<\/p>\n        <p><strong>\u6240\u5c5e\u62e0\u70b9\uff1a<\/strong>${group2}<\/p>\n        <p><strong>\u6c0f\u540d\uff1a<\/strong>${name}<\/p>\n        <p><strong>\u5165\u793e\u5e74\uff1a<\/strong>${year}<\/p>\n        <p><strong>\u5165\u793e\u6708\uff1a<\/strong>${month}<\/p>\n        <p><strong>\u5f37\u307f\uff1a<\/strong>${typeMap[topStrengthKey]}\uff08${topStrengthKey}\uff09<\/p>\n        <p><strong>\u5f31\u307f\uff1a<\/strong>${weakMap[bottomWeaknessKey]}\uff08${bottomWeaknessKey}\uff09<\/p>\n        <p><strong>\u5f37\u307f\u5408\u8a08\uff1a<\/strong>${totalStrength}<\/p>\n        <p><strong>\u5f31\u307f\u5408\u8a08\uff1a<\/strong>${totalWeakness}<\/p>\n        <p><strong>\u30a8\u30cd\u30eb\u30ae\u30fc\u5024\uff1a<\/strong>${energy}<\/p>\n        <p><strong>\u3042\u306a\u305f\u306e\u30bf\u30a4\u30d7\uff1a<\/strong>${type}<\/p>\n      `;\n\n      const summaryBody = document.getElementById('summaryBody');\n      const row = document.createElement('tr');\n      row.innerHTML = `\n        <td>${group1}<\/td>\n        <td>${group2}<\/td>\n        <td>${name}<\/td>\n        <td>${year}<\/td>\n        <td>${month}<\/td>\n        <td>${scores.A}<\/td>\n        <td>${scores.B}<\/td>\n        <td>${scores.C}<\/td>\n        <td>${scores.D}<\/td>\n        <td>${scores.a}<\/td>\n        <td>${scores.b}<\/td>\n        <td>${scores.c}<\/td>\n        <td>${scores.d}<\/td>\n        <td>${totalStrength}<\/td>\n        <td>${totalWeakness}<\/td>\n        <td>${energy}<\/td>\n        <td>${type}<\/td>\n      `;\n      summaryBody.appendChild(row);\n\n      summaryRows.push([\n        group1, group2, name, year, month,\n        scores.A, scores.B, scores.C, scores.D,\n        scores.a, scores.b, scores.c, scores.d,\n        totalStrength, totalWeakness, energy, type\n      ]);\n    }\n\n    function downloadCSV() {\n      const headers = [\n        \"\u6240\u5c5e\u652f\u793e\", \"\u6240\u5c5e\u62e0\u70b9\", \"\u6c0f\u540d\", \"\u5165\u793e\u5e74\", \"\u5165\u793e\u6708\",\n        \"\u71b1\u60c5 (A)\", \"\u53cb\u597d (B)\", \"\u5b89\u5168 (C)\", \"\u9054\u6210 (D)\",\n        \"\u71b1\u60c5 (a)\", \"\u53cb\u597d (b)\", \"\u5b89\u5168 (c)\", \"\u9054\u6210 (d)\",\n        \"\u5f37\u307f\u5408\u8a08\", \"\u5f31\u307f\u5408\u8a08\", \"\u30a8\u30cd\u30eb\u30ae\u30fc\u5024\", \"\u30bf\u30a4\u30d7\"\n      ];\n      const csvContent = [headers, ...summaryRows]\n        .map(row => row.map(field => `\"${field}\"`).join(\",\"))\n        .join(\"\\n\");\n\n      const blob = new Blob([csvContent], { type: \"text\/csv;charset=utf-8;\" });\n      const url = URL.createObjectURL(blob);\n      const a = document.createElement(\"a\");\n      a.setAttribute(\"href\", url);\n      a.setAttribute(\"download\", \"diagnosis_summary.csv\");\n      document.body.appendChild(a);\n      a.click();\n      document.body.removeChild(a);\n    }\n  <\/script>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>\u3042\u306a\u305f\u306e\u5f37\u307f\u8a3a\u65ad \u3042\u306a\u305f\u306e\u5f37\u307f\u8a3a\u65ad\uff08\u884c\u52d5\u30bf\u30a4\u30d7\uff09 \u6240\u5c5e\u652f\u793e\uff1a \u6240\u5c5e\u62e0\u70b9\uff1a \u6c0f\u540d\uff1a \u5165\u793e\u5e74\uff1a \u5165\u793e\u6708\uff1a Q1\uff1a\u76ee\u6a19\u3092\u7acb\u3066\u3066\u884c\u52d5\u3059\u308b\u306e\u304c\u597d\u304d\u3060 Q2\uff1a\u4eba\u306e\u6c17\u6301\u3061\u306b\u654f\u611f\u3060\u3068\u3088\u304f\u8a00\u308f\u308c\u308b Q3\uff1a\u8a08\u753b\u7684\u306b\u7269\u4e8b\u3092\u9032\u3081\u305f\u3044\u30bf\u30a4\u30d7\u3060 Q [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"swell_btn_cv_data":"","footnotes":""},"class_list":["post-19","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hoken.one\/index.php?rest_route=\/wp\/v2\/pages\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoken.one\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hoken.one\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hoken.one\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hoken.one\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19"}],"version-history":[{"count":9,"href":"https:\/\/hoken.one\/index.php?rest_route=\/wp\/v2\/pages\/19\/revisions"}],"predecessor-version":[{"id":28,"href":"https:\/\/hoken.one\/index.php?rest_route=\/wp\/v2\/pages\/19\/revisions\/28"}],"wp:attachment":[{"href":"https:\/\/hoken.one\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}