Sims 4 Doctor Diagnosis Chart

Simplifies the diagnosis of patients.

HTML

<button type="button" onclick="symptomsClearAll();">Clear All</button>
<div id="symptom_list">
  <h4>Symptoms</h4>
  <!-- Rash Types -->
  <div>
    <input type="checkbox" name="symptoms" class="symptom" value="spot_rash"> Spot Rash
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="swirl_rash"> Swirl Rash
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="stripes_rash"> Tiger Stripes Rash
    <br>
  </div>
  <!-- Symptoms -->
  <div>
    <input type="checkbox" name="symptoms" class="symptom" value="head_steam"> Steam From Ears
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="dizziness"> Dizziness (Spinning stars)
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="headache"> Headache
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="fever"> Fever
    <br>
  </div>
  <div>
    <input type="checkbox" name="symptoms" class="symptom" value="stomach_ache"> Stomach Ache
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="cough"> Cough
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="sneeze"> Sneeze
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="swatting"> Swatting (At invisible objects)
    <br>
  </div>
  <div>
    <input type="checkbox" name="symptoms" class="symptom" value="itchiness"> Itchiness
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="giggling"> Giggling
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="passing_gas"> Passing Gas
    <br>
  </div>
  <div>
  <!--
    <input type="checkbox" name="symptoms" class="symptom" value="thermometer_bubble"> Thermometer (Bubble)
    <br>
    -->
    <input type="checkbox" name="symptoms" class="symptom" value="passing_gas_bubble"> Passing Gas (Bubble)
    <br>
    <input type="checkbox" name="symptoms" class="symptom" value="pepto_bubble"> Pepto (Bubble)
    <!--
    <br>
...

CSS

html {
  font-family: Arial, Helvetica, sans-serif;
}

div {
  margin: 8px;
}

.unconfirmed {
  display: none;
}

button {
  padding: 6px 12px;
  font-weight: bold;
}

JavaScript

/**
 * Created by KellyCode on 1/16/2016.
 */

/**
 * Diagnosis based on
 * 1. http://www.carls-sims-4-guide.com/careers/gettowork/doctor/
 * 2. http://sims-online.com/sims-4-doctor-career-guide-active/
 * 3. my own testing
 *
 * I included in the html but commented out and didn't use the
 * thought bubble symptoms because the sims use a ton of thought
 * bubbles and I just didn't have time to test them and the symptoms they display
 * otherwise seem like more than enough for a diagnosis.
 */

var ailments;
/*
 * List of possible ailments listed in the order of how often they tend to occur
 */
ailments = {
  'starry_eyes': {
    'symptoms': ['dizziness', 'swirl_rash', 'swatting'],
    'name': 'Starry Eyes'
  },
  'bloaty_head': {
    'symptoms': ['head_steam', 'headache', 'spot_rash'],
    'name': 'Bloaty Head'
  },
  'gas_and_giggles': {
    'symptoms': ['stomach_ache', 'food_bubble', 'thermometer_bubble', 'giggling', 'stripes_rash', 'passing_gas_bubble', 'passing_gas'],
    'name': 'Gas-and-Giggles'
  },
  'llama_flu': {
    'symptoms': ['spot_rash', 'sneeze', 'cough', 'thermometer_bubble', 'fever', 'pepto_bubble'],
    'name': 'Llama Flu'
  },
  'sweaty_shivers': {
    'symptoms': ['spot_rash', 'itchiness', 'thermometer_bubble', 'fever'],
    'name': 'Sweaty Shivers'
  },
  'itchy_plumbob': {
    'symptoms': ['itchiness', 'giggling', 'stripes_rash', 'spot_rash'],
    'name': 'Itchy Plumbob'
  },
  'burnin_belly': {
    'symptoms': ['stomach_ache', 'pepto_bubble', 'fever'],
    'name': 'Burnin\' Belly'
  },
  // pass_gas symptom added (cheek lift and waves hand in front of face)
  'triple_threat': {
    'symptoms': ['dizziness', 'sneeze', 'itchiness', 'cough', 'stripes_rash', 'spot_rash', 'swirl_rash', 'pepto_bubble', 'passing_gas'],
    'name': 'Triple Threat'
  }
};

var symptomsClearAll = function() {
  // remove the checks from all boxes
  $("input[name='symptoms']").removeAttr('checked');
  // signal a change to the first one so the list gets updated
 ...