C19 Immunization eform - as a regular json file

=================================================

{ "_id": "60e39019fe193cf38a1044d9", "type": "form", "tags": [ "publish" ], "owner": "60dcf29ae886a997f0ff54c4", "components": [ { "label": "Columns", "columns": [ { "components": [ { "label": "Service Delivery Location", "widget": "choicesjs", "description": "This is the location of the COVID-19 Immunization Clinic where the client received vaccine. If your SDL is not found, select the closest city/town.", "tableView": true, "dataSrc": "url", "data": { "url": "https://api.eforms.phsaehealth.ca/sdls.json", "headers": [ { "key": "", "value": "" } ] }, "valueProperty": "value", "selectThreshold": 0.3, "customOptions": { "searchResultLimit": 7 }, "validate": { "required": true }, "key": "serviceDeliveryLocation", "properties": { "class": "service.delivery.location", "questionnaireElement": "serviceDeliveryLocation", "settings": "coding" }, "type": "select", "input": true, "hideOnChildrenHidden": false, "disableLimit": false } ], "width": 8, "offset": 0, "push": 0, "pull": 0, "size": "md", "currentWidth": 8 }, { "components": [

      ],
      "width": 4,
      "offset": 0,
      "push": 0,
      "pull": 0,
      "size": "md",
      "currentWidth": 4
    }
  ],
  "key": "columns7",
  "type": "columns",
  "input": false,
  "tableView": false
},
{
  "title": "Client Demographics",
  "collapsible": false,
  "key": "clientDemographics",
  "properties": {
    "formioResource": "patientInformation",
    "fhirResource": "Patient"
  },
  "type": "panel",
  "label": "Client Demographics",
  "input": false,
  "tableView": false,
  "components": [
    {
      "label": "Patient Demographics",
      "tableView": false,
      "key": "patientDemographicsWell",
      "type": "well",
      "input": false,
      "components": [
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Last Name",
                  "tooltip": "Please include full legal name",
                  "tableView": true,
                  "validate": {
                    "required": true
                  },
                  "key": "patientNameFamily",
                  "properties": {
                    "class": "last.name",
                    "fhirElement": "Patient.name.where(use='official').family"
                  },
                  "overlay": {
                    "page": "1",
                    "left": "0",
                    "top": "0",
                    "width": "150",
                    "height": "20"
                  },
                  "type": "textfield",
                  "labelWidth": 30,
                  "labelMargin": 3,
                  "input": true,
                  "lockKey": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "First Name",
                  "tooltip": "Please include full legal name",
                  "tableView": true,
                  "validate": {
                    "required": true
                  },
                  "key": "patientNameGiven",
                  "properties": {
                    "class": "first.name",
                    "fhirElement": "Patient.name.where(use='official').given"
                  },
                  "overlay": {
                    "page": "1",
                    "left": "190",
                    "top": "0",
                    "width": "150",
                    "height": "20"
                  },
                  "type": "textfield",
                  "labelWidth": 30,
                  "labelMargin": 3,
                  "input": true,
                  "lockKey": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Middle Name",
                  "tableView": true,
                  "key": "patientNameGivenMiddle",
                  "properties": {
                    "class": "middle.name",
                    "fhirElement": "Patient.name.where(use='official').given[1]"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "BC PHN",
                  "tooltip": "BC Personal Health Number",
                  "inputMask": "9999999999",
                  "tableView": true,
                  "validate": {
                    "maxLength": 10,
                    "minLength": null
                  },
                  "key": "patientIdentifier",
                  "properties": {
                    "class": "phn",
                    "fhirElement": "Patient.identifier.where(system.endsWith('ca-bc-patient-healthcare-id')).value"
                  },
                  "type": "textfield",
                  "labelWidth": 30,
                  "labelMargin": 3,
                  "input": true,
                  "lockKey": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            }
          ],
          "hideLabel": true,
          "key": "columns11",
          "type": "columns",
          "tableView": false,
          "input": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Date of Birth",
                  "widget": {
                    "type": "calendar",
                    "altInput": true,
                    "allowInput": true,
                    "clickOpens": true,
                    "enableDate": true,
                    "enableTime": false,
                    "mode": "single",
                    "noCalendar": false,
                    "format": "yyyy-MM-dd",
                    "dateFormat": "yyyy-MM-dd",
                    "useLocaleSettings": false,
                    "hourIncrement": 1,
                    "minuteIncrement": 5,
                    "time_24hr": false,
                    "saveAs": "date",
                    "maxDate": "moment()",
                    "locale": "en"
                  },
                  "tableView": true,
                  "validate": {
                    "required": true
                  },
                  "key": "patientBirthDate",
                  "properties": {
                    "class": "birthDate",
                    "fhirElement": "Patient.birthDate"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Sex",
                  "optionsLabelPosition": "right",
                  "inline": true,
                  "tableView": true,
                  "values": [
                    {
                      "value": "male",
                      "label": "Male",
                      "shortcut": ""
                    },
                    {
                      "value": "female",
                      "label": "Female",
                      "shortcut": ""
                    },
                    {
                      "value": "undifferentiated",
                      "label": "Undifferentiated",
                      "shortcut": ""
                    },
                    {
                      "value": "unknown",
                      "label": "Unknown",
                      "shortcut": ""
                    }
                  ],
                  "validate": {
                    "required": true
                  },
                  "key": "patientGender",
                  "properties": {
                    "class": "gender",
                    "fhirElement": "Patient.gender"
                  },
                  "type": "radio",
                  "input": true,
                  "lockKey": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Home Phone Number",
                  "description": "Please confirm and update to most recent phone number",
                  "inputMask": "999-999-9999",
                  "tableView": true,
                  "key": "patientPrimaryPhoneNumber",
                  "properties": {
                    "class": "phone",
                    "fhirElement": "Patient.telecom.where(use='home' and system='phone').value"
                  },
                  "overlay": {
                    "page": "1",
                    "left": "760",
                    "top": "0",
                    "width": "150",
                    "height": "20"
                  },
                  "type": "phoneNumber",
                  "input": true,
                  "lockKey": true,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "Phone Number is most recent (hidden)",
                  "tooltip": "Select checkbox if phone number is most recent",
                  "hidden": true,
                  "tableView": false,
                  "defaultValue": true,
                  "key": "phoneNumberValidated",
                  "type": "checkbox",
                  "input": true,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "Effective From Date (hidden)",
                  "format": "yyyy-MM-dd",
                  "hidden": true,
                  "tableView": false,
                  "enableMinDateInput": false,
                  "datePicker": {
                    "disableWeekends": false,
                    "disableWeekdays": false
                  },
                  "enableMaxDateInput": false,
                  "enableTime": false,
                  "timePicker": {
                    "showMeridian": false
                  },
                  "key": "phoneNumberEffectiveFromDate",
                  "properties": {
                    "class": "start.date",
                    "fhirElement": "Patient.telecom.period.start"
                  },
                  "logic": [
                    {
                      "name": "Set Effective From Date to Today",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "phoneNumberValidated",
                          "eq": "true"
                        }
                      },
                      "actions": [
                        {
                          "name": "Set to Today",
                          "type": "value",
                          "value": "var d = moment().format('YYYY-MM-DD');\nvalue = d;"
                        }
                      ]
                    },
                    {
                      "name": "Set Effective From Date to EMPI Date",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "phoneNumberValidated",
                          "eq": "false"
                        }
                      },
                      "actions": [
                        {
                          "name": "Set Date to EMPI Date",
                          "type": "value",
                          "value": "value = data.EMPIphoneNumberEffectiveFromDate"
                        }
                      ]
                    }
                  ],
                  "type": "datetime",
                  "input": true,
                  "widget": {
                    "type": "calendar",
                    "displayInTimezone": "viewer",
                    "locale": "en",
                    "useLocaleSettings": false,
                    "allowInput": true,
                    "mode": "single",
                    "enableTime": false,
                    "noCalendar": false,
                    "format": "yyyy-MM-dd",
                    "hourIncrement": 1,
                    "minuteIncrement": 1,
                    "time_24hr": true,
                    "minDate": null,
                    "disableWeekends": false,
                    "disableWeekdays": false,
                    "maxDate": null
                  },
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "EMPI Effective From Date (hidden)",
                  "format": "yyyy-MM-dd",
                  "hidden": true,
                  "tableView": false,
                  "enableMinDateInput": false,
                  "datePicker": {
                    "disableWeekends": false,
                    "disableWeekdays": false
                  },
                  "enableMaxDateInput": false,
                  "enableTime": false,
                  "timePicker": {
                    "showMeridian": false
                  },
                  "key": "EMPIphoneNumberEffectiveFromDate",
                  "type": "datetime",
                  "input": true,
                  "widget": {
                    "type": "calendar",
                    "displayInTimezone": "viewer",
                    "locale": "en",
                    "useLocaleSettings": false,
                    "allowInput": true,
                    "mode": "single",
                    "enableTime": false,
                    "noCalendar": false,
                    "format": "yyyy-MM-dd",
                    "hourIncrement": 1,
                    "minuteIncrement": 1,
                    "time_24hr": true,
                    "minDate": null,
                    "disableWeekends": false,
                    "disableWeekdays": false,
                    "maxDate": null
                  },
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Email",
                  "tableView": true,
                  "key": "email",
                  "properties": {
                    "class": "email",
                    "fhirElement": "Patient.telecom.where(system='email').value"
                  },
                  "type": "email",
                  "input": true,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "Email Use",
                  "optionsLabelPosition": "right",
                  "inline": true,
                  "tableView": false,
                  "defaultValue": "home",
                  "values": [
                    {
                      "label": "Home",
                      "value": "home",
                      "shortcut": ""
                    },
                    {
                      "label": "Work",
                      "value": "work",
                      "shortcut": ""
                    },
                    {
                      "label": "Mobile",
                      "value": "mobile",
                      "shortcut": ""
                    }
                  ],
                  "key": "patientEmailUse",
                  "properties": {
                    "class": "email.use",
                    "fhirElement": "Patient.telecom.where(system='email').use[0]"
                  },
                  "type": "radio",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            }
          ],
          "key": "columns6",
          "type": "columns",
          "tableView": false,
          "input": false
        },
        {
          "html": "<p><strong>If BC PHN is unknown, a phone number AND address is required to align with provincial client identity standards.</strong></p>",
          "label": "Content",
          "refreshOnChange": false,
          "key": "content1",
          "type": "content",
          "tableView": false,
          "input": false,
          "hideOnChildrenHidden": false
        }
      ]
    },
    {
      "label": "Address",
      "key": "patientInformationAddress",
      "properties": {
        "formioResource": "addressV3",
        "fhirElement": "Patient.address",
        "fhirResource": "Address"
      },
      "type": "well",
      "input": false,
      "tableView": false,
      "components": [
        {
          "html": "<p>Address</p>",
          "label": "Content",
          "refreshOnChange": false,
          "key": "content2",
          "type": "content",
          "input": false,
          "tableView": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Country",
                  "widget": "choicesjs",
                  "tableView": true,
                  "dataSrc": "url",
                  "defaultValue": "CA",
                  "data": {
                    "url": "https://test-phsaapiservices.azure-api.net/eforms/countries_iso.json",
                    "headers": [
                      {
                        "key": "",
                        "value": ""
                      }
                    ]
                  },
                  "valueProperty": "value",
                  "selectThreshold": 0.3,
                  "key": "patientCountry",
                  "properties": {
                    "class": "country",
                    "fhirElement": "Address.country"
                  },
                  "type": "select",
                  "input": true,
                  "disableLimit": false,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "Province/Territory",
                  "widget": "choicesjs",
                  "tableView": true,
                  "dataSrc": "json",
                  "data": {
                    "json": [
                      {
                        "value": "BC",
                        "label": "British Columbia"
                      },
                      {
                        "value": "AB",
                        "label": "Alberta"
                      },
                      {
                        "value": "MB",
                        "label": "Manitoba"
                      },
                      {
                        "value": "NB",
                        "label": "New Brunswick"
                      },
                      {
                        "value": "NL",
                        "label": "Newfoundland"
                      },
                      {
                        "value": "NT",
                        "label": "Northwest Territories"
                      },
                      {
                        "value": "NS",
                        "label": "Nova Scotia"
                      },
                      {
                        "value": "NU",
                        "label": "Nunavut"
                      },
                      {
                        "value": "ON",
                        "label": "Ontario"
                      },
                      {
                        "value": "PE",
                        "label": "Prince Edward Island"
                      },
                      {
                        "value": "QC",
                        "label": "Quebec"
                      },
                      {
                        "value": "SK",
                        "label": "Saskatchewan"
                      },
                      {
                        "value": "YT",
                        "label": "Yukon"
                      }
                    ]
                  },
                  "valueProperty": "value",
                  "selectThreshold": 0.3,
                  "customDefaultValue": "value=data.patientCountry.replace('CA', 'BC')",
                  "key": "patientProvince",
                  "properties": {
                    "class": "state",
                    "fhirElement": "Address.state"
                  },
                  "conditional": {
                    "show": true,
                    "when": "patientCountry",
                    "eq": "CA"
                  },
                  "logic": [
                    {
                      "name": "isCountryNotCanada",
                      "trigger": {
                        "type": "javascript",
                        "javascript": "result = (data['patientCountry'] !== \"CA\");"
                      },
                      "actions": [
                        {
                          "name": "nullifyProvince",
                          "type": "value",
                          "value": "value=''"
                        }
                      ]
                    }
                  ],
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "State",
                  "widget": "choicesjs",
                  "tableView": true,
                  "dataSrc": "json",
                  "data": {
                    "json": [
                      {
                        "value": "AL",
                        "label": "Alabama"
                      },
                      {
                        "value": "AK",
                        "label": "Alaska"
                      },
                      {
                        "value": "AZ",
                        "label": "Arizona"
                      },
                      {
                        "value": "AR",
                        "label": "Arkansas"
                      },
                      {
                        "value": "CA",
                        "label": "California"
                      },
                      {
                        "value": "CO",
                        "label": "Colorado"
                      },
                      {
                        "value": "CT",
                        "label": "Connecticut"
                      },
                      {
                        "value": "DE",
                        "label": "Delaware"
                      },
                      {
                        "value": "DC",
                        "label": "District of Columbia"
                      },
                      {
                        "value": "FL",
                        "label": "Florida"
                      },
                      {
                        "value": "GA",
                        "label": "Georgia"
                      },
                      {
                        "value": "HI",
                        "label": "Hawaii"
                      },
                      {
                        "value": "ID",
                        "label": "Idaho"
                      },
                      {
                        "value": "IL",
                        "label": "Illinois"
                      },
                      {
                        "value": "IN",
                        "label": "Indiana"
                      },
                      {
                        "value": "IA",
                        "label": "Iowa"
                      },
                      {
                        "value": "KS",
                        "label": "Kansas"
                      },
                      {
                        "value": "KY",
                        "label": "Kentucky"
                      },
                      {
                        "value": "LA",
                        "label": "Louisiana"
                      },
                      {
                        "value": "ME",
                        "label": "Maine"
                      },
                      {
                        "value": "MD",
                        "label": "Maryland"
                      },
                      {
                        "value": "MA",
                        "label": "Massachusetts"
                      },
                      {
                        "value": "MI",
                        "label": "Michigan"
                      },
                      {
                        "value": "MN",
                        "label": "Minnesota"
                      },
                      {
                        "value": "MS",
                        "label": "Mississippi"
                      },
                      {
                        "value": "MO",
                        "label": "Missouri"
                      },
                      {
                        "value": "MT",
                        "label": "Montana"
                      },
                      {
                        "value": "NE",
                        "label": "Nebraska"
                      },
                      {
                        "value": "NV",
                        "label": "Nevada"
                      },
                      {
                        "value": "NH",
                        "label": "New Hampshire"
                      },
                      {
                        "value": "NJ",
                        "label": "New Jersey"
                      },
                      {
                        "value": "NM",
                        "label": "New Mexico"
                      },
                      {
                        "value": "NY",
                        "label": "New York"
                      },
                      {
                        "value": "NC",
                        "label": "North Carolina"
                      },
                      {
                        "value": "ND",
                        "label": "North Dakota"
                      },
                      {
                        "value": "OH",
                        "label": "Ohio"
                      },
                      {
                        "value": "OK",
                        "label": "Oklahoma"
                      },
                      {
                        "value": "OR",
                        "label": "Oregon"
                      },
                      {
                        "value": "PA",
                        "label": "Pennsylvania"
                      },
                      {
                        "value": "RI",
                        "label": "Rhode Island"
                      },
                      {
                        "value": "SC",
                        "label": "South Carolina"
                      },
                      {
                        "value": "SD",
                        "label": "South Dakota"
                      },
                      {
                        "value": "Tn",
                        "label": "Tennessee"
                      },
                      {
                        "value": "TX",
                        "label": "Texas"
                      },
                      {
                        "value": "UT",
                        "label": "Utah"
                      },
                      {
                        "value": "VT",
                        "label": "Vermont"
                      },
                      {
                        "value": "VA",
                        "label": "Virginia"
                      },
                      {
                        "value": "WA",
                        "label": "Washington"
                      },
                      {
                        "value": "WV",
                        "label": "West Virginia"
                      },
                      {
                        "value": "WI",
                        "label": "Wisconsin"
                      },
                      {
                        "value": "WY",
                        "label": "Wyoming"
                      }
                    ]
                  },
                  "valueProperty": "value",
                  "selectThreshold": 0.3,
                  "key": "patientState",
                  "properties": {
                    "class": "stateUS",
                    "fhirElement": "Address.state"
                  },
                  "conditional": {
                    "show": true,
                    "when": "patientCountry",
                    "eq": "US"
                  },
                  "logic": [
                    {
                      "name": "isCountryNotUS",
                      "trigger": {
                        "type": "javascript",
                        "javascript": "result = (data['patientCountry'] !== \"US\");"
                      },
                      "actions": [
                        {
                          "name": "nullifyState",
                          "type": "value",
                          "value": "value=''"
                        }
                      ]
                    }
                  ],
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "Province/State",
                  "tableView": true,
                  "key": "patientProvinceState",
                  "properties": {
                    "class": "stateFreeText",
                    "fhirElement": "Address.state"
                  },
                  "customConditional": "show = (data.patientCountry !== \"CA\" && data.patientCountry !== \"US\");",
                  "logic": [
                    {
                      "name": "isCountryCanadaUS",
                      "trigger": {
                        "type": "javascript",
                        "javascript": "result = (data['patientCountry'] == \"CA\" || data['patientCountry'] == \"US\");"
                      },
                      "actions": [
                        {
                          "name": "nullifypatientProvinceState",
                          "type": "value",
                          "value": "value=''"
                        }
                      ]
                    }
                  ],
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "City/Town",
                  "widget": "choicesjs",
                  "tableView": true,
                  "dataSrc": "url",
                  "data": {
                    "url": "https://test-phsaapiservices.azure-api.net/eforms/cities_in_bc_non_panorama.json",
                    "headers": [
                      {
                        "key": "",
                        "value": ""
                      }
                    ]
                  },
                  "valueProperty": "label",
                  "selectThreshold": 0.3,
                  "key": "patientBCcity",
                  "properties": {
                    "class": "city",
                    "fhirElement": "Address.city"
                  },
                  "conditional": {
                    "show": true,
                    "when": "patientProvince",
                    "eq": "BC"
                  },
                  "logic": [
                    {
                      "name": "isProvinceNotBC",
                      "trigger": {
                        "type": "javascript",
                        "javascript": "result = data['patientProvince'] !== \"BC\";"
                      },
                      "actions": [
                        {
                          "name": "nullifyBCcity",
                          "type": "value",
                          "value": "value=''"
                        }
                      ]
                    }
                  ],
                  "type": "select",
                  "input": true,
                  "disableLimit": false,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "City/Town",
                  "tableView": true,
                  "key": "patientCityTown",
                  "properties": {
                    "class": "cityFreeText",
                    "fhirElement": "Address.city"
                  },
                  "conditional": {
                    "show": false,
                    "when": "patientProvince",
                    "eq": "BC"
                  },
                  "logic": [
                    {
                      "name": "isProvinceBC",
                      "trigger": {
                        "type": "javascript",
                        "javascript": "result = (data['patientProvince'] == \"BC\");"
                      },
                      "actions": [
                        {
                          "name": "nullifyNonBCcity",
                          "type": "value",
                          "value": "value=''"
                        }
                      ]
                    }
                  ],
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 4
            }
          ],
          "key": "columns8",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Address Use",
                  "optionsLabelPosition": "right",
                  "inline": true,
                  "tableView": false,
                  "values": [
                    {
                      "label": "Home",
                      "value": "home",
                      "shortcut": ""
                    },
                    {
                      "label": "Work",
                      "value": "work",
                      "shortcut": ""
                    },
                    {
                      "label": "Temporary",
                      "value": "temp",
                      "shortcut": ""
                    }
                  ],
                  "key": "patientAddressUse",
                  "properties": {
                    "class": "address.use",
                    "fhirElement": "Address.use"
                  },
                  "type": "radio",
                  "input": true,
                  "hideOnChildrenHidden": false,
                  "defaultValue": "home"
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "Street Address Line",
                  "description": "Please confirm and update to most recent address",
                  "tableView": true,
                  "key": "patientStreetAddressLine1",
                  "properties": {
                    "class": "line1",
                    "fhirElement": "Address.line"
                  },
                  "type": "textfield",
                  "input": true,
                  "lockKey": true,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "Address is most recent (hidden)",
                  "tooltip": "Select checkbox if address is most recent",
                  "hidden": true,
                  "tableView": false,
                  "defaultValue": true,
                  "key": "addressValidated",
                  "properties": {
                    "questionnaireElement": "addressValidated"
                  },
                  "type": "checkbox",
                  "input": true,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "Effective From Date (hidden)",
                  "format": "yyyy-MM-dd",
                  "hidden": true,
                  "tableView": false,
                  "enableMinDateInput": false,
                  "datePicker": {
                    "disableWeekends": false,
                    "disableWeekdays": false
                  },
                  "enableMaxDateInput": false,
                  "enableTime": false,
                  "timePicker": {
                    "showMeridian": false
                  },
                  "key": "addressEffectiveFromDate",
                  "logic": [
                    {
                      "name": "Set Effective From Date to Today",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "addressValidated",
                          "eq": "true"
                        }
                      },
                      "actions": [
                        {
                          "name": "Set to Today",
                          "type": "value",
                          "value": "var d = moment().format('YYYY-MM-DD');\nvalue = d;"
                        }
                      ]
                    },
                    {
                      "name": "Set Effective From Date to EMPI Date",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "addressValidated",
                          "eq": "false"
                        }
                      },
                      "actions": [
                        {
                          "name": "Set Date to EMPI Date",
                          "type": "value",
                          "value": "value = data.EMPIaddressEffectiveFromDate"
                        }
                      ]
                    }
                  ],
                  "type": "datetime",
                  "input": true,
                  "widget": {
                    "type": "calendar",
                    "displayInTimezone": "viewer",
                    "locale": "en",
                    "useLocaleSettings": false,
                    "allowInput": true,
                    "mode": "single",
                    "enableTime": false,
                    "noCalendar": false,
                    "format": "yyyy-MM-dd",
                    "hourIncrement": 1,
                    "minuteIncrement": 1,
                    "time_24hr": true,
                    "minDate": null,
                    "disableWeekends": false,
                    "disableWeekdays": false,
                    "maxDate": null
                  },
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "EMPI Effective From Date (hidden)",
                  "format": "yyyy-MM-dd",
                  "hidden": true,
                  "tableView": false,
                  "enableMinDateInput": false,
                  "datePicker": {
                    "disableWeekends": false,
                    "disableWeekdays": false
                  },
                  "enableMaxDateInput": false,
                  "enableTime": false,
                  "timePicker": {
                    "showMeridian": false
                  },
                  "key": "EMPIaddressEffectiveFromDate",
                  "type": "datetime",
                  "input": true,
                  "widget": {
                    "type": "calendar",
                    "displayInTimezone": "viewer",
                    "locale": "en",
                    "useLocaleSettings": false,
                    "allowInput": true,
                    "mode": "single",
                    "enableTime": false,
                    "noCalendar": false,
                    "format": "yyyy-MM-dd",
                    "hourIncrement": 1,
                    "minuteIncrement": 1,
                    "time_24hr": true,
                    "minDate": null,
                    "disableWeekends": false,
                    "disableWeekdays": false,
                    "maxDate": null
                  },
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "Postal Code",
                  "description": "IMPORTANT: This is used to identify the client health region",
                  "inputMask": "A9A 9A9",
                  "tableView": true,
                  "case": "uppercase",
                  "key": "patientCanadianAddressPostalCode",
                  "properties": {
                    "class": "postalCode",
                    "fhirElement": "Address.postalCode"
                  },
                  "conditional": {
                    "show": true,
                    "when": "patientCountry",
                    "eq": "CA"
                  },
                  "logic": [
                    {
                      "name": "isCountryNotCA",
                      "trigger": {
                        "type": "javascript",
                        "javascript": "result = (data['patientCountry'] !== \"CA\");"
                      },
                      "actions": [
                        {
                          "name": "nullifyCApostalCode",
                          "type": "value",
                          "value": "value=''"
                        }
                      ]
                    }
                  ],
                  "type": "textfield",
                  "input": true,
                  "lockKey": true,
                  "hideOnChildrenHidden": false
                },
                {
                  "label": "Postal Code",
                  "tableView": true,
                  "case": "uppercase",
                  "key": "patientAddressPostalCode",
                  "properties": {
                    "class": "postalCodeFreeText",
                    "fhirElement": "Address.postalCode"
                  },
                  "conditional": {
                    "show": false,
                    "when": "patientCountry",
                    "eq": "CA"
                  },
                  "logic": [
                    {
                      "name": "isCountryCA",
                      "trigger": {
                        "type": "javascript",
                        "javascript": "result = (data['patientCountry'] == \"CA\");"
                      },
                      "actions": [
                        {
                          "name": "nullifyNonCApostalCode",
                          "type": "value",
                          "value": "value=''"
                        }
                      ]
                    }
                  ],
                  "type": "textfield",
                  "input": true,
                  "lockKey": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 4
            }
          ],
          "key": "columns9",
          "type": "columns",
          "input": false,
          "tableView": false
        }
      ]
    },
    {
      "label": "COVID19 Imms History",
      "key": "covid19ImmsHistory",
      "type": "well",
      "input": false,
      "tableView": false,
      "components": [
        {
          "label": "encodedHistoricImmz",
          "hidden": true,
          "tableView": true,
          "clearOnHide": false,
          "key": "encodedHistoricImmz",
          "properties": {
            "fhirElement": "Patient.photo.data"
          },
          "type": "textfield",
          "input": true
        },
        {
          "label": "COVID-19 Immunization History",
          "autoExpand": false,
          "tableView": true,
          "defaultValue": "Client Not Found. Please use Client Search or refine your search and try again by re-launching the eForm. If you receive this message again then there is no Immunization history retrievable for this client at this time.",
          "persistent": "client-only",
          "key": "covid19ImmunizationHistory1",
          "logic": [
            {
              "name": "IMMSHISTORYPOPULATED",
              "trigger": {
                "type": "javascript",
                "javascript": "result=(data['encodedHistoricImmz'].length > 0)"
              },
              "actions": [
                {
                  "name": "DECODEIMMSHISTORY",
                  "type": "value",
                  "value": "value=window.atob(data.encodedHistoricImmz)"
                }
              ]
            },
            {
              "name": "IMMSHISTORYNULL",
              "trigger": {
                "type": "javascript",
                "javascript": "result=(!data['encodedHistoricImmz'])"
              },
              "actions": [
                {
                  "name": "DEFAULT",
                  "type": "value",
                  "value": "value='Client Not Found. Please use Client Search or refine your search and try again by re-launching the eForm. If you receive this message again then there is no Immunization history retrievable for this client at this time.'"
                }
              ]
            }
          ],
          "type": "textarea",
          "rows": 7,
          "input": true
        }
      ]
    }
  ]
},
{
  "title": "Client Consent Readiness",
  "collapsible": false,
  "key": "consentReadiness",
  "properties": {
    "formioResource": "consent",
    "fhirResource": "consent"
  },
  "type": "panel",
  "label": "Client Consent Readiness",
  "input": false,
  "tableView": false,
  "components": [
    {
      "label": "Consent Readiness",
      "key": "consentReadiness1",
      "type": "well",
      "input": false,
      "tableView": false,
      "components": [
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Informed Consent for Series Obtained From:",
                  "optionsLabelPosition": "right",
                  "inline": true,
                  "tableView": false,
                  "values": [
                    {
                      "label": "Client",
                      "value": "C",
                      "shortcut": ""
                    },
                    {
                      "label": "Client (Mature Minor)",
                      "value": "MM",
                      "shortcut": ""
                    },
                    {
                      "label": "Substitute Decision Maker",
                      "value": "SUBDECISIONMAKER",
                      "shortcut": ""
                    }
                  ],
                  "key": "consentGivenBy",
                  "properties": {
                    "class": "consentGivenBy",
                    "fhirElement": "consent.performer.relatedPerson.relationship.code",
                    "settings": "coding"
                  },
                  "type": "radio",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 6,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 6
            },
            {
              "components": [
                
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            }
          ],
          "key": "columns12",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Last Name of Person Giving Consent",
                  "tableView": true,
                  "clearOnHide": false,
                  "key": "personGivingConsentLastName",
                  "properties": {
                    "class": "personGivingConsentLastName",
                    "fhirElement": "consent.performer.relatedPerson.name.family."
                  },
                  "conditional": {
                    "show": true,
                    "when": "consentGivenBy",
                    "eq": "SUBDECISIONMAKER"
                  },
                  "logic": [
                    {
                      "name": "DefaultValueIfCLIENT",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "consentGivenBy",
                          "eq": "C"
                        }
                      },
                      "actions": [
                        {
                          "name": "DefaultValueToClientLastName",
                          "type": "value",
                          "value": "value=data.patientNameFamily"
                        }
                      ]
                    },
                    {
                      "name": "DefaultValueIfMatureMinor",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "consentGivenBy",
                          "eq": "MM"
                        }
                      },
                      "actions": [
                        {
                          "name": "DefaultValueClientLastName",
                          "type": "value",
                          "value": "value=data.patientNameFamily"
                        }
                      ]
                    }
                  ],
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "First Name of Person Giving Consent",
                  "tableView": true,
                  "clearOnHide": false,
                  "key": "personGivingConsentFirstName",
                  "properties": {
                    "class": "personGivingConsentFirstName",
                    "fhirElement": "consent.performer.relatedPerson.name.given"
                  },
                  "conditional": {
                    "show": true,
                    "when": "consentGivenBy",
                    "eq": "SUBDECISIONMAKER"
                  },
                  "logic": [
                    {
                      "name": "DefaultValueIfCLIENT",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "consentGivenBy",
                          "eq": "C"
                        }
                      },
                      "actions": [
                        {
                          "name": "DefaultValueClientFirstName",
                          "type": "value",
                          "value": "value=data.patientNameGiven"
                        }
                      ]
                    },
                    {
                      "name": "DefaultValueIfMATUREMINOR",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "consentGivenBy",
                          "eq": "MM"
                        }
                      },
                      "actions": [
                        {
                          "name": "DefaultValueClientFirstName",
                          "type": "value",
                          "value": "value=data.patientNameGiven"
                        }
                      ]
                    }
                  ],
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "Form of Consent",
                  "widget": "choicesjs",
                  "tableView": true,
                  "dataSrc": "json",
                  "data": {
                    "json": [
                      {
                        "label": "In Person",
                        "value": "INPERSON"
                      },
                      {
                        "label": "Telephone",
                        "value": "PHONE1"
                      },
                      {
                        "label": "Written",
                        "value": "W"
                      }
                    ]
                  },
                  "valueProperty": "label",
                  "dataType": "string",
                  "selectThreshold": 0.3,
                  "key": "formOfConsent",
                  "conditional": {
                    "show": true,
                    "when": "consentGivenBy",
                    "eq": "SUBDECISIONMAKER"
                  },
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 4
            }
          ],
          "key": "columns13",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Consent Comment (hidden)",
          "autoExpand": false,
          "hidden": true,
          "tableView": true,
          "clearOnHide": false,
          "key": "consentComment",
          "properties": {
            "class": "consentComment",
            "fhirElement": "consent.extension.comment"
          },
          "logic": [
            {
              "name": "Consent Given By Client",
              "trigger": {
                "type": "simple",
                "simple": {
                  "show": true,
                  "when": "consentGivenBy",
                  "eq": "C"
                }
              },
              "actions": [
                {
                  "name": "Concatenate",
                  "type": "value",
                  "value": "value = \"Form of Consent: In Person\""
                }
              ]
            },
            {
              "name": "Consent Not Obtained",
              "trigger": {
                "type": "simple",
                "simple": {
                  "show": true,
                  "when": "consentGivenBy",
                  "eq": ""
                }
              },
              "actions": [
                {
                  "name": "No Concatenate",
                  "type": "value",
                  "value": "value = \"\""
                }
              ]
            },
            {
              "name": "Consent Given By Minor",
              "trigger": {
                "type": "simple",
                "simple": {
                  "show": true,
                  "when": "consentGivenBy",
                  "eq": "MM"
                }
              },
              "actions": [
                {
                  "name": "Concatenate",
                  "type": "value",
                  "value": "value = \"Form of Consent: In Person\""
                }
              ]
            },
            {
              "name": "Consent Given By Sub",
              "trigger": {
                "type": "simple",
                "simple": {
                  "show": true,
                  "when": "consentGivenBy",
                  "eq": "SUBDECISIONMAKER"
                }
              },
              "actions": [
                {
                  "name": "Concatenate",
                  "type": "value",
                  "value": "  if (data.formOfConsent) {\r\n   value = \"Form of Consent: \" + data.formOfConsent;\r\n  } else {\r\n   value = \"Form of Consent: Not Specified\";\r\n  }"
                }
              ]
            }
          ],
          "type": "textarea",
          "input": true,
          "hideOnChildrenHidden": false
        }
      ]
    }
  ]
},
{
  "title": "COVID-19 Immunization Data",
  "collapsible": false,
  "key": "covid19ImmunizationHistory",
  "type": "panel",
  "label": "COVID-19 Immunization Data",
  "input": false,
  "tableView": false,
  "components": [
    {
      "label": "Provider Info",
      "key": "providerInfo",
      "properties": {
        "formioResource": "providerInformation",
        "fhirResource": "Practitioner"
      },
      "type": "well",
      "input": false,
      "tableView": false,
      "components": [
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Provider Last Name",
                  "tableView": true,
                  "validate": {
                    "required": true
                  },
                  "key": "providerLastName",
                  "properties": {
                    "class": "last.name",
                    "fhirElement": "Practitioner.name.family"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "Provider First Name",
                  "tableView": true,
                  "validate": {
                    "required": true
                  },
                  "key": "providerFirstName",
                  "properties": {
                    "class": "first.name",
                    "fhirElement": "Practitioner.name.given"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                
              ],
              "size": "md",
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 4
            }
          ],
          "key": "columns2",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Provider ID Type (hidden)",
                  "optionsLabelPosition": "right",
                  "inline": false,
                  "hidden": true,
                  "tableView": false,
                  "values": [
                    {
                      "label": "CPSID - Physicians",
                      "value": "urn:CPSID",
                      "shortcut": ""
                    },
                    {
                      "label": "MSP  Practitioner Number",
                      "value": "urn:MPID",
                      "shortcut": ""
                    },
                    {
                      "label": "PHID - Pharmacists",
                      "value": "urn:PHID",
                      "shortcut": ""
                    },
                    {
                      "label": "RNID - Registered Nurses",
                      "value": "urn:RNID",
                      "shortcut": ""
                    }
                  ],
                  "key": "providerIdType",
                  "properties": {
                    "class": "identifier.type",
                    "fhirElement": "Practitioner.identifier.system"
                  },
                  "type": "radio",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "Provider Role (hidden)",
                  "optionsLabelPosition": "right",
                  "inline": false,
                  "hidden": true,
                  "tableView": false,
                  "values": [
                    {
                      "label": "Nurse - Registered",
                      "value": "RN",
                      "shortcut": ""
                    },
                    {
                      "label": "Pharmacist",
                      "value": "PHARM",
                      "shortcut": ""
                    },
                    {
                      "label": "Physician",
                      "value": "MD",
                      "shortcut": ""
                    }
                  ],
                  "key": "providerRole",
                  "properties": {
                    "class": "role",
                    "fhirElement": "Practitioner.name.suffix"
                  },
                  "type": "radio",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 4
            },
            {
              "components": [
                {
                  "label": "Provider ID (hidden)",
                  "hidden": true,
                  "tableView": true,
                  "key": "providerId",
                  "properties": {
                    "class": "provider.identifier",
                    "fhirElement": "Practitioner.identifier.value"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 4,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 4
            }
          ],
          "key": "columns",
          "type": "columns",
          "input": false,
          "tableView": false
        }
      ]
    },
    {
      "label": "COVID19ImmsData",
      "key": "covid19ImmsData",
      "properties": {
        "formioResource": "immunization",
        "fhirResource": "Immunization"
      },
      "type": "well",
      "input": false,
      "tableView": false,
      "components": [
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Reason for Immunization",
                  "widget": "choicesjs",
                  "tooltip": "Z_C19 Essential Visitor to LTC / Assisted Living: People identified as essential visitors to residents of Long Term Care (LTC) and Assisted Living (AL) facilities\r\nZ_C19 Home Care Recipient: Clients receiving home care\r\nZ_C19 Homeless or Lives in Shelter: Clients who experience homelessness or who live a shelter\r\nZ_C19 Pandemic Priority Population: Includes any person who does not qualify under any other reason.  For example staff working in shelters, Indigenous peoples and age-based eligibility\r\nZ_C19 Paramedic/First Responder: Staff who are Paramedics or first responders\r\nZ_C19 Physician: Community physicians and medical specialists\r\nZ_C19 Resident - Assisted Living: Residents who live in an Assisted Living facility\r\nZ_C19 Resident - Awaiting LTC or AL Placement: Residents who have been assessed and are waiting for placement in LTC or Assisted Living\r\nZ_C19 Resident - Congregate Settings: Residents who live in congregate settings such as correctional facilities, group homes, mental health residential\r\nZ_C19 Resident - Long Term Care: Residents who live in a Long Term Care facility\r\nZ_C19 Staff - Assisted Living: Staff who work in an Assisted Living facility\r\nZ_C19 Staff - Community: Staff who provide services in community setting \r\nZ_C19 Staff - Hospital: Staff who work in a hospital\r\nZ_C19 Staff - Long Term Care: Staff who work in a Long Term Care facility (private or public)\r\nZ_C19 Staff - Pandemic Support: Staff who support the pandemic response who don't work in a health care setting",
                  "tableView": true,
                  "dataSrc": "json",
                  "data": {
                    "json": [
                      {
                        "label": "Z_C19 Resident - Assisted Living",
                        "value": "IMMSREASON_C19_RESIDENT_AL"
                      },
                      {
                        "label": "Z_C19 Staff - Assisted Living",
                        "value": "IMMSREASON_C19_STAFF_AL"
                      },
                      {
                        "label": "Z_C19 Resident - Long Term Care",
                        "value": "IMMSREASON_C19_RESIDENT_LTC"
                      },
                      {
                        "label": "Z_C19 Staff - Long Term Care",
                        "value": "IMMSREASON_C19_STAFF_LTC"
                      },
                      {
                        "label": "Z_C19 Resident - Awaiting LTC or AL Placement",
                        "value": "IMMSREASON_C19_RESIDENT_ASSAWA_LTC_AL_ACUTE"
                      },
                      {
                        "label": "Z_C19 Resident - Congregate Settings",
                        "value": "IMMSREASON_C19_RESIDENT_CONGREGATESETTINGS"
                      },
                      {
                        "label": "Z_C19 Staff - Congregate Settings",
                        "value": "IMMSREASON_C19_STAFF_CONGREGATE_SETTINGS"
                      },
                      {
                        "label": "Z_C19 Resident - Independent Living",
                        "value": "IMMSREASON_C19_RES_INDEPENDENT_LIVING"
                      },
                      {
                        "label": "Z_C19 Staff - Independent Living",
                        "value": "IMMSREASON_C19_STAFF_INDEPENDENT_LIVING"
                      },
                      {
                        "label": "Z_C19 Staff - Community",
                        "value": "IMMSREASON_C19_STAFF_COMMUNITY"
                      },
                      {
                        "label": "Z_C19 Staff - Hospital",
                        "value": "IMMSREASON_C19_STAFF_HOSPITAL"
                      },
                      {
                        "label": "Z_C19 Staff - Pandemic Support",
                        "value": "IMMSREASON_C19_PANDEMIC_SUPPORT"
                      },
                      {
                        "label": "Z_C19 Essential Visitor to LTC / Assisted Living",
                        "value": "IMMSREASON_C19_ESSVISTOLTC"
                      },
                      {
                        "label": "Z_C19 Home Care Recipient",
                        "value": "IMMSREASON_C19_HOMECARE_RECIPIENT"
                      },
                      {
                        "label": "Z_C19 Homeless or Lives in Shelter",
                        "value": "IMMSREASON_C19_HOMELESSSHELTER"
                      },
                      {
                        "label": "Z_C19 Pandemic Priority Population",
                        "value": "IMMSREASON_C19_PANDEMICPRIORITYPOP"
                      },
                      {
                        "label": "Z_C19 Paramedic/First Responder",
                        "value": "IMMSREASON_C19_PARAMEDIC"
                      },
                      {
                        "label": "Z_C19 Physician",
                        "value": "IMMSREASON_C19_PHYSICIAN"
                      }
                    ]
                  },
                  "valueProperty": "value",
                  "selectThreshold": 0.3,
                  "validate": {
                    "required": true
                  },
                  "key": "reasonForImmunization",
                  "properties": {
                    "class": "reasonCode",
                    "fhirElement": "Immunization.reasonCode.code",
                    "settings": "coding"
                  },
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 6,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 6
            },
            {
              "components": [
                {
                  "label": "Staff Worksite/Client’s Facility",
                  "widget": "choicesjs",
                  "description": "Enter facility only if client works or lives in Long Term Care or Assisted Living. If client works at multiple facilities, select the facility provided by the client and enter additional facilities in comment.",
                  "tableView": true,
                  "dataSrc": "url",
                  "data": {
                    "url": "https://api.eforms.phsaehealth.ca/client_facilities.json",
                    "headers": [
                      {
                        "key": "",
                        "value": ""
                      }
                    ]
                  },
                  "valueProperty": "value",
                  "selectThreshold": 0.3,
                  "customOptions": {
                    "searchResultLimit": 7
                  },
                  "key": "clientFacility",
                  "properties": {
                    "class": "staffClient.facility",
                    "questionnaireElement": "clientFacility"
                  },
                  "logic": [
                    {
                      "name": "Mandatory for LTC Staff",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "reasonForImmunization",
                          "eq": "IMMSREASON_C19_STAFF_LTC"
                        }
                      },
                      "actions": [
                        {
                          "name": "Set Required",
                          "type": "property",
                          "property": {
                            "label": "Required",
                            "value": "validate.required",
                            "type": "boolean"
                          },
                          "state": true
                        }
                      ]
                    },
                    {
                      "name": "Mandatory for LTC Resident",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "reasonForImmunization",
                          "eq": "IMMSREASON_C19_RESIDENT_LTC"
                        }
                      },
                      "actions": [
                        {
                          "name": "Set Required",
                          "type": "property",
                          "property": {
                            "label": "Required",
                            "value": "validate.required",
                            "type": "boolean"
                          },
                          "state": true
                        }
                      ]
                    },
                    {
                      "name": "Mandatory for AL Staff",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "reasonForImmunization",
                          "eq": "IMMSREASON_C19_STAFF_AL"
                        }
                      },
                      "actions": [
                        {
                          "name": "Set Required",
                          "type": "property",
                          "property": {
                            "label": "Required",
                            "value": "validate.required",
                            "type": "boolean"
                          },
                          "state": true
                        }
                      ]
                    },
                    {
                      "name": "Mandatory for AL Resident",
                      "trigger": {
                        "type": "simple",
                        "simple": {
                          "show": true,
                          "when": "reasonForImmunization",
                          "eq": "IMMSREASON_C19_RESIDENT_AL"
                        }
                      },
                      "actions": [
                        {
                          "name": "Set Required",
                          "type": "property",
                          "property": {
                            "label": "Required",
                            "value": "validate.required",
                            "type": "boolean"
                          },
                          "state": true
                        }
                      ]
                    }
                  ],
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false,
                  "disableLimit": false
                }
              ],
              "width": 6,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 6
            }
          ],
          "key": "columns10",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Agent",
                  "widget": "choicesjs",
                  "tableView": true,
                  "defaultValue": 1119349007,
                  "data": {
                    "values": [
                      {
                        "label": "COVID-19 mRNA",
                        "value": "1119349007"
                      },
                      {
                        "label": "COVID-19 AZ Test",
                        "value": "covid19AzTest"
                      }
                    ]
                  },
                  "selectThreshold": 0.3,
                  "validate": {
                    "required": true
                  },
                  "key": "agent",
                  "properties": {
                    "class": "vaccineCode",
                    "fhirElement": "Immunization.vaccineCode.code",
                    "settings": "coding"
                  },
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Date Administered",
                  "widget": {
                    "type": "calendar",
                    "altInput": true,
                    "allowInput": true,
                    "clickOpens": true,
                    "enableDate": true,
                    "enableTime": false,
                    "mode": "single",
                    "noCalendar": false,
                    "format": "yyyy-MM-dd",
                    "dateFormat": "yyyy-MM-dd",
                    "useLocaleSettings": false,
                    "hourIncrement": 1,
                    "minuteIncrement": 5,
                    "time_24hr": false,
                    "saveAs": "date",
                    "maxDate": "moment()",
                    "locale": "en"
                  },
                  "tableView": true,
                  "customDefaultValue": "var d = moment().format('YYYY-MM-DD');\nvalue = d;",
                  "validate": {
                    "required": true
                  },
                  "key": "dateAdministered",
                  "properties": {
                    "class": "vaccination.date",
                    "fhirElement": "Immunization.occurrenceDateTime"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                
              ],
              "size": "md",
              "width": 6,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 6
            }
          ],
          "key": "columns1",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Lot Number",
                  "widget": "choicesjs",
                  "tableView": true,
                  "dataSrc": "url",
                  "data": {
                    "url": "https://www.eforms.phsaehealth.ca/vpp-smart/inventory.json",
                    "headers": [
                      {
                        "key": "",
                        "value": ""
                      }
                    ]
                  },
                  "valueProperty": "value",
                  "selectThreshold": 0.3,
                  "validate": {
                    "required": true
                  },
                  "key": "lotNumberInventory",
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false,
                  "disableLimit": false
                },
                {
                  "label": "extractedLotNumber(hidden)",
                  "hidden": true,
                  "tableView": true,
                  "clearOnHide": false,
                  "calculateValue": "value = data.lotNumberInventory.split(\"|\")[0]",
                  "key": "lotNumber",
                  "properties": {
                    "class": "lotNumber",
                    "fhirElement": "Immunization.lotNumber",
                    "settings": "coding"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Lot Number Expiry Date",
                  "widget": {
                    "type": "calendar",
                    "altInput": true,
                    "allowInput": true,
                    "clickOpens": true,
                    "enableDate": true,
                    "enableTime": false,
                    "mode": "single",
                    "noCalendar": false,
                    "format": "yyyy-MM-dd",
                    "dateFormat": "yyyy-MM-dd",
                    "useLocaleSettings": false,
                    "hourIncrement": 1,
                    "minuteIncrement": 5,
                    "time_24hr": false,
                    "saveAs": "date",
                    "locale": "en"
                  },
                  "disabled": true,
                  "tableView": true,
                  "calculateValue": "value = data.lotNumberInventory.split(\"|\")[1]",
                  "key": "lotNumberExpiryDate",
                  "properties": {
                    "class": "expirationDate",
                    "fhirElement": "Immunization.expirationDate"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Dosage",
                  "tableView": true,
                  "redrawOn": "lotNumber",
                  "calculateValue": "value = data.lotNumberInventory.split(\"|\")[2]",
                  "allowCalculateOverride": true,
                  "key": "dosage",
                  "properties": {
                    "class": "dosage",
                    "fhirElement": "Immunization.doseQuantity.value"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Dosage UOM",
                  "widget": "choicesjs",
                  "disabled": true,
                  "tableView": true,
                  "selectThreshold": 0.3,
                  "calculateValue": "value = data.lotNumberInventory.split(\"|\")[3]",
                  "key": "dosageUom",
                  "properties": {
                    "class": "dosageQuantity.unit",
                    "fhirElement": "Immunization.doseQuantity.unit",
                    "settings": "coding"
                  },
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            }
          ],
          "key": "columns3",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                {
                  "label": "Site",
                  "widget": "choicesjs",
                  "tableView": true,
                  "data": {
                    "values": [
                      {
                        "label": "Arm - Left",
                        "value": "368208006"
                      },
                      {
                        "label": "Arm - Left deltoid",
                        "value": "16217701000119102"
                      },
                      {
                        "label": "Arm - Right",
                        "value": "368209003"
                      },
                      {
                        "label": "Arm - Right deltoid",
                        "value": "16217661000119109"
                      },
                      {
                        "label": "Buttock",
                        "value": "46862004"
                      },
                      {
                        "label": "Buttock - Left",
                        "value": "723979003"
                      },
                      {
                        "label": "Buttock - Left dorsogluteal",
                        "value": "LGD"
                      },
                      {
                        "label": "Buttock - Left ventrogluteal",
                        "value": "LVG"
                      },
                      {
                        "label": "Buttock - Right",
                        "value": "723980000"
                      },
                      {
                        "label": "Buttock - Right dorsogluteal",
                        "value": "RDG"
                      },
                      {
                        "label": "Buttock - Right ventrogluteal",
                        "value": "RVG"
                      },
                      {
                        "label": "Leg - Left",
                        "value": "48979004"
                      },
                      {
                        "label": "Leg - Right",
                        "value": "32696007"
                      }
                    ]
                  },
                  "selectThreshold": 0.3,
                  "validate": {
                    "required": true
                  },
                  "key": "site",
                  "properties": {
                    "class": "site",
                    "fhirElement": "Immunization.site.code",
                    "settings": "coding"
                  },
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Route",
                  "widget": "choicesjs",
                  "tableView": true,
                  "data": {
                    "values": [
                      {
                        "label": "Infiltrate",
                        "value": "718329006"
                      },
                      {
                        "label": "Intradermal",
                        "value": "372464004"
                      },
                      {
                        "label": "Intramuscular",
                        "value": "78421000"
                      },
                      {
                        "label": "Intranasal",
                        "value": "46713006"
                      },
                      {
                        "label": "Intravenous",
                        "value": "47625008"
                      },
                      {
                        "label": "Oral",
                        "value": "26643006"
                      },
                      {
                        "label": "Subcutaneous",
                        "value": "34206005"
                      }
                    ]
                  },
                  "selectThreshold": 0.3,
                  "calculateValue": "value = data.lotNumberInventory.split(\"|\")[4]",
                  "validate": {
                    "required": true
                  },
                  "key": "route",
                  "properties": {
                    "class": "route",
                    "fhirElement": "Immunization.route.code",
                    "settings": "coding"
                  },
                  "type": "select",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Trade Name",
                  "disabled": true,
                  "tableView": true,
                  "redrawOn": "lotNumber",
                  "calculateValue": "value = data.lotNumberInventory.split(\"|\")[6]",
                  "key": "tradeName",
                  "properties": {
                    "class": "tradeName",
                    "key": "http://loinc.org"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            },
            {
              "components": [
                {
                  "label": "Manufacturer",
                  "disabled": true,
                  "tableView": true,
                  "redrawOn": "lotNumber",
                  "calculateValue": "value = data.lotNumberInventory.split(\"|\")[7]",
                  "key": "manufacturer",
                  "properties": {
                    "class": "manufacturer"
                  },
                  "type": "textfield",
                  "input": true,
                  "hideOnChildrenHidden": false
                }
              ],
              "size": "md",
              "width": 3,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "currentWidth": 3
            }
          ],
          "key": "columns4",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Columns",
          "columns": [
            {
              "components": [
                
              ],
              "width": 6,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 6
            },
            {
              "components": [
                
              ],
              "width": 6,
              "offset": 0,
              "push": 0,
              "pull": 0,
              "size": "md",
              "currentWidth": 6
            }
          ],
          "key": "columns5",
          "type": "columns",
          "input": false,
          "tableView": false
        },
        {
          "label": "Comment",
          "autoExpand": false,
          "tableView": true,
          "key": "userComment",
          "type": "textarea",
          "input": true
        },
        {
          "label": "Final Comment to Send (hidden)",
          "autoExpand": false,
          "hidden": true,
          "tableView": true,
          "clearOnHide": false,
          "key": "comment",
          "properties": {
            "class": "note",
            "fhirElement": "Immunization.note"
          },
          "logic": [
            {
              "name": "Consent Given By Client",
              "trigger": {
                "type": "simple",
                "simple": {
                  "show": true,
                  "when": "consentGivenBy",
                  "eq": "C"
                }
              },
              "actions": [
                {
                  "name": "Concatenate",
                  "type": "value",
                  "value": "value = data.userComment + \" Consent Readiness: Consent Given By Client\""
                }
              ]
            },
            {
              "name": "Consent Not Obtained",
              "trigger": {
                "type": "simple",
                "simple": {
                  "show": true,
                  "when": "consentGivenBy",
                  "eq": ""
                }
              },
              "actions": [
                {
                  "name": "No Concatenate",
                  "type": "value",
                  "value": "value = data.userComment"
                }
              ]
            },
            {
              "name": "Consent Given By Minor",
              "trigger": {
                "type": "simple",
                "simple": {
                  "show": true,
                  "when": "consentGivenBy",
                  "eq": "MM"
                }
              },
              "actions": [
                {
                  "name": "Concatenate",
                  "type": "value",
                  "value": "value = data.userComment + \" Consent Readiness: Consent Given By Client (Mature Minor)\""
                }
              ]
            },
            {
              "name": "Consent Given By Sub",
              "trigger": {
                "type": "simple",
                "simple": {
                  "show": true,
                  "when": "consentGivenBy",
                  "eq": "SUBDECISIONMAKER"
                }
              },
              "actions": [
                {
                  "name": "Concatenate",
                  "type": "value",
                  "value": "if (data.personGivingConsentLastName || data.personGivingConsentFirstName) {\r\n  if (data.formOfConsent) {\r\n   value = data.userComment + \" Consent Readiness: Consent Given By Substitute Decision Maker\" + \" Name: \" + data.personGivingConsentFirstName + \" \" + data.personGivingConsentLastName + \" Form of Consent: \" + data.formOfConsent;\r\n  } else {\r\n   value = data.userComment + \" Consent Readiness: Consent Given By Substitute Decision Maker\" + \" Name: \" + data.personGivingConsentFirstName + \" \" + data.personGivingConsentLastName + \" Form of Consent: Not Specified\";\r\n  }\r\n} else {\r\n  if (data.formOfConsent) {\r\n   value = data.userComment + \" Consent Readiness: Consent Given By Substitute Decision Maker\" + \" Name: Not Specified\" + \" Form of Consent: \" + data.formOfConsent;\r\n  } else {\r\n   value = data.userComment + \" Consent Readiness: Consent Given By Substitute Decision Maker\" + \" Name: Not Specified\" + \" Form of Consent: Not Specified\";\r\n  }\r\n}"
                }
              ]
            }
          ],
          "type": "textarea",
          "input": true
        }
      ],
      "hideOnChildrenHidden": false
    },
    {
      "html": "<p style=\"text-align:center;\"><span class=\"text-small\">COVID-19 Immunization Entry Form V1.7</span></p>",
      "label": "Content",
      "refreshOnChange": false,
      "key": "content3",
      "type": "content",
      "input": false,
      "tableView": false
    }
  ]
},
{
  "label": "Submit",
  "showValidations": false,
  "tableView": false,
  "key": "submit",
  "type": "button",
  "input": true
}

], "revisions": "", "_vid": 0, "title": "EK-test-C19ImmzForm", "display": "form", "access": [ { "roles": [

  ],
  "type": "create_own"
},
{
  "roles": [
    
  ],
  "type": "create_all"
},
{
  "roles": [
    
  ],
  "type": "read_own"
},
{
  "roles": [
    "5d7a912e7e841ebcf4eec846",
    "5d7a912e7e841e0cb3eec847",
    "5d7a912e7e841e3e80eec848",
    "5d7a912e7e841e629eeec849",
    "5d7a912e7e841e3eabeec84a",
    "5d7a912e7e841eb439eec84b",
    "60df51745f0f605884fad49c"
  ],
  "type": "read_all"
},
{
  "roles": [
    
  ],
  "type": "update_own"
},
{
  "roles": [
    
  ],
  "type": "update_all"
},
{
  "roles": [
    
  ],
  "type": "delete_own"
},
{
  "roles": [
    
  ],
  "type": "delete_all"
},
{
  "roles": [
    
  ],
  "type": "team_read"
},
{
  "roles": [
    
  ],
  "type": "team_write"
},
{
  "roles": [
    
  ],
  "type": "team_admin"
}

], "submissionAccess": [ { "roles": [ "5d7a912e7e841e3e80eec848" ], "type": "create_own" }, { "roles": [

  ],
  "type": "create_all"
},
{
  "roles": [
    
  ],
  "type": "read_own"
},
{
  "roles": [
    
  ],
  "type": "read_all"
},
{
  "roles": [
    
  ],
  "type": "update_own"
},
{
  "roles": [
    
  ],
  "type": "update_all"
},
{
  "roles": [
    
  ],
  "type": "delete_own"
},
{
  "roles": [
    
  ],
  "type": "delete_all"
},
{
  "roles": [
    
  ],
  "type": "team_read"
},
{
  "roles": [
    
  ],
  "type": "team_write"
},
{
  "roles": [
    
  ],
  "type": "team_admin"
}

], "controller": "", "properties": { "httpResponse200": "Submission is successful. If there is any concern or question about the information submitted, someone may contact you." }, "settings": { "logs": "true" }, "name": "ekTestC19ImmzForm", "path": "ektestc19immzform", "project": "5d7a912e7e841ec64eeec845", "created": "2021-07-05T23:04:57.057Z", "modified": "2021-07-17T17:38:42.494Z", "machineName": "sandbox-phsaformrepository:ekTestC19ImmzForm" }