<?php
$questionArray = [
    "Regarding testosterone abnormality" => [
        "When/why did you become concerned about testosterone abnormality" => "text",
        "When were testosterone levelsfirst measured (levels?)" => "text"
    ],
    "When testosterone was first measured had you previously taken or were taking" => [
        "prescription pain medication" => ["radio" => ["yes", "no"]],
        "muscle building supplements or steroids" => ["radio" => ["yes", "no"]],
        "testosterone supplements/medications" => ["radio" => ["yes", "no"]]
    ],
    "Regarding sexual function" => [
        "Haslibido (sex drive) changed" => ["radio" => ["yes", "no"]],
        "Has erectile function changed" => ["radio" => ["yes", "no"]],
        "Have you used erection medications (What? How Long? Success?) describe" => "text"
    ],
    "Regarding fertility" => [
        "Do you have biological children" => ["radio" => ["yes", "no"]],
        "Have you needed fertility assistance for pregnancy" => ["radio" => ["yes", "no"]],
        "Are you hoping to have more children" => ["radio" => ["yes", "no", "maybe"]]
    ],
    "Regarding factors that may indicate a problem that can contribute to testosterone problems have you had" => [
        "Abnormal timing or issues with puberty" => ["radio" => ["yes", "no"]],
        "History of undescended or twisted testicle" => ["radio" => ["yes", "no"]],
        "History of testicular trauma or infections" => ["radio" => ["yes", "no"]],
        "History of brain trauma, concussion, or stroke" => ["radio" => ["yes", "no"]],
        "History of chemotherapy or radiation therapy" => ["radio" => ["yes", "no"]],
        "Issues with snoring" => ["radio" => ["yes", "no"]],
        "Prior Sleep apnea evaluation" => ["radio" => ["yes", "no"]],
        "Family members with low testosterone NO/YES: (Who?)" => "text",
        "Family members with fertility problems NO/YES: (Who?)" => "text"
    ],
    "Regarding prostate health" => [
        "Have you a rectal prostate exam NO/YES: If yes, last was when?abnormal?" => "text",
        "Have you had PSA blood testingNO/YES: If yes, last was when? Abnormal?" => "text",
    ],
    "<b>PERSONAL MEDICAL HISTORY</b> (indicate if you have the following with YEAR OF DIAGNOSIS)" => [
        "High Blood  if yes (Year of Diagnosis/ Details)" => "text",
        "High Cholesterol if yes (Year of Diagnosis/ Details)" => "text",
        "Heart Attack if yes (Year of Diagnosis/ Details)" => "text",
        "Stroke if yes  (Year of Diagnosis/ Details)" => "text",
        "Atrial Fibrillation if yes  (Year of Diagnosis/ Details)" => "text",
        "Celiac Disease if yes  (Year of Diagnosis/ Details)" => "text",
        "Cancer if yes  (Year of Diagnosis/ Details)" => "text",
        "Depression / Anxiety if yes  (Year of Diagnosis/ Details)" => "text",
        "Kidney Disease if yes  (Year of Diagnosis/ Details)" => "text",
        "Kidney Stones if yes  (Year of Diagnosis/ Details)" => "text",
        "Osteoporosis if yes  (Year of Diagnosis/ Details)" => "text",
        "Broken Bone if yes  (Year of Diagnosis/ Details)" => "text",
        "Liver problems/Hepatitis if yes  (Year of Diagnosis/ Details)" => "text",
        "Bleeding Problems if yes  (Year of Diagnosis/ Details)" => "text",
        "Intestinal Problems if yes  (Year of Diagnosis/ Details)" => "text",
        "Thyroid Problem if yes  (Year of Diagnosis/ Details)" => "text",
        "Emphysema/COPD if yes  (Year of Diagnosis/ Details)" => "text",
        "Asthma if yes  (Year of Diagnosis/ Details)" => "text",
        "Smoking if yes  (Year of Diagnosis/ Details)" => "text",
        "Alcoholism if yes  (Year of Diagnosis/ Details)" => "text",
        "Other Problems " => "text"
    ],
    "SURGICAL HISTORY " => [
        "Elevated PSA" => ["radio" => ['yes', 'no']],
        "Trouble passing urine" => ["radio" => ['yes', 'no']],
        "Taking medicine for prostate or male-pattern balding" => ["radio" => ['yes', 'no']],
        "History of anemia" => ["radio" => ['yes', 'no']],
        "Vasectomy" => ["radio" => ['yes', 'no']],
        "Erectile dysfunction" => ["radio" => ['yes', 'no']],
        "Testicular or prostate cancer" => ["radio" => ['yes', 'no']],
        "Prostate enlargement or BPH" => ["radio" => ['yes', 'no']],
        "Kidney disease or decreased kidney function" => ["radio" => ['yes', 'no']],
        "Frequent blood donations" => ["radio" => ['yes', 'no']],
        "Non-cancerous testicular or prostate surgery" => ["radio" => ['yes', 'no']],
        "Severe snoring" => ["radio" => ['yes', 'no']],
        "Taking medicine for high cholesterol" => ["radio" => ['yes', 'no']],
    ],
    "Birth Control Method" => [
        "planning pregnancy in the next year" => "checkbox",
        "Depend on partner’s contraception" => "checkbox",
        "Vasectomy" => "checkbox",
        "Condoms" => "checkbox",
        "Other" => "text"
    ],
    "Activity Level" => [
        "Low – sedentary" => "checkbox",
        "Moderate – walk/jog/workout infrequently" => "checkbox",
        "Average – walk/jog/workout 1 to 3 times per week" => "checkbox",
        "High – walk/jog/workout regularly 4+ times per week" => "checkbox"
    ],
    "SOCIAL HISTORY" => [
        "Tobacco Use" => ["radio" => ["yes", "no", "quit"]],
        "Alcohol Use" => ["radio" => ["yes", "no", "quit"]],
        "Alcohol Use" => ["radio" => ["yes", "no", "quit"]],
        "Marital Status" => ["radio" => ["single", "married", "separated", "domestic partner", "others"]],
        "Sexually Active" => ["radio" => ["yes", "no", "not currently"]],
        "Current partner is" => ["radio" => ["yes", "no", "quit"]],
        "Birth control method (if applicable)" => "text",
        "Retired?" => ["radio" => ["yes", "no"]],
        "Current or Past Occupation" => "text",
        "Current or Past Occupation" => "text"
    ],
    "ALLERGIES" => [
        "MEDICATION ALLERGIES / INTOLERANCES" => "textarea",
        "Have you ever had any issues with local anesthesia?" => ["radio" => ['yes', 'no']],
        "Do you have a latex allergy?" => ["radio" => ['yes', 'no']],
        "Do you have a latex allergy?" => "text",
        "Current hormone replacement? if yes what?" => "text",
        "Past hormone replacement therapy" => "text"
    ],
    "MEDICATIONS" => [
        "CURRENT MEDICATIONS" => 'textarea'
    ],
    "Family history" => [
        "Heart disease" => ["radio" => ['yes', 'no']],
        "Diabetes" => ["radio" => ['yes', 'no']],
        "Osteoporosis" => ["radio" => ['yes', 'no']],
        "Alzheimer’s/dementia" => ["radio" => ['yes', 'no']],
        "Breast cancer" => ["radio" => ['yes', 'no']],
        "Other" => "text"
    ],
    "HEALTH ASSESSMENT SYMPTOMS" => [
        "Sweating (night sweats or excessive sweating)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Sleep problems (difficulty falling asleep, sleeping through the night or waking up too early)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Increased need for sleep or falls asleep easily after a meal" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Depressive mood (feeling down, sad, lack of drive)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Irritability (mood swings, feeling aggressive, angers easily)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Anxiety (inner restlessness, feeling panicked, feeling nervous, inner tension)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Physical exhaustion (general decrease in muscle strength or endurance, decrease in work performance, fatigue, lack of energy, stamina or motivation)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Sexual problems (change in sexual desire or in sexual performance)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Bladder problems (difficulty in urinating, increased need to urinate)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Erectile changes (weaker erections, loss of morning erections)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Joint and muscular symptoms (joint pain or swelling, muscle weakness, poor recovery after exercise)" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Difficulties with memory" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Problems with thinking, concentrating or reasoning" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Difficulty learning new things" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Trouble thinking of the right word to describe persons, places or things when speaking" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Increase in frequency or intensity of headaches/migraines" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Rapid hair loss or thinning" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Feel cold all the time or have cold hands or feet" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Weight gain, increased belly fat, or difficulty losing weight despite diet and exercise" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Infrequent or absent ejaculations" => ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
        "Difficulties with memory" =>  ["radio" => ['none', 'mild', 'moderate', 'severe', 'very severe']],
    ]
];
