Browse Source

Dynamic loading of template sets

Vijayakrishnan Krishnan 4 years ago
parent
commit
ae6e5df25c

+ 3 - 0
public/css/style.css

@@ -554,3 +554,6 @@ input.search_field, textarea.search_field {
     padding: 0 0.22rem;
     font-size: 12px !important;
 }
+.ql-editor .note-template-output-line {
+    white-space: normal;
+}

+ 1 - 2
resources/views/app/patient/note/_templates-index.blade.php

@@ -24,13 +24,12 @@ if(isset($templateIndex->{$sectionInternalName})) {
             </div>
             <div class="p-1 border border-bottom">
                 <select class="form-control form-control-sm note-template-set-chooser" data-section="{{$sectionInternalName}}">
-                    <option value="">Templates</option>
                     @foreach($templateIndex->{$sectionInternalName} as $k => $templateSet)
                         <option value="{{$k}}" {{$k === $templateName ? 'selected' : ''}}>{{$templateSet->name}}</option>
                     @endforeach
                 </select>
             </div>
-            @include('app/patient/note/_template')
+            {{--@include('app/patient/note/_template')--}}
         </div>
     </span>
 <?php

+ 17 - 9
resources/views/app/patient/note/dashboard.blade.php

@@ -458,6 +458,7 @@
                         container.find('input[type="checkbox"]').prop('checked', false);
                         container.find('.note-template-output-text').empty();
                         container.show();
+                        loadTemplateSet(container.find('.note-template-set-chooser'));
                         return false;
                     });
 
@@ -561,20 +562,27 @@
                     });
 
                 $(document)
-                    .off('click.note-template-set-chooser', '.note-template-set-chooser')
-                    .on('click.note-template-set-chooser', '.note-template-set-chooser', function() {
-                        if(!$(this).val()) return false;
-                        $.get('/note-template-set/' + $(this).attr('data-section') + '/' + $(this).val(), function(_html) {
-                             $('.note-template-container:visible>.note-template-item').remove();
-                            $('.note-template-container:visible').append(_html);
-                        });
-                        return false;
+                    .off('change.note-template-set-chooser', '.note-template-set-chooser')
+                    .on('change.note-template-set-chooser', '.note-template-set-chooser', function() {
+                        return loadTemplateSet($(this));
                     });
 
             }
 
+            function loadTemplateSet(_chooser) {
+                if(!_chooser.val()) return false;
+                let container = _chooser.closest('.note-template-container');
+                container.find('>.note-template-item').remove();
+                container.append('<p class="please-wait my-2 text-secondary text-center">Please wait ...</p>');
+                $.get('/note-template-set/' + _chooser.attr('data-section') + '/' + _chooser.val(), function(_html) {
+                    container.find('.please-wait').remove();
+                    container.append(_html);
+                });
+                return false;
+            }
+
             function generateOutputForNode(_node) {
-                let template = (_node.attr('prefix') ? _node.attr('prefix') + ' ' : '') + _node.attr('template'),
+                let template = (_node.attr('prefix') ? _node.attr('prefix') : '') + _node.attr('template'),
                     value = template;
                 if(value.indexOf('{text}') !== -1) {
                     value = value.replace('{text}',

+ 0 - 1060
storage/sections/subjective/templates.json

@@ -1,1060 +0,0 @@
-{
-    "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",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "able to tolerate food",
-                    "template": "able to tolerate food",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "anorexia",
-                    "template": "anorexia",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "weight loss",
-                    "template": "weight loss",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "weight gain",
-                    "template": "weight gain",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "hemetemesis",
-                    "template": "hemetemesis",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "bilious vomiting",
-                    "template": "bilious vomiting",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "projectile vomiting",
-                    "template": "projectile vomiting",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "dysphagia",
-                    "template": "dysphagia",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "bloating",
-                    "template": "bloating",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "flatulence",
-                    "template": "flatulence",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "reflux",
-                    "template": "reflux",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "blood in stool",
-                    "template": "blood in stool",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "melena",
-                    "template": "melena",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "diarrhea",
-                    "template": "diarrhea",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "constipation",
-                    "template": "constipation",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "chest pain",
-                    "template": "chest pain",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "back pain",
-                    "template": "back pain",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "dysuria",
-                    "template": "dysuria",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "urinary frequency",
-                    "template": "urinary frequency",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "genital discharge",
-                    "template": "genital discharge",
-                    "type": "plus-minus"
-                },
-                {
-                    "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",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "diabetes type 2",
-                    "template": "diabetes type 2",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "migraine",
-                    "template": "migraine",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "nephrolithiasis",
-                    "template": "nephrolithiasis",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "C difficile infection",
-                    "template": "C difficile infection",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "inflammatory bowel disease",
-                    "template": "inflammatory bowel disease",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "irritable bowel disease",
-                    "template": "irritable bowel disease",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "s\/p appendectomy",
-                    "template": "s\/p appendectomy",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "s\/p cholecystectomy",
-                    "template": "s\/p cholecystectomy",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "Hx small bowel obstruction",
-                    "template": "Hx small bowel obstruction",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "Hx STD",
-                    "template": "Hx STD",
-                    "type": "plus-minus"
-                },
-                {
-                    "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",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "Hx STD",
-                    "template": "Hx STD",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "pregnant",
-                    "template": "pregnant",
-                    "type": "plus-minus"
-                },
-                {
-                    "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",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "illicit drug use",
-                    "template": "illicit drug use",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "sexually active",
-                    "template": "sexually active",
-                    "type": "plus-minus"
-                },
-                {
-                    "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",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "tobacco dependence",
-                    "template": "tobacco dependence",
-                    "type": "plus-minus"
-                },
-                {
-                    "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",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "tobacco remission",
-                    "template": "tobacco remission",
-                    "type": "plus-minus"
-                },
-                {
-                    "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",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "inflammatory bowel disease",
-                    "template": "inflammatory bowel disease",
-                    "type": "plus-minus"
-                },
-                {
-                    "text": "other family Hx (describe)",
-                    "template": "{text}",
-                    "type": "alpha"
-                }
-            ]
-        }
-    ]
-}