[
    {
        "id": "a9b13580-6bc5-4a7b-a78b-144e1137b90e",
        "scriptName": "COLLAPSE AND FETCH GENERATED",
        "findRegex": "/(\\[|<)(Stomach|Intestines|Mouth)_Reference(]|>)(.*)\\1\\/\\2_Reference\\3/gsmi",
        "replaceString": "<details class=\"collapsible\"><summary>GENERATED $2</summary>{{match}}</details>\n{{.$2 = $4}}\n{{.$2Observed = - $2}}\n{{.AnyObserved = true}}",
        "trimStrings": [],
        "placement": [
            2
        ],
        "disabled": false,
        "markdownOnly": true,
        "promptOnly": false,
        "runOnEdit": true,
        "substituteRegex": 0,
        "minDepth": null,
        "maxDepth": null
    },
    {
        "id": "cf252202-6242-41ba-a7ba-c684510f5e1f",
        "scriptName": "SETUP",
        "findRegex": "{{if .FRAMEWORKCONFIRM}}/<setup>.*<\\/setup>/imsg{{else}}/(?<=<setup>[\\s\\S]*?)^(GASTROTYPE|SUBJECT|SCALE|INGESTION|PROCESSING|EXPULSION|RECTUM)[\\s:]+([\\s\\S]*?)(?=\\s*^(?:GASTROTYPE|SUBJECT|SCALE|INGESTION|PROCESSING|EXPULSION|RECTUM|<\\/setup>))(?=[\\s\\S]*?<\\/setup>)/gism{{/if}}",
        "replaceString": "{{if .FRAMEWORKCONFIRM}}\n{{trim}}\n{{else}}\n{{.$1 = $2}}{{if .SUBJECT}}{{if .GASTROTYPE}}{{if .SCALE}}{{if .INGESTION}}{{if .PROCESSING}}{{if .EXPULSION}}{{if .RECTUM}}{{.FRAMEWORKCONFIRM = Framework created for {{.SUBJECT}}!}}{{/if}}{{/if}}{{/if}}{{/if}}{{/if}}{{/if}}{{/if}}\n{{/if}}",
        "trimStrings": [],
        "placement": [
            1,
            2
        ],
        "disabled": false,
        "markdownOnly": false,
        "promptOnly": true,
        "runOnEdit": true,
        "substituteRegex": 1,
        "minDepth": null,
        "maxDepth": null
    },
    {
        "id": "1f49f91e-bd71-4188-bfa8-01a0f0bae181",
        "scriptName": "SNAPSHOT2",
        "findRegex": "/(?<=<Simulation>[\\s\\S]*?)^(DATE|PROSPECTS|CONTENTS)[\\s:]+([\\s\\S]*?)(?=\\s*^(?:DATE|PROSPECTS|CONTENTS|<\\/Simulation>))(?=[\\s\\S]*?<\\/Simulation>)/gmi",
        "replaceString": "{{match}}{{.$1 = $2}}\n{{if .DATE}}\n{{if .PROSPECTS}}\n{{.Mes = <snapshot>\nTHE FOLLOWING IS A SNAPSHOT OF {{.SUBJECT}}'S DIGESTIVE SYSTEM, TAKEN ON {{.DATE}}\nProspects: {{.PROSPECTS}}\n\nContents: {{.CONTENTS}}\n</snapshot>}}\n{{/if}}\n{{/if}}",
        "trimStrings": [],
        "placement": [
            2
        ],
        "disabled": false,
        "markdownOnly": true,
        "promptOnly": false,
        "runOnEdit": true,
        "substituteRegex": 1,
        "minDepth": null,
        "maxDepth": null
    },
    {
        "id": "4a7a503d-2810-4b8f-b6d9-98959083d1a2",
        "scriptName": "COLLAPSE SIM/SPATIAL/DECISION",
        "findRegex": "/(\\[|<)(Simulation|Spatial|decision)(]|>)([\\s\\S]*?)\\1\\/\\2\\3/igm",
        "replaceString": "<details class=\"collapsible\"><summary>$2</summary>\n$4\n</details>",
        "trimStrings": [],
        "placement": [
            2
        ],
        "disabled": false,
        "markdownOnly": true,
        "promptOnly": false,
        "runOnEdit": true,
        "substituteRegex": 0,
        "minDepth": null,
        "maxDepth": null
    },
    {
        "id": "32a7d11a-e28d-4e0e-93c3-7080520858d2",
        "scriptName": "FIND DECISION",
        "findRegex": "/<decision\\b[^>]*>(?:(?=[\\s\\S]*?(?:^|\\r?\\n)[ \\t]*(?:(?:DECISION|ACTION):?[ \\t]*)?\\[?\\b(Stomach|Mouth|Intestines|None)\\b\\]?)|)(?:(?=[\\s\\S]*?(?:^|\\r?\\n)[ \\t]*.*\\b(YES|NO)\\b)|)(?:(?=[\\s\\S]*?(?:^|\\r?\\n)[ \\t]*SPATIAL\\b:?[ \\t]*([\\s\\S]*?)(?=\\s*(?:^|\\r?\\n)[ \\t]*(?:(?:DECISION|ACTION)\\b|Stomach|Mouth|Intestines|None|YES|NO|SPATIAL|<\\/decision>)))|)[\\s\\S]*?<\\/decision>/gi",
        "replaceString": "{{match}}{{.DECISION = $1}}{{.YN = $2}}{{.ANALYSIS = $3}}",
        "trimStrings": [],
        "placement": [
            1,
            2
        ],
        "disabled": false,
        "markdownOnly": true,
        "promptOnly": true,
        "runOnEdit": true,
        "substituteRegex": 1,
        "minDepth": null,
        "maxDepth": null
    },
    {
        "id": "958d2b31-ae53-4133-9c42-f6023bf4db8c",
        "scriptName": "DELETE DECISION",
        "findRegex": "/(\\[|<)(simulation|spatial|observed|decision|setup|details)(?:.*?)(]|>)([\\s\\S]*?)\\1\\/\\2\\3/gis",
        "replaceString": "",
        "trimStrings": [],
        "placement": [
            1,
            2
        ],
        "disabled": false,
        "markdownOnly": false,
        "promptOnly": true,
        "runOnEdit": true,
        "substituteRegex": 0,
        "minDepth": null,
        "maxDepth": null
    }
]