Selaa lähdekoodia

Note sections - templates support [WIP #5]

Vijayakrishnan Krishnan 4 vuotta sitten
vanhempi
commit
4a85e0343f

+ 19 - 11
resources/views/app/patient/note/dashboard.blade.php

@@ -248,11 +248,16 @@
                         }
                         echo '</div>';
                     }
-                    else if(isset($template->type) && $template->type === 'text') {
+                    else if(isset($template->type)) {
                         echo '<i class="fa fa-chevron-right has-children"></i>';
-                        echo '<div class="note-template-children">' .
-                                '<textarea class="form-control form-control-sm"></textarea>' .
-                            '</div>';
+                        echo '<div class="note-template-children">';
+                        if($template->type === 'alpha') {
+                            echo '<textarea class="form-control form-control-sm"></textarea>';
+                        }
+                        else {
+                            echo '<input type="' . $template->type . '" class="form-control form-control-sm">';
+                        }
+                        echo '</div>';
                     }
                     echo '</div>';
                 }
@@ -270,7 +275,7 @@
                                 '<button class="btn btn-sm btn-default bg-light border text-secondary border-secondary note-template-close-trigger">Close</button>' .
                             '</div>' .
                         '</div>';
-                    foreach ($templates as $template) {
+                    foreach ($templates->templates as $template) {
                         _renderNoteTemplate($template, true);
                     }
                     echo '</div>';
@@ -541,7 +546,7 @@
                             $('.note-template-children').hide();
                             $(this).parents('.note-template-children').show();
                             item.find('>.note-template-children').show()
-                                .find('textarea').first().focus();
+                                .find('>textarea,>input[type="number"],>input[type="date"]').first().focus();
                             return false;
                         }
 
@@ -558,7 +563,7 @@
                         if(isChecked) {
                             item.find('>.note-template-children')
                                 .show()
-                                .find('textarea')
+                                .find('>textarea,>input[type="number"],>input[type="date"]')
                                 .first().focus();
                         }
 
@@ -579,9 +584,9 @@
                         return false;
                     });
 
-                $('.note-template-item textarea')
-                    .off('input paste')
-                    .on('input paste', function() {
+                $('.note-template-item textarea, .note-template-item input[type="number"], .note-template-item input[type="date"]')
+                    .off('input paste change')
+                    .on('input paste change', function() {
                         generateTemplateOutput();
                     });
 
@@ -591,7 +596,10 @@
                 let template = _node.attr('template'),
                     value = template;
                 if(value.indexOf('{text}') !== -1) {
-                    value = value.replace('{text}', _node.find('>.note-template-children>textarea').first().val());
+                    value = value.replace('{text}',
+                        _node
+                            .find('>.note-template-children')
+                                .find('>textarea,>input[type="number"],>input[type="date"]').first().val());
                 }
                 else if(value.indexOf('{children}') !== -1) {
                     let values = [];

+ 1016 - 62
storage/sections/subjective/templates.json

@@ -1,62 +1,1016 @@
-[
-	{
-		"text": "Reason for depression",
-		"template": "Reasons for depression are {children}",
-		"children": [
-			{
-				"text": "Weight loss",
-                "template": "Loss of weight!"
-			},
-			{
-				"text": "Mood swings"
-			},
-			{
-				"text": "Anger issues"
-			},
-			{
-				"text": "Headache",
-				"type": "plus-minus"
-			},
-			{
-				"text": "Other (specify)",
-                "template" : "{text}",
-                "type": "text"
-            }
-		]
-	},
-
-	{
-		"text": "Reason for whatever else",
-		"template": "Reason for whatever else - {children}",
-		"children": [
-			{
-				"text": "Sleeplessness"
-			},
-			{
-				"text": "Fatigues"
-			},
-			{
-				"text": "Other types",
-				"template": "Other issues - {children}",
-				"children": [
-					{
-						"text": "Mood swings"
-					},
-					{
-						"text": "Anger issues"
-					},
-					{
-						"text": "Something else",
-						"type": "plus-minus"
-					},
-					{
-						"text": "Other (specify)",
-                        "template" : "{text}",
-                        "type": "text"
-					}
-				]
-			}
-		]
-	}
-
-]
+{
+    "section": "Subjective",
+    "templateSet": "Abdominal Pain, Adult",
+    "templates": [
+        {
+            "text": "Reason for visit",
+            "template": "Patient presents for {children}.",
+            "children": [
+                {
+                    "text": "new onset symptom evaluation",
+                    "template": "evaluation of new onset symptoms"
+                },
+                {
+                    "text": "initial evaluation of abdominal pain",
+                    "template": "initial evaluation of abdominal pain"
+                },
+                {
+                    "text": "follow-up abdominal pain evaluation",
+                    "template": "follow-up abdominal pain evaluation"
+                },
+                {
+                    "text": "ongoing abdominal pain management",
+                    "template": "ongoing abdominal pain management"
+                },
+                {
+                    "text": "Visit reason (describe)",
+                    "template": "{text}",
+                    "type": "alpha"
+                }
+            ]
+        },
+        {
+            "text": "Onset\/Time course",
+            "template": "Condition {children}.",
+            "children": [
+                {
+                    "text": "acute onset (new condition)",
+                    "template": "is reported to have developed acutely"
+                },
+                {
+                    "text": "chronic and ongoing condition",
+                    "template": "is chronic and ongoing"
+                },
+                {
+                    "text": "acutely worse (chronic condition)",
+                    "template": "severity is reported to have acutely worsened"
+                },
+                {
+                    "text": "progressively worsened",
+                    "template": "is reported to have progressively worsened"
+                },
+                {
+                    "text": "intermittent presence of symptoms",
+                    "template": "symptoms are described as intermittently present"
+                },
+                {
+                    "text": "Duration (minutes)",
+                    "template": "is reported as having been present for {text} minutes",
+                    "type": "number"
+                },
+                {
+                    "text": "Duration (hours)",
+                    "template": "is reported as having been present for {text} hours",
+                    "type": "number"
+                },
+                {
+                    "text": "Duration (days)",
+                    "template": "is reported as having been present for {text} days",
+                    "type": "number"
+                },
+                {
+                    "text": "Duration (weeks)",
+                    "template": "is reported as having been present for {text} weeks",
+                    "type": "number"
+                },
+                {
+                    "text": "Duration (months)",
+                    "template": "is reported as having been present for {text} months",
+                    "type": "number"
+                },
+                {
+                    "text": "Duration (years)",
+                    "template": "is reported as having been present for {text} years",
+                    "type": "number"
+                },
+                {
+                    "text": "Duration (describe)",
+                    "template": "is reported as having been present for {text}",
+                    "type": "alpha"
+                }
+            ]
+        },
+        {
+            "text": "Abdominal pain detail",
+            "template": "Abdominal pain is present and described as {children}.",
+            "children": [
+                {
+                    "text": "Localization",
+                    "template": "affecting {children}",
+                    "children": [
+                        {
+                            "text": "RUQ",
+                            "template": "the RUQ of the abdomen"
+                        },
+                        {
+                            "text": "LUQ",
+                            "template": "the LUQ of the abdomen"
+                        },
+                        {
+                            "text": "upper abdomen",
+                            "template": "upper abdomen"
+                        },
+                        {
+                            "text": "midepigastric area",
+                            "template": "the midepigastric area"
+                        },
+                        {
+                            "text": "periumbilical area",
+                            "template": "the periumbilical area"
+                        },
+                        {
+                            "text": "R flank",
+                            "template": "the R flank"
+                        },
+                        {
+                            "text": "L flank",
+                            "template": "the L flank"
+                        },
+                        {
+                            "text": "RLQ",
+                            "template": "the RLQ of the abdomen"
+                        },
+                        {
+                            "text": "LLQ",
+                            "template": "the LLQ of the abdomen"
+                        },
+                        {
+                            "text": "lower abdomen",
+                            "template": "lower abdomen"
+                        },
+                        {
+                            "text": "suprapubic area",
+                            "template": "the suprapubic area"
+                        },
+                        {
+                            "text": "no specific area of the abdomen",
+                            "template": "no specific area of the abdomen"
+                        }
+                    ]
+                },
+                {
+                    "text": "Quality",
+                    "template": "having {children} quality",
+                    "children": [
+                        {
+                            "text": "pressure",
+                            "template": "a pressure-like"
+                        },
+                        {
+                            "text": "sharp",
+                            "template": "a sharp"
+                        },
+                        {
+                            "text": "dull",
+                            "template": "a dull"
+                        },
+                        {
+                            "text": "aching",
+                            "template": "an aching"
+                        },
+                        {
+                            "text": "cramping",
+                            "template": "a cramping"
+                        },
+                        {
+                            "text": "spasm",
+                            "template": "a spasm-like"
+                        }
+                    ]
+                },
+                {
+                    "text": "Radiation",
+                    "template": "radiating {children}",
+                    "children": [
+                        {
+                            "text": "nonradiating",
+                            "template": "pattern is not present"
+                        },
+                        {
+                            "text": "L arm",
+                            "template": "to the left arm"
+                        },
+                        {
+                            "text": "R arm",
+                            "template": "to the right arm"
+                        },
+                        {
+                            "text": "back",
+                            "template": "to the back"
+                        },
+                        {
+                            "text": "R scapula",
+                            "template": "to the right scapula"
+                        },
+                        {
+                            "text": "L scapula",
+                            "template": "to the left scapula"
+                        },
+                        {
+                            "text": "R groin",
+                            "template": "to the R groin"
+                        },
+                        {
+                            "text": "L groin",
+                            "template": "to the L groin"
+                        }
+                    ]
+                },
+                {
+                    "text": "Severity (0-10, 10=worst)",
+                    "template": "having a severity rated as {children}",
+                    "children": [
+                        {
+                            "text": "mild",
+                            "template": "mild"
+                        },
+                        {
+                            "text": "moderate",
+                            "template": "moderate"
+                        },
+                        {
+                            "text": "severe",
+                            "template": "severe"
+                        },
+                        {
+                            "text": "0\/10 (no pain)",
+                            "template": "0\/10 (no pain)"
+                        },
+                        {
+                            "text": "+1\/10",
+                            "template": "+1\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+2\/10",
+                            "template": "+2\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+3\/10",
+                            "template": "+3\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+4\/10",
+                            "template": "+4\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+5\/10",
+                            "template": "+5\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+6\/10",
+                            "template": "+6\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+7\/10",
+                            "template": "+7\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+8\/10",
+                            "template": "+8\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+9\/10",
+                            "template": "+9\/10 (10=worst)"
+                        },
+                        {
+                            "text": "+10\/10",
+                            "template": "+10\/10 (10=worst)"
+                        }
+                    ]
+                },
+                {
+                    "text": "Timing: constant, intermittent",
+                    "template": "being {children}",
+                    "children": [
+                        {
+                            "text": "constantly present",
+                            "template": "constantly present"
+                        },
+                        {
+                            "text": "intermittently present",
+                            "template": "intermittently present"
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "text": "Pertinent positives\/negatives",
+            "template": "Pertinent positive\/negative symptoms include {children}.",
+            "children": [
+                {
+                    "text": "able to tolerate fluids",
+                    "template": "able to tolerate fluids"
+                },
+                {
+                    "text": "able to tolerate food",
+                    "template": "able to tolerate food"
+                },
+                {
+                    "text": "anorexia",
+                    "template": "anorexia"
+                },
+                {
+                    "text": "weight loss",
+                    "template": "weight loss"
+                },
+                {
+                    "text": "weight gain",
+                    "template": "weight gain"
+                },
+                {
+                    "text": "hemetemesis",
+                    "template": "hemetemesis"
+                },
+                {
+                    "text": "bilious vomiting",
+                    "template": "bilious vomiting"
+                },
+                {
+                    "text": "projectile vomiting",
+                    "template": "projectile vomiting"
+                },
+                {
+                    "text": "dysphagia",
+                    "template": "dysphagia"
+                },
+                {
+                    "text": "bloating",
+                    "template": "bloating"
+                },
+                {
+                    "text": "flatulence",
+                    "template": "flatulence"
+                },
+                {
+                    "text": "reflux",
+                    "template": "reflux"
+                },
+                {
+                    "text": "blood in stool",
+                    "template": "blood in stool"
+                },
+                {
+                    "text": "melena",
+                    "template": "melena"
+                },
+                {
+                    "text": "diarrhea",
+                    "template": "diarrhea"
+                },
+                {
+                    "text": "constipation",
+                    "template": "constipation"
+                },
+                {
+                    "text": "chest pain",
+                    "template": "chest pain"
+                },
+                {
+                    "text": "back pain",
+                    "template": "back pain"
+                },
+                {
+                    "text": "dysuria",
+                    "template": "dysuria"
+                },
+                {
+                    "text": "urinary frequency",
+                    "template": "urinary frequency"
+                },
+                {
+                    "text": "genital discharge",
+                    "template": "genital discharge"
+                },
+                {
+                    "text": "other pertinent sx (describe)",
+                    "template": "{text}",
+                    "type": "alpha"
+                }
+            ]
+        },
+        {
+            "text": "Exacerbating\/Alleviating factors",
+            "template": "Patient reports that {children}.",
+            "children": [
+                {
+                    "text": "Stress",
+                    "template": "stress {children}",
+                    "children": [
+                        {
+                            "text": "improves sx",
+                            "template": "improves sx"
+                        },
+                        {
+                            "text": "worsens sx",
+                            "template": "worsens sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "has no effect on sx"
+                        },
+                        {
+                            "text": "has not been observed",
+                            "template": "has not been observed"
+                        }
+                    ]
+                },
+                {
+                    "text": "Eating",
+                    "template": "eating {children}",
+                    "children": [
+                        {
+                            "text": "improves sx",
+                            "template": "improves sx"
+                        },
+                        {
+                            "text": "worsens sx",
+                            "template": "worsens sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "has no effect on sx"
+                        },
+                        {
+                            "text": "has not been observed",
+                            "template": "has not been observed"
+                        }
+                    ]
+                },
+                {
+                    "text": "Alcohol",
+                    "template": "alcohol {children}",
+                    "children": [
+                        {
+                            "text": "improves sx",
+                            "template": "improves sx"
+                        },
+                        {
+                            "text": "worsens sx",
+                            "template": "worsens sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "has no effect on sx"
+                        },
+                        {
+                            "text": "has not been consumed",
+                            "template": "has not been consumed"
+                        }
+                    ]
+                },
+                {
+                    "text": "Antidiarrheal agents",
+                    "template": "antidiarrheal agents {children}",
+                    "children": [
+                        {
+                            "text": "improve sx",
+                            "template": "improve sx"
+                        },
+                        {
+                            "text": "worsen sx",
+                            "template": "worsen sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "have no effect on sx"
+                        },
+                        {
+                            "text": "have not been tried",
+                            "template": "have not been tried"
+                        }
+                    ]
+                },
+                {
+                    "text": "NSAIDs",
+                    "template": "NSAIDs {children}",
+                    "children": [
+                        {
+                            "text": "improve sx",
+                            "template": "improve sx"
+                        },
+                        {
+                            "text": "worsen sx",
+                            "template": "worsen sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "have no effect on sx"
+                        },
+                        {
+                            "text": "have not been tried",
+                            "template": "have not been tried"
+                        }
+                    ]
+                },
+                {
+                    "text": "Laxatives",
+                    "template": "laxatives {children}",
+                    "children": [
+                        {
+                            "text": "improve sx",
+                            "template": "improve sx"
+                        },
+                        {
+                            "text": "worsen sx",
+                            "template": "worsen sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "have no effect on sx"
+                        },
+                        {
+                            "text": "have not been tried",
+                            "template": "have not been tried"
+                        }
+                    ]
+                },
+                {
+                    "text": "Antibiotics",
+                    "template": "antibiotics {children}",
+                    "children": [
+                        {
+                            "text": "improve sx",
+                            "template": "improve sx"
+                        },
+                        {
+                            "text": "worsen sx",
+                            "template": "worsen sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "have no effect on sx"
+                        },
+                        {
+                            "text": "have not been tried",
+                            "template": "have not been tried"
+                        }
+                    ]
+                },
+                {
+                    "text": "Iron supplements",
+                    "template": "iron supplements {children}",
+                    "children": [
+                        {
+                            "text": "improve sx",
+                            "template": "improve sx"
+                        },
+                        {
+                            "text": "worsen sx",
+                            "template": "worsen sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "have no effect on sx"
+                        },
+                        {
+                            "text": "have not been tried",
+                            "template": "have not been tried"
+                        }
+                    ]
+                },
+                {
+                    "text": "Defecation",
+                    "template": "defecation {children}",
+                    "children": [
+                        {
+                            "text": "improves sx",
+                            "template": "improves sx"
+                        },
+                        {
+                            "text": "worsens sx",
+                            "template": "worsens sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "has no effect on sx"
+                        },
+                        {
+                            "text": "has not been observed",
+                            "template": "has not been observed"
+                        }
+                    ]
+                },
+                {
+                    "text": "Antiacids",
+                    "template": "antiacids {children}",
+                    "children": [
+                        {
+                            "text": "improve sx",
+                            "template": "improve sx"
+                        },
+                        {
+                            "text": "worsen sx",
+                            "template": "worsen sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "have no effect on sx"
+                        },
+                        {
+                            "text": "have not been tried",
+                            "template": "have not been tried"
+                        }
+                    ]
+                },
+                {
+                    "text": "H2 blockers",
+                    "template": "H2 blockers {children}",
+                    "children": [
+                        {
+                            "text": "improve sx",
+                            "template": "improve sx"
+                        },
+                        {
+                            "text": "worsen sx",
+                            "template": "worsen sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "have no effect on sx"
+                        },
+                        {
+                            "text": "have not been tried",
+                            "template": "have not been tried"
+                        }
+                    ]
+                },
+                {
+                    "text": "PPIs",
+                    "template": "PPIs {children}",
+                    "children": [
+                        {
+                            "text": "improve sx",
+                            "template": "improve sx"
+                        },
+                        {
+                            "text": "worsen sx",
+                            "template": "worsen sx"
+                        },
+                        {
+                            "text": "no effect on sx",
+                            "template": "have no effect on sx"
+                        },
+                        {
+                            "text": "have not been tried",
+                            "template": "have not been tried"
+                        }
+                    ]
+                },
+                {
+                    "text": "other contributing factors (describe)",
+                    "template": "{text}",
+                    "type": "alpha"
+                }
+            ]
+        },
+        {
+            "text": "Tx response\/Side effects",
+            "template": "Treatment effects: {children}.",
+            "children": [
+                {
+                    "text": "adherent to current tx",
+                    "template": "adherent to current tx"
+                },
+                {
+                    "text": "nonadherent to current tx",
+                    "template": "nonadherent to current tx"
+                },
+                {
+                    "text": "Reasons for nonadherence",
+                    "template": "reasons for nonadherence include {children}",
+                    "children": [
+                        {
+                            "text": "side effects",
+                            "template": "side effects"
+                        },
+                        {
+                            "text": "nausea",
+                            "template": "nausea"
+                        },
+                        {
+                            "text": "stomach upset",
+                            "template": "stomach upset"
+                        },
+                        {
+                            "text": "diarrhea",
+                            "template": "diarrhea"
+                        },
+                        {
+                            "text": "swallowing difficulty",
+                            "template": "difficulty swallowing"
+                        },
+                        {
+                            "text": "cost",
+                            "template": "cost"
+                        },
+                        {
+                            "text": "difficulty scheduling",
+                            "template": "difficulty scheduling"
+                        },
+                        {
+                            "text": "forgetfulness",
+                            "template": "forgetfulness"
+                        },
+                        {
+                            "text": "no perceived need for tx",
+                            "template": "no perceived need for treatment"
+                        }
+                    ]
+                },
+                {
+                    "text": "Nonadherence (describe)",
+                    "template": "nonadherent to tx ({text})",
+                    "type": "alpha"
+                },
+                {
+                    "text": "Treatment response",
+                    "template": "{children}",
+                    "children": [
+                        {
+                            "text": "resolved with treatment",
+                            "template": "resolved with treatment"
+                        },
+                        {
+                            "text": "well-controlled on treatment",
+                            "template": "well-controlled on treatment"
+                        },
+                        {
+                            "text": "improving on treatment",
+                            "template": "improving on treatment"
+                        },
+                        {
+                            "text": "stable on treatment",
+                            "template": "stable on treatment"
+                        },
+                        {
+                            "text": "unchanged on treatment",
+                            "template": "unchanged on treatment"
+                        },
+                        {
+                            "text": "variable response to treatment",
+                            "template": "variable response to treatment"
+                        },
+                        {
+                            "text": "suboptimally-controlled on treatment",
+                            "template": "suboptimally-controlled on treatment"
+                        },
+                        {
+                            "text": "poorly-controlled on treatment",
+                            "template": "poorly-controlled on treatment"
+                        },
+                        {
+                            "text": "worsening on treatment",
+                            "template": "worsening on treatment"
+                        },
+                        {
+                            "text": "exacerbated despite treatment",
+                            "template": "exacerbated despite treatment"
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "text": "Medical Hx specific to visit",
+            "template": "Medical Hx includes {children}.",
+            "children": [
+                {
+                    "text": "diabetes type 1",
+                    "template": "diabetes type 1"
+                },
+                {
+                    "text": "diabetes type 2",
+                    "template": "diabetes type 2"
+                },
+                {
+                    "text": "migraine",
+                    "template": "migraine"
+                },
+                {
+                    "text": "nephrolithiasis",
+                    "template": "nephrolithiasis"
+                },
+                {
+                    "text": "C difficile infection",
+                    "template": "C difficile infection"
+                },
+                {
+                    "text": "inflammatory bowel disease",
+                    "template": "inflammatory bowel disease"
+                },
+                {
+                    "text": "irritable bowel disease",
+                    "template": "irritable bowel disease"
+                },
+                {
+                    "text": "s\/p appendectomy",
+                    "template": "s\/p appendectomy"
+                },
+                {
+                    "text": "s\/p cholecystectomy",
+                    "template": "s\/p cholecystectomy"
+                },
+                {
+                    "text": "Hx small bowel obstruction",
+                    "template": "Hx small bowel obstruction"
+                },
+                {
+                    "text": "Hx STD",
+                    "template": "Hx STD"
+                },
+                {
+                    "text": "other medical Hx (describe)",
+                    "template": "{text}",
+                    "type": "alpha"
+                }
+            ]
+        },
+        {
+            "text": "OB\/Gyn Hx specific to visit",
+            "template": "OB\/Gyn Hx includes: {children}.",
+            "children": [
+                {
+                    "text": "ovarian cyst",
+                    "template": "ovarian cyst"
+                },
+                {
+                    "text": "Hx STD",
+                    "template": "Hx STD"
+                },
+                {
+                    "text": "pregnant",
+                    "template": "pregnant"
+                },
+                {
+                    "text": "LMP (specify)",
+                    "template": "LMP: {text}",
+                    "type": "date"
+                },
+                {
+                    "text": "other relevant OB\/Gyn Hx",
+                    "template": "{text}",
+                    "type": "alpha"
+                }
+            ]
+        },
+        {
+            "text": "Lifestyle\/Environment factors",
+            "template": "Lifestyle\/Environmental factors include {children}.",
+            "children": [
+                {
+                    "text": "alcohol use",
+                    "template": "alcohol use"
+                },
+                {
+                    "text": "illicit drug use",
+                    "template": "illicit drug use"
+                },
+                {
+                    "text": "sexually active",
+                    "template": "sexually active"
+                },
+                {
+                    "text": "Food exposure (specify)",
+                    "template": "food exposures: (+) {text}",
+                    "type": "alpha"
+                },
+                {
+                    "text": "Ill contacts (describe)",
+                    "template": "ill contacts: (+) {text}",
+                    "type": "alpha"
+                },
+                {
+                    "text": "Recent travel (specify)",
+                    "template": "recent travel: (+) {text}",
+                    "type": "alpha"
+                },
+                {
+                    "text": "Pet\/Animal exposure (describe)",
+                    "template": "pet\/animal exposure: (+) {text}",
+                    "type": "alpha"
+                },
+                {
+                    "text": "Social stressors (describe)",
+                    "template": "social stressors: (+) {text}",
+                    "type": "alpha"
+                },
+                {
+                    "text": "other lifestyle\/exposure (specify)",
+                    "template": "{text}",
+                    "type": "alpha"
+                }
+            ]
+        },
+        {
+            "text": "Smoking status",
+            "template": "Smoking status: {children}.",
+            "children": [
+                {
+                    "text": "nonsmoker",
+                    "template": "nonsmoker"
+                },
+                {
+                    "text": "tobacco abuse",
+                    "template": "tobacco abuse"
+                },
+                {
+                    "text": "tobacco dependence",
+                    "template": "tobacco dependence"
+                },
+                {
+                    "text": "tobacco products used",
+                    "template": "tobacco products used include {children}",
+                    "children": [
+                        {
+                            "text": "cigarettes",
+                            "template": "cigarettes"
+                        },
+                        {
+                            "text": "cigars",
+                            "template": "cigars"
+                        },
+                        {
+                            "text": "pipes",
+                            "template": "pipes"
+                        },
+                        {
+                            "text": "water pipes",
+                            "template": "water pipes"
+                        },
+                        {
+                            "text": "chew",
+                            "template": "chew"
+                        },
+                        {
+                            "text": "snuff",
+                            "template": "snuff"
+                        }
+                    ]
+                },
+                {
+                    "text": "packs per day (specify)",
+                    "template": "{text} packs per day",
+                    "type": "number"
+                },
+                {
+                    "text": "age at smoking onset (specify)",
+                    "template": "started smoking at age {text}",
+                    "type": "number"
+                },
+                {
+                    "text": "smoking duration (months)",
+                    "template": "smoking duration is {text} months",
+                    "type": "number"
+                },
+                {
+                    "text": "smoking duration (years)",
+                    "template": "smoking duration is {text} years",
+                    "type": "number"
+                },
+                {
+                    "text": "tobacco withdrawal",
+                    "template": "tobacco withdrawal"
+                },
+                {
+                    "text": "tobacco remission",
+                    "template": "tobacco remission"
+                },
+                {
+                    "text": "hx of nicotine dependence (describe)",
+                    "template": "{text}",
+                    "type": "alpha"
+                },
+                {
+                    "text": "second hand smoke type\/exposure (describe)",
+                    "template": "{text}",
+                    "type": "alpha"
+                },
+                {
+                    "text": "other (describe)",
+                    "template": "{text}",
+                    "type": "alpha"
+                }
+            ]
+        },
+        {
+            "text": "Family Hx specific to visit",
+            "template": "Family history includes {children}.",
+            "children": [
+                {
+                    "text": "colon cancer",
+                    "template": "colon cancer"
+                },
+                {
+                    "text": "inflammatory bowel disease",
+                    "template": "inflammatory bowel disease"
+                },
+                {
+                    "text": "other family Hx (describe)",
+                    "template": "{text}",
+                    "type": "alpha"
+                }
+            ]
+        }
+    ]
+}