diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2edeafb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 \ No newline at end of file diff --git a/package.json b/package.json index a5e5b21..a9a3606 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,10 @@ "lint": "next lint" }, "dependencies": { + "next": "14.2.5", "react": "^18", "react-dom": "^18", - "next": "14.2.5" + "survey-core": "^1.11.8", + "survey-react-ui": "^1.11.8" } } diff --git a/src/app/form/[slug]/page.js b/src/app/form/[slug]/page.js new file mode 100644 index 0000000..96f05b4 --- /dev/null +++ b/src/app/form/[slug]/page.js @@ -0,0 +1,20 @@ +"use client"; + +import { slugify } from "@/utils"; +import { Model } from "survey-core"; +import { Survey } from "survey-react-ui"; +import { surveys } from "@/data"; + +import styles from "./page.module.css"; + +export default function Page({ params: { slug } }) { + const survey = surveys.find((x) => slugify(x.title) == slug); + + const model = new Model(survey); + + return ( +
+ +
+ ); +} diff --git a/src/app/form/[slug]/page.module.css b/src/app/form/[slug]/page.module.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/globals.css b/src/app/globals.css index f4bd77c..e69de29 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1,107 +0,0 @@ -:root { - --max-width: 1100px; - --border-radius: 12px; - --font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", - "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", - "Fira Mono", "Droid Sans Mono", "Courier New", monospace; - - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --background-end-rgb: 255, 255, 255; - - --primary-glow: conic-gradient( - from 180deg at 50% 50%, - #16abff33 0deg, - #0885ff33 55deg, - #54d6ff33 120deg, - #0071ff33 160deg, - transparent 360deg - ); - --secondary-glow: radial-gradient( - rgba(255, 255, 255, 1), - rgba(255, 255, 255, 0) - ); - - --tile-start-rgb: 239, 245, 249; - --tile-end-rgb: 228, 232, 233; - --tile-border: conic-gradient( - #00000080, - #00000040, - #00000030, - #00000020, - #00000010, - #00000010, - #00000080 - ); - - --callout-rgb: 238, 240, 241; - --callout-border-rgb: 172, 175, 176; - --card-rgb: 180, 185, 188; - --card-border-rgb: 131, 134, 135; -} - -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - - --primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0)); - --secondary-glow: linear-gradient( - to bottom right, - rgba(1, 65, 255, 0), - rgba(1, 65, 255, 0), - rgba(1, 65, 255, 0.3) - ); - - --tile-start-rgb: 2, 13, 46; - --tile-end-rgb: 2, 5, 19; - --tile-border: conic-gradient( - #ffffff80, - #ffffff40, - #ffffff30, - #ffffff20, - #ffffff10, - #ffffff10, - #ffffff80 - ); - - --callout-rgb: 20, 20, 20; - --callout-border-rgb: 108, 108, 108; - --card-rgb: 100, 100, 100; - --card-border-rgb: 200, 200, 200; - } -} - -* { - box-sizing: border-box; - padding: 0; - margin: 0; -} - -html, -body { - max-width: 100vw; - overflow-x: hidden; -} - -body { - color: rgb(var(--foreground-rgb)); - background: linear-gradient( - to bottom, - transparent, - rgb(var(--background-end-rgb)) - ) - rgb(var(--background-start-rgb)); -} - -a { - color: inherit; - text-decoration: none; -} - -@media (prefers-color-scheme: dark) { - html { - color-scheme: dark; - } -} diff --git a/src/app/layout.js b/src/app/layout.js index 9aef1df..bd5c35d 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -4,8 +4,8 @@ import "./globals.css"; const inter = Inter({ subsets: ["latin"] }); export const metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "SurveyJS NextJS", + description: "Demo of NextJS", }; export default function RootLayout({ children }) { diff --git a/src/app/page.js b/src/app/page.js index 1cb19f3..d1b7563 100644 --- a/src/app/page.js +++ b/src/app/page.js @@ -1,95 +1,15 @@ -import Image from "next/image"; +import { surveys } from "@/data"; import styles from "./page.module.css"; +import { SurveyListItem } from "@/components/survey-list-item"; export default function Home() { return ( -
-
-

- Get started by editing  - src/app/page.js -

-
- - By{" "} - Vercel Logo - -
-
- -
- Next.js Logo -
- -
- -

- Docs -> -

-

Find in-depth information about Next.js features and API.

-
- - -

- Learn -> -

-

Learn about Next.js in an interactive course with quizzes!

-
- - -

- Templates -> -

-

Explore starter templates for Next.js.

-
- - -

- Deploy -> -

-

- Instantly deploy your Next.js site to a shareable URL with Vercel. -

-
-
+
+
); } diff --git a/src/app/page.module.css b/src/app/page.module.css index 5c4b1e6..e69de29 100644 --- a/src/app/page.module.css +++ b/src/app/page.module.css @@ -1,230 +0,0 @@ -.main { - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - padding: 6rem; - min-height: 100vh; -} - -.description { - display: inherit; - justify-content: inherit; - align-items: inherit; - font-size: 0.85rem; - max-width: var(--max-width); - width: 100%; - z-index: 2; - font-family: var(--font-mono); -} - -.description a { - display: flex; - justify-content: center; - align-items: center; - gap: 0.5rem; -} - -.description p { - position: relative; - margin: 0; - padding: 1rem; - background-color: rgba(var(--callout-rgb), 0.5); - border: 1px solid rgba(var(--callout-border-rgb), 0.3); - border-radius: var(--border-radius); -} - -.code { - font-weight: 700; - font-family: var(--font-mono); -} - -.grid { - display: grid; - grid-template-columns: repeat(4, minmax(25%, auto)); - max-width: 100%; - width: var(--max-width); -} - -.card { - padding: 1rem 1.2rem; - border-radius: var(--border-radius); - background: rgba(var(--card-rgb), 0); - border: 1px solid rgba(var(--card-border-rgb), 0); - transition: background 200ms, border 200ms; -} - -.card span { - display: inline-block; - transition: transform 200ms; -} - -.card h2 { - font-weight: 600; - margin-bottom: 0.7rem; -} - -.card p { - margin: 0; - opacity: 0.6; - font-size: 0.9rem; - line-height: 1.5; - max-width: 30ch; - text-wrap: balance; -} - -.center { - display: flex; - justify-content: center; - align-items: center; - position: relative; - padding: 4rem 0; -} - -.center::before { - background: var(--secondary-glow); - border-radius: 50%; - width: 480px; - height: 360px; - margin-left: -400px; -} - -.center::after { - background: var(--primary-glow); - width: 240px; - height: 180px; - z-index: -1; -} - -.center::before, -.center::after { - content: ""; - left: 50%; - position: absolute; - filter: blur(45px); - transform: translateZ(0); -} - -.logo { - position: relative; -} -/* Enable hover only on non-touch devices */ -@media (hover: hover) and (pointer: fine) { - .card:hover { - background: rgba(var(--card-rgb), 0.1); - border: 1px solid rgba(var(--card-border-rgb), 0.15); - } - - .card:hover span { - transform: translateX(4px); - } -} - -@media (prefers-reduced-motion) { - .card:hover span { - transform: none; - } -} - -/* Mobile */ -@media (max-width: 700px) { - .content { - padding: 4rem; - } - - .grid { - grid-template-columns: 1fr; - margin-bottom: 120px; - max-width: 320px; - text-align: center; - } - - .card { - padding: 1rem 2.5rem; - } - - .card h2 { - margin-bottom: 0.5rem; - } - - .center { - padding: 8rem 0 6rem; - } - - .center::before { - transform: none; - height: 300px; - } - - .description { - font-size: 0.8rem; - } - - .description a { - padding: 1rem; - } - - .description p, - .description div { - display: flex; - justify-content: center; - position: fixed; - width: 100%; - } - - .description p { - align-items: center; - inset: 0 0 auto; - padding: 2rem 1rem 1.4rem; - border-radius: 0; - border: none; - border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25); - background: linear-gradient( - to bottom, - rgba(var(--background-start-rgb), 1), - rgba(var(--callout-rgb), 0.5) - ); - background-clip: padding-box; - backdrop-filter: blur(24px); - } - - .description div { - align-items: flex-end; - pointer-events: none; - inset: auto 0 0; - padding: 2rem; - height: 200px; - background: linear-gradient( - to bottom, - transparent 0%, - rgb(var(--background-end-rgb)) 40% - ); - z-index: 1; - } -} - -/* Tablet and Smaller Desktop */ -@media (min-width: 701px) and (max-width: 1120px) { - .grid { - grid-template-columns: repeat(2, 50%); - } -} - -@media (prefers-color-scheme: dark) { - .vercelLogo { - filter: invert(1); - } - - .logo { - filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70); - } -} - -@keyframes rotate { - from { - transform: rotate(360deg); - } - to { - transform: rotate(0deg); - } -} diff --git a/src/components/survey-list-item.js b/src/components/survey-list-item.js new file mode 100644 index 0000000..60633f4 --- /dev/null +++ b/src/components/survey-list-item.js @@ -0,0 +1,12 @@ +import { slugify } from "@/utils"; +import Link from "next/link"; + +export const SurveyListItem = ({ survey }) => { + console.log(survey); + return ( +
+

{survey.title}

+ Fill out form +
+ ); +}; diff --git a/src/data/cancellation.js b/src/data/cancellation.js new file mode 100644 index 0000000..a514893 --- /dev/null +++ b/src/data/cancellation.js @@ -0,0 +1,92 @@ +export const cancellation = { + title: "Cancellation Survey", + description: + "Thank you for using our service. We would highly appreciate if you would take the time to fill our cancellation survey. This would help us improve the service.", + pages: [ + { + name: "page1", + elements: [ + { + type: "radiogroup", + name: "using_duration", + title: "How long have you been using the service?", + choices: [ + "Less than a month", + "1-6 months", + "7-12 months", + "1-3 years", + "Over 3 years", + ], + }, + { + type: "radiogroup", + name: "using_frequency", + title: "How often did you use the service?", + choices: [ + "Once a week", + "2 or 3 times a month", + "Once a month", + "Less than once a month", + ], + }, + { + type: "radiogroup", + name: "cancel_reason", + title: "What was the main reason for cancelling the service?", + choices: [ + "No longer need it", + "It didn't meet my needs", + "Found a better alternative", + "Found a cheaper alternative", + "Quality was less than expected", + "Ease of use was less than expected", + "Access to the service was less than expected", + "Customer service was less than expected", + ], + showOtherItem: true, + }, + { + type: "radiogroup", + name: "satisfaction", + title: "Overall, how satisfied were you with the service?", + choices: [ + "Very Satisfied", + "Satisfied", + "Neutral", + "Unsatisfied", + "Very Unsatisfied", + ], + }, + { + type: "matrix", + name: "future_using", + titleLocation: "hidden", + columns: [ + "Definitely", + "Probably", + "Not Sure", + "Probably Not", + "Definitely Not", + ], + rows: [ + { + value: "use_in_future", + text: "Will you use our service in the future?", + }, + { + value: "recommend", + text: "Will you recommend our service to others?", + }, + ], + }, + { + type: "comment", + name: "service_improvements", + title: "How can we improve our service?", + maxLength: 500, + }, + ], + }, + ], + showQuestionNumbers: "off", +}; diff --git a/src/data/index.js b/src/data/index.js new file mode 100644 index 0000000..3efa99e --- /dev/null +++ b/src/data/index.js @@ -0,0 +1,17 @@ +import { cancellation } from "./cancellation"; +import { job } from "./job"; +import { medical } from "./medical"; +import { nps } from "./nps"; +import { patient } from "./patient"; +import { pizza } from "./pizza"; +import { productFeedback } from "./product-feedback"; + +export const surveys = [ + nps, + cancellation, + productFeedback, + medical, + pizza, + patient, + job +] \ No newline at end of file diff --git a/src/data/job.js b/src/data/job.js new file mode 100644 index 0000000..8742a62 --- /dev/null +++ b/src/data/job.js @@ -0,0 +1,138 @@ +export const job = { + "title": "Job Application Form", + "description": "Thank you for your interest in working with us. Please fill out the form and send your application. We will get back to you within a week.", + "logo": "https://api.surveyjs.io/private/Surveys/files?name=b4b071f2-c1f1-4887-a1de-8323825141b6", + "logoHeight": "100px", + "logoFit": "cover", + "logoPosition": "right", + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "panel", + "name": "personal-info", + "title": "Personal Information", + "elements": [ + { + "type": "text", + "name": "first-name", + "title": "First name", + "isRequired": true + }, + { + "type": "text", + "name": "last-name", + "startWithNewLine": false, + "title": "Last name", + "isRequired": true + }, + { + "type": "text", + "name": "birthdate", + "title": "Date of birth", + "isRequired": true, + "inputType": "date" + } + ] + }, + { + "type": "panel", + "name": "location", + "title": "Your Location", + "elements": [ + { + "type": "dropdown", + "name": "country", + "title": "Country", + "choicesByUrl": { + "url": "https://surveyjs.io/api/CountriesExample" + } + }, + { + "type": "text", + "name": "city", + "title": "City/Town" + }, + { + "type": "text", + "name": "zip", + "startWithNewLine": false, + "title": "Zip code", + "validators": [ + { + "type": "numeric" + } + ], + "inputType": "number" + }, + { + "type": "text", + "name": "address", + "title": "Street address" + } + ] + }, + { + "type": "text", + "name": "email", + "title": "Email", + "inputType": "email", + "placeholder": "mail@example.com" + }, + { + "type": "text", + "name": "salary", + "title": "Expected salary (in US dollars)", + "validators": [ + { + "type": "numeric" + } + ], + "inputType": "number" + }, + { + "type": "dropdown", + "name": "position", + "title": "What position are you applying for?", + "choices": [ + { + "value": "frontend", + "text": "Frontend Developer" + }, + { + "value": "backend", + "text": "Backend Developer" + }, + { + "value": "fullstack", + "text": "Full-Stack Developer" + }, + { + "value": "intern", + "text": "Intern" + } + ] + }, + { + "type": "text", + "name": "start-date", + "title": "Date available to start work", + "isRequired": true, + "inputType": "date" + }, + { + "type": "file", + "name": "resume", + "title": "Upload your resume", + "acceptedTypes": "application/pdf" + } + ] + } + ], + "showQuestionNumbers": "off", + "questionErrorLocation": "bottom", + "completeText": "Send", + "widthMode": "static", + "width": "800px" + } \ No newline at end of file diff --git a/src/data/medical.js b/src/data/medical.js new file mode 100644 index 0000000..bcd7c3f --- /dev/null +++ b/src/data/medical.js @@ -0,0 +1,1688 @@ +export const medical = { + "title": "Patient Past Medical, Social & Family History", + "pages": [ + { + "name": "introduction", + "title": "Introduction", + "elements": [ + { + "type": "panel", + "name": "patienName", + "questionTitleLocation": "bottom", + "title": "Patient Name", + "elements": [ + { + "type": "text", + "name": "patientLastName", + "title": "(Last)", + "isRequired": true + }, + { + "type": "text", + "name": "patienFirstName", + "startWithNewLine": false, + "title": "(First)", + "isRequired": true + }, + { + "type": "text", + "name": "patientMiddleName", + "title": "(M.I)" + } + ] + }, + { + "type": "panel", + "name": "panel2", + "questionTitleLocation": "left", + "title": "Social Security & Birth Date", + "elements": [ + { + "type": "text", + "name": "socialsecurity", + "title": "Social Security #:", + "isRequired": true + }, + { + "type": "text", + "name": "birthDate", + "startWithNewLine": false, + "title": "Date of birth:", + "isRequired": true, + "inputType": "date" + }, + { + "type": "radiogroup", + "name": "sex", + "title": "Sex:", + "isRequired": true, + "choices": [ + { + "value": "male", + "text": "Male" + }, + { + "value": "female", + "text": "Female" + } + ], + "colCount": 0 + } + ] + }, + { + "type": "panel", + "name": "panel1", + "title": "Completed By", + "elements": [ + { + "type": "radiogroup", + "name": "completedBy", + "title": "Who completed this form:", + "isRequired": true, + "choices": [ + { + "value": "patient", + "text": "Patient" + }, + { + "value": "spouse", + "text": "Spouse" + } + ], + "showOtherItem": true, + "otherText": "Other (specify)", + "colCount": 0 + }, + { + "type": "text", + "name": "completedByOtherName", + "visibleIf": "{completedBy} != \"patient\"", + "startWithNewLine": false, + "title": "Name (if other than patient):", + "isRequired": true + } + ] + } + ] + }, + { + "name": "medicalHistory", + "questionTitleLocation": "left", + "title": "Past Medical History", + "elements": [ + { + "type": "radiogroup", + "name": "everhospitalized", + "title": "Have you ever been hospitalized?", + "isRequired": true, + "choices": [ + { + "value": "no", + "text": "No" + }, + { + "value": "yes", + "text": "Yes" + } + ], + "colCount": 0 + }, + { + "type": "radiogroup", + "name": "injuriesbrokenbones", + "title": "Have you had any serious injuries and/or broken bones?", + "isRequired": true, + "choices": [ + { + "value": "no", + "text": "No" + }, + { + "value": "yes", + "text": "Yes" + } + ], + "colCount": 0 + }, + { + "type": "comment", + "name": "injuriesbrokenbones_describe", + "visible": false, + "visibleIf": "{injuriesbrokenbones} = \"yes\"", + "startWithNewLine": false, + "title": "Describe", + "isRequired": true + }, + { + "type": "radiogroup", + "name": "bloodtransfusion", + "title": "Have you ever received a blood transfusion?", + "isRequired": true, + "choices": [ + { + "value": "unknown", + "text": "Unknown" + }, + { + "value": "no", + "text": "No" + }, + { + "value": "yes", + "text": "Yes" + } + ], + "colCount": 0 + }, + { + "type": "text", + "name": "bloodtransfusion_years", + "visible": false, + "visibleIf": "{bloodtransfusion}=\"yes\"", + "startWithNewLine": false, + "title": "Approximate year(s)" + }, + { + "type": "radiogroup", + "name": "ousideUSACanada", + "title": "Have you ever traveled or lived outside the United States or Canada?", + "isRequired": true, + "choices": [ + { + "value": "no", + "text": "No" + }, + { + "value": "yes", + "text": "Yes" + } + ], + "colCount": 0 + }, + { + "type": "comment", + "name": "ousideUSACanada_describe", + "visible": false, + "visibleIf": "{ousideUSACanada} = \"yes\"", + "startWithNewLine": false, + "title": "Describe", + "isRequired": true + }, + { + "type": "matrixdropdown", + "name": "immunizations", + "title": "Have you received the following IMMUNIZATIONS? If yes, indicate the approximate year it was last given:", + "titleLocation": "top", + "columns": [ + { + "name": "answer", + "title": "Please select", + "cellType": "radiogroup", + "isRequired": true, + "choices": [ + { + "value": "unknown", + "text": "Unknown" + }, + { + "value": "no", + "text": "No" + }, + { + "value": "yes", + "text": "Yes" + } + ] + }, + { + "name": "year", + "title": "Year", + "cellType": "text", + "isRequired": true, + "visibleIf": "{row.answer} = \"yes\"" + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rows": [ + "Pneumococcal (for pneumonia)", + "Hepatitis A", + "Hepatitis B", + "Tetanus/Diphtheria within last 10 years", + "Influenza (flu)", + "Measles", + "Mumps", + "Rubella", + "Polio" + ] + }, + { + "type": "matrixdynamic", + "name": "problems1", + "title": "Have you ever had any of the following?", + "titleLocation": "top", + "columns": [ + { + "name": "problem", + "title": "Problem", + "cellType": "dropdown", + "choices": [ + "Abnormal chest x-ray", + "Anesthesia complications", + "Anxiety, depression or mental illness", + "Blood problems (abnormal bleeding, anemia, high or low white count)", + "Diabetes", + "Growth removed from the colon or rectum (polyp or tumor)", + "High blood pressure", + "High cholesterol or triglycerides", + "Sexually transmitted disease", + "Stroke or TIA", + "Treatment for alcohol and/or drug abuse", + "Tuberculosis or positive tuberculin skin test", + "Cosmetic or plastic surgery" + ] + }, + { + "name": "answer", + "title": "Please answer", + "cellType": "radiogroup", + "isRequired": true, + "choices": [ + { + "value": "no", + "text": "No" + }, + { + "value": "yes", + "text": "Yes" + } + ] + }, + { + "name": "description", + "title": "Describe the problem", + "cellType": "comment", + "isRequired": true, + "visibleIf": "{row.answer} = \"yes\"" + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rowCount": 1 + }, + { + "type": "matrixdynamic", + "name": "problems2", + "title": "Indicate whether you have ever had a medical problem and/or surgery related to each of the following", + "titleLocation": "top", + "columns": [ + { + "name": "problem", + "title": "Problem", + "cellType": "dropdown", + "isRequired": true, + "maxWidth": "300px", + "choices": [ + "Eyes (cataracts, glaucoma)", + "Ears, nose, sinuses, or tonsils", + "Thyroid or parathyroid glands", + "Heart valves or abnormal heart rhythm", + "Coronary (heart) arteries (angina)", + "Arteries (aorta, arteries to head, arms, legs) ", + "Veins or blood clots in the veins", + "Lungs", + "Esophagus or stomach (ulcer)", + "Bowel (small & large intestine)", + "Appendix", + "Liver or gallbladder (including hepatitis)", + "Hernia", + "Kidneys or bladder", + "Bones, joints or muscles", + "Back, neck or spine", + "Brain", + "Skin", + "Breasts", + "Females: uterus, tubes, ovaries", + "Males: prostate, penis, testes, vasectomy", + "Other: Describe" + ], + "choicesOrder": "asc" + }, + { + "name": "type", + "title": "Type", + "cellType": "checkbox", + "isRequired": true, + "choices": [ + { + "value": "medical", + "text": "Medical Problem" + }, + { + "value": "surgery", + "text": "Surgery" + } + ] + }, + { + "name": "year", + "title": "Year(s) of Surgery", + "cellType": "text", + "isRequired": true, + "visibleIf": "{row.type} contains \"surgery\"" + }, + { + "name": "describe", + "title": "Describe", + "cellType": "comment", + "isRequired": true + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rowCount": 1, + "addRowText": "Add Problem" + } + ] + }, + { + "name": "socialHistory", + "questionTitleLocation": "left", + "title": "Social History", + "elements": [ + { + "type": "panel", + "name": "education", + "title": "Education", + "elements": [ + { + "type": "dropdown", + "name": "schoolYearsCompleted", + "title": "How many yeas of school have you completed?", + "isRequired": true, + "choicesMax": 12 + } + ] + }, + { + "type": "panel", + "name": "occupations", + "title": "Occupations", + "elements": [ + { + "type": "radiogroup", + "name": "employmentStatus", + "title": "Your current employment status:", + "isRequired": true, + "choices": [ + "Retired", + "Unemployed", + "Homemaker", + "Employed" + ], + "colCount": 0 + }, + { + "type": "text", + "name": "currentOcupation", + "visible": false, + "visibleIf": "{employmentStatus} = 'Employed'", + "title": "Current Ocupation(s):", + "isRequired": true + }, + { + "type": "comment", + "name": "previousOccupations", + "title": "Previous Occupations/Jobs:" + } + ] + }, + { + "type": "panel", + "name": "disability", + "title": "Disability", + "elements": [ + { + "type": "radiogroup", + "name": "disabled", + "title": "Are you disabled?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "comment", + "name": "disableInfo", + "visible": false, + "visibleIf": "{disabled} = 'Yes'", + "title": "Info:" + } + ] + }, + { + "type": "panel", + "name": "abuse", + "title": "Abuse", + "elements": [ + { + "type": "radiogroup", + "name": "abused", + "title": "Have you even been physically, sexually, or emotionally abused?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "comment", + "name": "abusedInfo", + "visible": false, + "visibleIf": "{abused} = 'Yes'", + "title": "Info:" + }, + { + "type": "matrixdropdown", + "name": "subsctancesUsing", + "title": "Have you used any of the following substances?", + "titleLocation": "top", + "columns": [ + { + "name": "current", + "title": "Currently Use?", + "cellType": "radiogroup", + "isRequired": true, + "width": "200px", + "choices": [ + "No", + "Yes" + ] + }, + { + "name": "previous", + "title": "Previously Used?", + "cellType": "radiogroup", + "isRequired": true, + "width": "200px", + "choices": [ + "No", + "Yes" + ] + }, + { + "name": "amount", + "title": "Type/Amount/Frequancy", + "cellType": "text", + "isRequired": true, + "width": "200px", + "visibleIf": "{row.current} = 'Yes' or {row.previous} = 'Yes'" + }, + { + "name": "long", + "title": "How Long? (Years)", + "cellType": "text", + "isRequired": true, + "width": "200px", + "visibleIf": "{row.current} = 'Yes' or {row.previous} = 'Yes'" + }, + { + "name": "stopped", + "title": "When stopped? (Year)", + "cellType": "text", + "isRequired": true, + "width": "200px", + "visibleIf": "{row.previous} = 'Yes'" + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rows": [ + "Caffeine: coffee, tea, soda", + "Tobacco", + "Alcohol - bear, wine, liquor", + "Recreational/Street drugs" + ], + "rowTitleWidth": "200px" + } + ] + }, + { + "type": "panel", + "name": "maritalStatus", + "title": "Marital Status", + "elements": [ + { + "type": "radiogroup", + "name": "currentlyMarried", + "title": "Are you currently married?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "text", + "name": "currentMarriageYear", + "visible": false, + "visibleIf": "{currentlyMarried} = 'Yes'", + "startWithNewLine": false, + "title": "In what year did this marriage occure?", + "isRequired": true + }, + { + "type": "paneldynamic", + "name": "previousMarriages", + "title": "List all previous marriages", + "templateElements": [ + { + "type": "text", + "name": "previousMarriageYear", + "title": "Year married:", + "isRequired": true + }, + { + "type": "text", + "name": "previousMarriageDuration", + "startWithNewLine": false, + "title": "Duration (in Years):", + "isRequired": true + } + ], + "panelCount": 1, + "panelAddText": "Add marriage" + }, + { + "type": "panel", + "name": "currentSpouse", + "title": "Current Spouse Information", + "elements": [ + { + "type": "radiogroup", + "name": "currentSpouseStatus", + "title": " ", + "isRequired": true, + "choices": [ + "Not applicable", + "Alive", + "Deceased" + ], + "colCount": 0 + }, + { + "type": "text", + "name": "currentSpouseAge", + "visible": false, + "visibleIf": "{currentSpouseStatus} = 'Alive'", + "startWithNewLine": false, + "title": "Age", + "isRequired": true + }, + { + "type": "comment", + "name": "currentSpouseHelthProblems", + "visibleIf": "{currentSpouseStatus} != 'Not applicable' ", + "title": "Health problems or cause of death:", + "isRequired": true, + "rows": 2 + }, + { + "type": "radiogroup", + "name": "currentSpouseEmploymentStatus", + "visible": false, + "visibleIf": "{currentSpouseStatus} = 'Alive'", + "title": "Current employment status:", + "isRequired": true, + "choices": [ + "Retired", + "Unemployed", + "Homemaker", + "Employed" + ], + "colCount": 0 + } + ] + }, + { + "type": "text", + "name": "currentSpouseOccupation", + "visible": false, + "visibleIf": "{currentSpouseEmploymentStatus} = 'Employed'", + "title": "Current occupation(s):", + "isRequired": true + } + ] + } + ] + }, + { + "name": "familyHistory", + "questionTitleLocation": "left", + "title": "Family History", + "elements": [ + { + "type": "radiogroup", + "name": "adopted", + "title": "Are you adopted?", + "isRequired": true, + "choices": [ + "Yes", + "No" + ], + "colCount": 0 + }, + { + "type": "html", + "name": "adoptedInfo", + "visible": false, + "visibleIf": "{adopted} = 'Yes'", + "html": "If known, complete the following information about your blood relatives (include children). Exclude adoptive parents, siblings and adopted children." + }, + { + "type": "html", + "name": "nonAdoptedInfo", + "visible": false, + "visibleIf": "{adopted} = 'No'", + "html": "Complete the following information about your blood relatives. Exclude adoptive siblings and adopted children. " + }, + { + "type": "paneldynamic", + "name": "bloodRelativesInfo", + "title": "Blood relatives information", + "templateElements": [ + { + "type": "dropdown", + "name": "relativeType", + "title": "Blood Relative:", + "isRequired": true, + "choices": [ + "Father", + "Mother", + "Brother", + "Sister", + "Son", + "Daughter" + ] + }, + { + "type": "radiogroup", + "name": "relativeStatus", + "startWithNewLine": false, + "title": "Is he/she:", + "isRequired": true, + "choices": [ + "Alive", + "Deceased", + "Unknown" + ], + "colCount": 0 + }, + { + "type": "text", + "name": "relativeAge", + "visible": false, + "visibleIf": "{panel.relativeStatus} = 'Alive'", + "startWithNewLine": false, + "title": "Current age:", + "isRequired": true + }, + { + "type": "text", + "name": "relativeAgeOfDeath", + "visible": false, + "visibleIf": "{panel.relativeStatus} = 'Deceased'", + "startWithNewLine": false, + "title": "Age of death:", + "isRequired": true + }, + { + "type": "panel", + "name": "relativeDeathInfo", + "visible": false, + "visibleIf": "{panel.relativeStatus} = 'Deceased'", + "elements": [ + { + "type": "radiogroup", + "name": "relativeCauseOfDeath", + "title": "Cause of death:", + "isRequired": true, + "choices": [ + "Known", + "Unknown" + ], + "colCount": 0 + }, + { + "type": "comment", + "name": "relativeCauseOfDeathDescription", + "visible": false, + "visibleIf": "{panel.relativeCauseOfDeath} = 'Known'", + "title": "Description:", + "isRequired": true + } + ] + }, + { + "type": "matrixdynamic", + "name": "relativeCondition", + "title": "Describe the illness or conditios", + "titleLocation": "top", + "columns": [ + { + "name": "name", + "title": "Illness/Condition", + "cellType": "dropdown", + "isRequired": true, + "choices": [ + "Cancer", + "Heart Disease", + "Diabetes", + "Stroke/TIA", + "High Blood Pressure", + "High Cholesterol or Triglycerides", + "Liver Disease", + "Alcohol or Drug Abuse", + "Anxiety, Depression or Psychiatric Illness", + "Tuberculosis", + "Anesthesia Complications", + "Genetic Disorder", + "Other" + ] + }, + { + "name": "description", + "title": "Describe", + "cellType": "comment", + "isRequired": true + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rowCount": 1, + "addRowText": "Add illness" + } + ], + "panelCount": 1, + "panelAddText": "Add Family Member" + }, + { + "type": "comment", + "name": "relativesAdditionalInfo", + "title": "Other information about your family which you want us to know: " + } + ] + }, + { + "name": "healthcareProvider", + "questionTitleLocation": "left", + "title": "Healthcare Provider Information", + "elements": [ + { + "type": "radiogroup", + "name": "primaryCareProvider", + "title": "Do you have a Primary Care Provider?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "panel", + "name": "primaryCareProviderInfo", + "visible": false, + "visibleIf": "{primaryCareProvider} = 'Yes'", + "title": "Primary Care Provider", + "elements": [ + { + "type": "text", + "name": "primaryCareProviderName", + "title": "Name:", + "isRequired": true + }, + { + "type": "text", + "name": "primaryCareProviderPhone", + "startWithNewLine": false, + "title": "Phone:", + "isRequired": true + }, + { + "type": "comment", + "name": "primaryCareProviderAddress", + "title": "Address:" + }, + { + "type": "radiogroup", + "name": "primaryCareProviderSent", + "title": "Do you want a summary of your visit sent to this person?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + } + ] + }, + { + "type": "radiogroup", + "name": "primaryCareProviderRecommend", + "title": "Did a non-Vanderbilt physician or healthcare provider recommend or arrange this visit for you?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "panel", + "name": "primaryCareProviderRecommendInfo", + "visible": false, + "visibleIf": "{primaryCareProviderRecommend} = 'Yes'", + "elements": [ + { + "type": "radiogroup", + "name": "primaryCareProviderWhoSent", + "title": "Who sent you?", + "isRequired": true, + "choices": [ + { + "value": "primary", + "text": "Your Primary Care Provider (as listed above) " + }, + { + "value": "other", + "text": "Other physician or healthcare provider" + } + ], + "colCount": 0 + }, + { + "type": "panel", + "name": "primaryCareProviderOtherInfo", + "visible": false, + "visibleIf": "{primaryCareProviderWhoSent} = 'other'", + "title": "Other physician or healthcare provider", + "elements": [ + { + "type": "text", + "name": "primaryCareProviderOtherName", + "title": "Name:", + "isRequired": true + }, + { + "type": "text", + "name": "primaryCareProviderOtherPhone", + "startWithNewLine": false, + "title": "Phone:", + "isRequired": true + }, + { + "type": "comment", + "name": "primaryCareProviderOtherAddress", + "title": "Address:" + }, + { + "type": "radiogroup", + "name": "primaryCareProviderOtherSent", + "title": "Do you want a summary of your visit sent to this person?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + } + ] + } + ] + } + ] + }, + { + "name": "medications", + "title": "Medications", + "elements": [ + { + "type": "panel", + "name": "currentUsingMedication", + "title": "Medications currently using", + "elements": [ + { + "type": "radiogroup", + "name": "currentMedication", + "title": "Are you currently taking any prescription and/or non-prescription medications including vitamins, nutritional supplements, oral contraceptives, pain relievers, diuretics, laxatives, herbal remedies, and cold medications? ", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "matrixdynamic", + "name": "currentMedicationList", + "visible": false, + "visibleIf": "{currentMedication} = 'Yes'", + "title": "Medication list", + "description": "Please add all medication you are currently taking", + "columns": [ + { + "name": "name", + "title": "Name of Medication", + "cellType": "text", + "isRequired": true + }, + { + "name": "dose", + "title": "Dose", + "cellType": "text", + "isRequired": true + }, + { + "name": "often", + "title": "How Often Taken", + "cellType": "text", + "isRequired": true + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rowCount": 1, + "addRowText": "Add medication" + } + ] + }, + { + "type": "panel", + "name": "recentlyUsedMedication", + "title": "Medication recently used", + "elements": [ + { + "type": "radiogroup", + "name": "recentlyUsedMedication", + "title": "Are there other medications you have recently used?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "matrixdynamic", + "name": "recentlyUsedMedicationList", + "visible": false, + "visibleIf": "{recentlyUsedMedication} = 'Yes'", + "title": "Medication list", + "description": "Please add all medication you have recently used", + "columns": [ + { + "name": "name", + "title": "Name of Medication", + "cellType": "text", + "isRequired": true + }, + { + "name": "dose", + "title": "Dose", + "cellType": "text", + "isRequired": true + }, + { + "name": "often", + "title": "How Often Taken", + "cellType": "text", + "isRequired": true + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rowCount": 1, + "addRowText": "Add medication" + } + ] + }, + { + "type": "radiogroup", + "name": "aspirinContainingProducts", + "title": "Have you taken aspirin-containing products in the last two weeks?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "radiogroup", + "name": "steroidDrugs", + "title": "Have you taken steroid or cortisone-type drugs within the last year?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + } + ] + }, + { + "name": "allergies", + "title": "Allergies", + "elements": [ + { + "type": "panel", + "name": "allergiesMedication", + "title": "Allergies to Medication", + "elements": [ + { + "type": "radiogroup", + "name": "hasAllergiesMedication", + "title": "Have you had hives, skin rash, breathing problems, or other allergic reactions to medications?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "matrixdynamic", + "name": "allergiesMedicationList", + "visible": false, + "visibleIf": "{hasAllergiesMedication} = 'Yes'", + "title": "Medication list", + "columns": [ + { + "name": "name", + "title": "Name of Medication", + "cellType": "text", + "isRequired": true + }, + { + "name": "description", + "title": "Describe Allergic Reaction", + "cellType": "comment", + "isRequired": true + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rowCount": 1, + "addRowText": "Add medication" + } + ] + }, + { + "type": "panel", + "name": "unpleasentToMedication", + "title": "Unpleasant Side Effects to Medications", + "elements": [ + { + "type": "radiogroup", + "name": "hasUnpleasantMedication", + "title": "Are there medications, other than those you are allergic to, that you would prefer not to take due to prior unpleasant side effects?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "matrixdynamic", + "name": "unpleasantMedicationList", + "visible": false, + "visibleIf": "{hasUnpleasantMedication} = 'Yes'", + "title": "Medication list", + "columns": [ + { + "name": "name", + "title": "Name of Medication", + "cellType": "text", + "isRequired": true + }, + { + "name": "description", + "title": "Describe the Reaction", + "cellType": "text", + "isRequired": true + } + ], + "choices": [ + 1, + 2, + 3, + 4, + 5 + ], + "rowCount": 1, + "addRowText": "Add medication" + }, + { + "type": "panel", + "name": "allergiesReaction", + "questionTitleLocation": "left", + "title": "Have you had an allergic reaction to:", + "elements": [ + { + "type": "radiogroup", + "name": "allergicReactionXRay", + "title": "Iodine or X-ray contrast dye", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "radiogroup", + "name": "allergicReactionBee", + "startWithNewLine": false, + "title": "Bee or wasp stings", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "radiogroup", + "name": "allergicReactionLatext", + "title": "Latex or Rubber", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "radiogroup", + "name": "allergicReactionTape", + "startWithNewLine": false, + "title": "Adhesive tape", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + } + ] + } + ] + }, + { + "type": "panel", + "name": "foodAllergiesInfo", + "questionTitleLocation": "left", + "title": "Food Allergies", + "elements": [ + { + "type": "radiogroup", + "name": "hasFoodAllergies", + "title": "Do you have any food allergies?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "comment", + "name": "foodAllergiesDescription", + "visible": false, + "visibleIf": "{hasFoodAllergies} = 'Yes'", + "title": "Describe" + } + ] + } + ] + }, + { + "name": "systemsReview", + "questionTitleLocation": "left", + "title": "System Review", + "elements": [ + { + "type": "matrix", + "name": "sympthoms", + "title": "Indicate whether you have experienced the following symptoms during recent months, unless otherwise specified", + "titleLocation": "top", + "isRequired": true, + "columns": [ + "No", + "Yes" + ], + "rows": [ + "Skin rash, sore, excessive bruising or change of a mole?", + "Excessive thirst or urination?", + "Change in sexual drive or performance?", + "Significant headaches, seizures, slurred speech or difficulty moving an arm or leg?", + "Eye problems such as double or blurred vision, cataracts or glaucoma?", + "Diminished hearing, dizziness, hoarseness or sinus problems?", + { + "value": "dentures", + "text": "Do you wear dentures?" + }, + "Bothered with cough, shortness of breath, wheezing or asthma?", + "Coughing up sputum or blood?", + "Exposed to anyone with tuberculosis?", + "“Blacked out” or lost consciousness?", + "Chest pain or pressure, rapid or irregular heart beats, or known difficulty with a heart valve?", + "Awakening at night with shortness of breath?", + "Abnormal swelling in the legs or feet?", + "Pain in the calves of your legs when you walk?", + "Difficulty with swallowing, heartburn, nausea, vomiting or stomach trouble?", + "Significant problems with constipation, diarrhea, blood/changes in bowel movements?", + { + "value": "colon_rectum_x-ray", + "text": "Have you had a colon or rectum x-ray or instrument examination (proctoscopy, sigmoidoscopy, colonoscopy)?" + }, + { + "value": "endoscopy", + "text": "Have you had an upper endoscopy to evaluate the stomach for varices?" + }, + "Have you had any treatment for varices? (sclerotherapy, banding)", + "Difficulty starting your urinary stream, completely emptying your bladder or leaking urine from your bladder?", + "Burning or pain when urinating?", + "Pain, stiffness or swelling in your back, joints or muscles?", + "Fever within the last month?", + "Enlarged glands (lymph nodes)?", + "Feel you are at risk for HIV or AIDS?", + "Immunized for influenza, tetanus/diphtheria and/or pneumonia within the last year?", + "Experiencing an unusually stressful situation?", + "Weight gain or loss of more than 10 pounds during the last 6 months?", + "Problems falling asleep, staying asleep, sleep apnea or disruptive snoring?", + "Have you ever felt a need to cut down on your alcohol consumption?", + "Do relatives/friends worry or complain about your alcohol consumption?", + "Have you been physically, sexually, or emotionally abused?" + ], + "isAllRowRequired": true + }, + { + "type": "radiogroup", + "name": "howWearDentures", + "visible": false, + "visibleIf": "{sympthoms.dentures} = 'Yes'", + "title": "How do you wear dentures?", + "isRequired": true, + "choices": [ + " Ful", + "Upper", + "Lower", + "Partial" + ], + "colCount": 0 + }, + { + "type": "multipletext", + "name": "colonRectumDate", + "visible": false, + "visibleIf": "{sympthoms.colon_rectum_x-ray} = 'Yes'", + "title": "Whe did you do a colon or rectum x-ray or instrument examination (proctoscopy, sigmoidoscopy, colonoscopy)? Approximate date:", + "isRequired": true, + "items": [ + { + "name": "mo", + "title": "Month" + }, + { + "name": "year", + "title": "Year" + } + ], + "colCount": 2 + }, + { + "type": "multipletext", + "name": "endoscopyDate", + "visible": false, + "visibleIf": "{sympthoms.endoscopy} = 'Yes'", + "title": "Whe did you have an upper endoscopy to evaluate the stomach for varices? Approximate date:", + "isRequired": true, + "items": [ + { + "name": "mo", + "title": "Month" + }, + { + "name": "year", + "title": "Year" + } + ], + "colCount": 2 + }, + { + "type": "panel", + "name": "questionsToFemale", + "visible": false, + "visibleIf": "{sex} = 'female'", + "title": "For Female Patients", + "elements": [ + { + "type": "radiogroup", + "name": "abnormalPapSmear", + "title": "Have you ever had an abnormal Pap smear?", + "isRequired": true, + "choices": [ + "Unknown", + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "radiogroup", + "name": "menopause", + "title": "Have you experienced menopause or had a hysterectomy?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "panel", + "name": "panelNoMenopause", + "visible": false, + "visibleIf": "{menopause} = 'No'", + "elements": [ + { + "type": "radiogroup", + "name": "concernedAboutMenstrualPeriods", + "title": "Are you concerned about your menstrual periods?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "radiogroup", + "name": "pregnant", + "title": "Might you be pregnant at this time?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "text", + "name": "lastMenstrualPeriod", + "title": "Date of onset of your last menstrual period:", + "inputType": "date" + }, + { + "type": "panel", + "name": "panelPapSmearExam", + "elements": [ + { + "type": "radiogroup", + "name": "papSmearExam", + "title": "Have you ever done Pap smear and pelvic exam:", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "multipletext", + "name": "papSmearExamDate", + "visible": false, + "visibleIf": "{papSmearExam} = 'Yes'", + "title": "Approximate date of your last Pap smear and pelvic exam:", + "isRequired": true, + "items": [ + { + "name": "mo", + "title": "Month" + }, + { + "name": "year", + "title": "Year" + } + ], + "colCount": 2 + }, + { + "type": "radiogroup", + "name": "mammogram", + "title": "Have you ever done mammogram:", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "multipletext", + "name": "mammogramDate", + "visible": false, + "visibleIf": "{mammogram} = 'Yes'", + "title": "Approximate date of your last mammogram:", + "isRequired": true, + "items": [ + { + "name": "mo", + "title": "Month" + }, + { + "name": "year", + "title": "Year" + } + ], + "colCount": 2 + } + ] + }, + { + "type": "panel", + "name": "panelPregnancies", + "title": "Number of:", + "elements": [ + { + "type": "text", + "name": "pregnancies", + "title": "Pregnancies:", + "isRequired": true, + "inputType": "number" + }, + { + "type": "text", + "name": "liveBirths", + "startWithNewLine": false, + "title": "Live Births:", + "isRequired": true, + "inputType": "number" + }, + { + "type": "text", + "name": "abortions", + "startWithNewLine": false, + "title": "Miscarriages/abortions:", + "isRequired": true, + "inputType": "number", + "min": 0 + } + ] + } + ] + } + ] + } + ] + }, + { + "name": "selfCare", + "questionTitleLocation": "top", + "title": "Self-Care/Home Environment Assessment", + "elements": [ + { + "type": "matrix", + "name": "performingActivities", + "title": "Do you have difficulty performing these activities by YOURSELF?", + "columns": [ + "No", + "Yes" + ], + "rows": [ + "Eating", + "Bathing", + "Dressing", + "Walking", + "Using Toilet", + "Housekeeping" + ], + "isAllRowRequired": true + }, + { + "type": "radiogroup", + "name": "specialDietary", + "title": "Do you have any special dietary needs?", + "isRequired": true, + "choices": [ + "No", + "Yes" + ], + "colCount": 0 + }, + { + "type": "comment", + "name": "specialDietaryDescription", + "visibleIf": "{specialDietary} = 'Yes'", + "title": "Please describe your special dietery:", + "isRequired": true + }, + { + "type": "radiogroup", + "name": "livingArrangement", + "title": "What is your current living arrangement?", + "isRequired": true, + "choices": [ + "House", + "Apartment", + "Nursing Home" + ], + "showOtherItem": true, + "colCount": 0 + }, + { + "type": "radiogroup", + "name": "liveWithWhom", + "title": "Do you live?", + "isRequired": true, + "choices": [ + "Alone", + "With Spouse/Family", + "With others" + ], + "colCount": 0 + }, + { + "type": "comment", + "name": "liveWithWhomDescription", + "visibleIf": "{liveWithWhom} = 'With others'", + "title": "Please describe with whom do you live:", + "isRequired": true + }, + { + "type": "comment", + "name": "peopleProvidedAssistence", + "title": "List family or friends able to provide assistance with your homecare needs if you would ever require such assistance:", + "titleLocation": "top" + } + ] + }, + { + "name": "educationalNeeds", + "title": "Educational Needs", + "elements": [ + { + "type": "checkbox", + "name": "interestedInTopics", + "title": "Are you interested in more information about a specific topic(s)?", + "choices": [ + "How to stop smoking", + "Exercise", + "Stress", + "Safe sexual practices", + "Safety (seat belts, smoke detectors, firearms)", + "Nutrition", + "Weight control", + "Violent & abusive behavior", + "Living wills", + "Diabetes", + "Cancer screening " + ], + "showOtherItem": true, + "colCount": 3 + } + ] + } + ], + "showQuestionNumbers": "off", + "questionErrorLocation": "bottom", + "showProgressBar": "top" + } \ No newline at end of file diff --git a/src/data/nps.js b/src/data/nps.js new file mode 100644 index 0000000..71015ea --- /dev/null +++ b/src/data/nps.js @@ -0,0 +1,206 @@ +export const nps = { + "title": "NPS Demo", + "completedHtmlOnCondition": [ + { + "expression": "{nps-score} <= 6 or {rebuy} = false", + "html": { + "default": "Thanks for your feedback! We highly value all ideas and suggestions from our customers, whether they're positive or critical. In the future, our team might reach out to you to learn more about how we can further improve our product so that it exceeds your expectations.", + "fr": "Merci pour vos commentaires! Nous accordons une grande importance à toutes les idées et suggestions de nos clients, qu'elles soient positives ou critiques. À l'avenir, notre équipe pourrait vous contacter pour en savoir plus sur la façon dont nous pouvons encore améliorer notre produit afin qu'il dépasse vos attentes." + } + }, + { + "expression": "{nps-score} = 6 or {nps-score} = 7", + "html": { + "default": "Thanks for your feedback. Our goal is to create the best possible product, and your thoughts, ideas, and suggestions play a major role in helping us identify opportunities to improve.", + "fr": "Merci pour vos commentaires. Notre objectif est de créer le meilleur produit possible, et vos réflexions, idées et suggestions jouent un rôle majeur pour nous aider à identifier les opportunités d'amélioration." + } + }, + { + "expression": "{nps-score} >= 8", + "html": { + "default": "Thanks for your feedback. It's great to hear that you're a fan of our product. Your feedback helps us discover new opportunities to improve it and make sure you have the best possible experience.", + "fr": "Merci pour vos commentaires. Nous sommes ravis d'entendre que vous avez apprécié notre produit. Vos commentaires nous aident à découvrir de nouvelles opportunités pour l'améliorer et vous assurer la meilleure expérience possible." + } + } + ], + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "rating", + "name": "nps-score", + "title": { + "default": "On a scale from 0 to 10, how likely are you to recommend us to a friend or colleague?", + "fr": "Sur une échelle de 0 à 10, quelle est la probabilité que vous recommandiez notre produit à un ami ou à un collègue?" + }, + "rateCount": 11, + "rateMin": 0, + "rateMax": 10, + "minRateDescription": { + "default": "Very unlikely", + "fr": "Très improbable" + }, + "maxRateDescription": { + "default": "Very likely", + "fr": "Très probable" + }, + "rateDescriptionLocation": "bottom" + }, + { + "type": "comment", + "name": "disappointing-experience", + "visibleIf": "{nps-score} <= 5", + "title": { + "default": "How did we disappoint you and what can we do to make things right?", + "fr": "Nous n'avons pas été a la hauteur de vos attentes, comment pouvons-nous améliorer?" + }, + "maxLength": 300 + }, + { + "type": "comment", + "name": "improvements-required", + "visibleIf": "{nps-score} >= 6", + "title": { + "default": "What can we do to make your experience more satisfying?", + "fr": "Que pouvons-nous faire pour rendre votre expérience plus satisfaisante?" + }, + "maxLength": 300 + }, + { + "type": "checkbox", + "name": "promoter-features", + "visibleIf": "{nps-score} >= 9", + "title": { + "default": "Which of the following features do you value the most?", + "fr": "Laquelle des fonctionnalités suivantes appréciez-vous le plus ?" + }, + "description": { + "default": "Please select no more than three features.", + "fr": "Veuillez ne pas sélectionner plus de trois fonctionnalités." + }, + "isRequired": true, + "choices": [ + { + "value": "performance", + "text": "Performance" + }, + { + "value": "stability", + "text": { + "default": "Stability", + "fr": "Stabilité" + } + }, + { + "value": "ui", + "text": { + "default": "User interface", + "fr": "Interface utilisateur" + } + }, + { + "value": "complete-functionality", + "text": { + "default": "Complete functionality", + "fr": "Ensemble des fonctionnalités" + } + }, + { + "value": "learning-materials", + "text": { + "default": "Learning materials (documentation, demos, code examples)", + "fr": "Matériel d'apprentissage (documentation, démos, exemples de code)" + } + }, + { + "value": "support", + "text": { + "default": "Quality support", + "fr": "Accompagnement de qualité" + } + } + ], + "showOtherItem": true, + "otherPlaceholder": { + "default": "Please specify...", + "fr": "Veuillez préciser..." + }, + "otherText": { + "default": "Other features", + "fr": "Autres fonctionnalités" + }, + "colCount": 2, + "maxSelectedChoices": 3 + } + ] + }, + { + "name": "page2", + "elements": [ + { + "type": "boolean", + "name": "rebuy", + "title": { + "default": "Would you buy our product again?", + "fr": "Achèteriez-vous à nouveau notre produit?" + } + } + ] + }, + { + "name": "page3", + "elements": [ + { + "type": "radiogroup", + "name": "testimonial", + "title": { + "default": "Would you mind providing us a brief testimonial for the website?", + "fr": "Accepteriez-vous de rédiger un bref commentaire pour notre site Internet?" + }, + "choices": [ + { + "value": "yes", + "text": { + "default": "Sure!", + "fr": "Bien sur!" + } + }, + { + "value": "no", + "text": { + "default": "No", + "fr": "Non merci." + } + } + ] + }, + { + "type": "text", + "name": "email", + "visibleIf": "{testimonial} = 'yes'", + "title": { + "default": "What is your email address?", + "fr": "Quelle est votre adresse e-mail?" + }, + "validators": [ + { + "type": "email" + } + ], + "placeholder": { + "default": "Enter your email here", + "fr": "Veuillez saisir votre adresse e-mail ici" + } + } + ] + } + ], + "showPrevButton": false, + "showQuestionNumbers": "off", + "completeText": { + "fr": "Envoyer" + }, + "widthMode": "static", + "width": "1000px" + } \ No newline at end of file diff --git a/src/data/patient.js b/src/data/patient.js new file mode 100644 index 0000000..7a62b2b --- /dev/null +++ b/src/data/patient.js @@ -0,0 +1,702 @@ +export const patient = { + "title": "Patient Assessment Form", + "logoPosition": "right", + "pages": [ + { + "name": "Patient information", + "title": "Patient information", + "elements": [ + { + "type": "panel", + "name": "patient-information", + "title": "All fields with an asterisk (*) are required fields, and must be filled out in order to process the information in strict confidentiality.", + "elements": [ + { + "type": "text", + "name": "first-name", + "title": "First name", + "isRequired": true + }, + { + "type": "text", + "name": "last-name", + "startWithNewLine": false, + "title": "Last name", + "isRequired": true + }, + { + "type": "text", + "name": "ssn", + "title": "Social Security number", + "isRequired": true, + "requiredErrorText": "You SSN must be a 9-digit number.", + "validators": [ + { + "type": "regex", + "text": "Your SSN must be a 9-digit number", + "regex": "^(?!0{3})(?!6{3})[0-8]\\d{2}-?(?!0{2})\\d{2}-?(?!0{4})\\d{4}$" + } + ], + "maxLength": 9 + }, + { + "type": "text", + "name": "birthdate", + "startWithNewLine": false, + "title": "Date of birth", + "isRequired": true, + "inputType": "date" + }, + { + "type": "text", + "name": "concerns", + "title": "List any concerns you want to talk about during your visit" + } + ] + } + ] + }, + { + "name": "Health history", + "title": "Health history", + "elements": [ + { + "type": "panel", + "name": "health-history", + "elements": [ + { + "type": "boolean", + "name": "diabetes", + "startWithNewLine": false, + "title": "Do you have diabetes?" + }, + { + "type": "boolean", + "name": "high-blood-pressure", + "startWithNewLine": false, + "title": "High blood pressure?" + }, + { + "type": "boolean", + "name": "high-cholesterol", + "startWithNewLine": false, + "title": "High cholesterol?" + }, + { + "type": "comment", + "name": "other-health-conditions", + "title": "Do you have other health conditions?", + "maxLength": 300 + } + ] + } + ] + }, + { + "name": "Social history", + "title": "Social history", + "elements": [ + { + "type": "panel", + "name": "social-history", + "elements": [ + { + "type": "panel", + "name": "smoking", + "elements": [ + { + "type": "radiogroup", + "name": "cigarettes", + "title": "Do you smoke cigarettes?", + "choices": [ + { + "value": "never", + "text": "Never" + }, + { + "value": "yes", + "text": "Yes" + }, + { + "value": "quit", + "text": "Quit" + } + ] + }, + { + "type": "text", + "name": "packs-a-day", + "visibleIf": "{cigarettes} = 'yes'", + "title": "How many packs a day?", + "inputType": "number", + "min": 0 + }, + { + "type": "multipletext", + "name": "smoking-history", + "visibleIf": "{cigarettes} = 'quit'", + "titleLocation": "hidden", + "items": [ + { + "name": "date-quit", + "inputType": "date", + "title": "Date quit", + "maxValueExpression": "today()" + }, + { + "name": "years-smoked", + "inputType": "number", + "title": "Years smoked" + } + ] + }, + { + "type": "boolean", + "name": "vape", + "title": "Do you vape (e-cigarettes)?" + } + ] + }, + { + "type": "panel", + "name": "alcohol-use-history", + "startWithNewLine": false, + "elements": [ + { + "type": "boolean", + "name": "alcohol", + "title": "Do you drink alcohol?" + }, + { + "type": "text", + "name": "drinks-per-week", + "visibleIf": "{alcohol} = true", + "title": "How many drinks per week?" + } + ] + }, + { + "type": "panel", + "name": "drug-use-history", + "elements": [ + { + "type": "checkbox", + "name": "recreational-drugs", + "title": "Do you use recreational drugs?", + "choices": [ + { + "value": "rarely", + "text": "Rarely" + }, + { + "value": "marijuana", + "text": "Marijuana" + }, + { + "value": "cocaine", + "text": "Cocaine" + }, + { + "value": "opioids", + "text": "Opioids" + } + ], + "showOtherItem": true, + "showNoneItem": true, + "otherPlaceholder": "Please specify... ", + "noneText": "Never", + "otherText": "Other", + "colCount": 3 + }, + { + "type": "text", + "name": "drug-use-times-per-month", + "visibleIf": "{recreational-drugs} anyof ['rarely', 'marijuana', 'cocaine', 'opioids', 'other']", + "title": "How many times per month", + "description": "If you take different types of drugs, please specify the frequency of use for each in a 'drug - # times/month' format." + } + ] + }, + { + "type": "panel", + "name": "personal-info", + "elements": [ + { + "type": "dropdown", + "name": "education", + "title": "What is your highest level of education completed?", + "choices": [ + { + "value": "high-school", + "text": "High School" + }, + { + "value": "trade-school", + "text": "Trade School" + }, + { + "value": "college", + "text": "College" + }, + { + "value": "post-graduate", + "text": "Post-graduate degree(s)" + } + ] + }, + { + "type": "dropdown", + "name": "marital-status", + "title": "What is your marital status?", + "choices": [ + { + "value": "married", + "text": "Married" + }, + { + "value": "partnership", + "text": "Partnership" + }, + { + "value": "divorced", + "text": "Divorced" + }, + { + "value": "separated", + "text": "Separated" + }, + { + "value": "single", + "text": "Single" + }, + { + "value": "widow", + "text": "Widow(er)" + } + ] + }, + { + "type": "panel", + "name": "sexual-life", + "elements": [ + { + "type": "boolean", + "name": "sexually-active", + "title": "Are you sexually active?" + }, + { + "type": "text", + "name": "sexual-partners-number", + "title": "How many sexual partners do you have?", + "inputType": "number", + "min": 0 + }, + { + "type": "radiogroup", + "name": "sexual-partners-gender", + "titleLocation": "hidden", + "choices": [ + { + "value": "men", + "text": "Men" + }, + { + "value": "women", + "text": "Women" + }, + { + "value": "both", + "text": "Both" + } + ], + "colCount": 3 + }, + { + "type": "radiogroup", + "name": "contraception", + "title": "Do you use contraception?", + "showCommentArea": true, + "commentText": "If yes, what method?", + "choices": [ + { + "value": "yes", + "text": "Yes" + }, + { + "value": "no", + "text": "No" + } + ] + } + ] + } + ] + }, + { + "type": "panel", + "name": "employment-exercises-children", + "startWithNewLine": false, + "elements": [ + { + "type": "radiogroup", + "name": "employment", + "title": "Are you employed?", + "showCommentArea": true, + "commentText": "Type of work", + "choices": [ + { + "value": "yes", + "text": "Yes" + }, + { + "value": "no", + "text": "No" + }, + { + "value": "retired", + "text": "Retired" + } + ], + "colCount": 3 + }, + { + "type": "panel", + "name": "physical-activity", + "elements": [ + { + "type": "radiogroup", + "name": "do-exercise", + "title": "Do you exercise?", + "choices": [ + { + "value": "yes", + "text": "Yes" + }, + { + "value": "no", + "text": "No" + } + ], + "colCount": 2 + }, + { + "type": "multipletext", + "name": "activities", + "visibleIf": "{do-exercise} = 'yes'", + "titleLocation": "hidden", + "items": [ + { + "name": "activity-type", + "title": "Type of activity" + }, + { + "name": "activity-frequency", + "title": "How often" + }, + { + "name": "activity-duration", + "title": "How long per activity" + } + ] + } + ] + }, + { + "type": "panel", + "name": "children", + "elements": [ + { + "type": "boolean", + "name": "have-children", + "title": "Do you have children?" + }, + { + "type": "multipletext", + "name": "children-ages", + "visibleIf": "{have-children} = true", + "titleLocation": "hidden", + "items": [ + { + "name": "children-number", + "title": "# of children" + }, + { + "name": "ages", + "title": "Their ages" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "name": "Surgical history / recent hospitalizations", + "title": "Surgical history / recent hospitalizations", + "elements": [ + { + "type": "comment", + "name": "surgery-description", + "title": "Date and type of surgery / procedure" + } + ] + }, + { + "name": "Family history", + "title": "Family history", + "elements": [ + { + "type": "matrixdynamic", + "name": "family-history", + "titleLocation": "hidden", + "columns": [ + { + "name": "relation", + "title": "Relation" + }, + { + "name": "health-conditions", + "title": "Health conditions" + }, + { + "name": "cancer-history", + "title": "Family history of cancer" + } + ], + "cellType": "text" + } + ] + }, + { + "name": "Preventive care", + "title": "Preventive care", + "elements": [ + { + "type": "panel", + "name": "preventive-care", + "elements": [ + { + "type": "panel", + "name": "recent-shots-panel", + "elements": [ + { + "type": "matrixdropdown", + "name": "recent-shots", + "title": "Recent shots from a doctor or pharmacist", + "columns": [ + { + "name": "date", + "title": "Date" + }, + { + "name": "place", + "title": "Place" + } + ], + "cellType": "text", + "rows": [ + { + "value": "flu", + "text": "Flu" + }, + { + "value": "shingles", + "text": "Shingles" + }, + { + "value": "pneumonia", + "text": "Pneumonia" + }, + { + "value": "tetanus", + "text": "Tetanus" + }, + { + "value": "other", + "text": "Other" + } + ] + } + ] + }, + { + "type": "panel", + "name": "recent-tests-panel", + "startWithNewLine": false, + "elements": [ + { + "type": "matrixdropdown", + "name": "recent-tests", + "title": "Recent tests or procedures", + "columns": [ + { + "name": "date", + "title": "Date" + }, + { + "name": "place", + "title": "Place" + } + ], + "cellType": "text", + "rows": [ + { + "value": "colonoscopy", + "text": "Colonoscopy" + }, + { + "value": "cologuard", + "text": "Cologuard" + }, + { + "value": "mammogram", + "text": "Mammogram" + }, + { + "value": "pap", + "text": "PAP" + }, + { + "value": "other", + "text": "Other" + } + ] + } + ] + }, + { + "type": "panel", + "name": "specialists-panel", + "elements": [ + { + "type": "matrixdynamic", + "name": "specialists", + "title": "Specialists", + "columns": [ + { + "name": "provider", + "title": "Provider's first and last name" + }, + { + "name": "speciality", + "title": "Speciality" + }, + { + "name": "city", + "title": "Town/City" + } + ], + "cellType": "text", + "rowCount": 1 + } + ] + }, + { + "type": "panel", + "name": "medications-and-allergies", + "elements": [ + { + "type": "multipletext", + "name": "medications", + "title": "Medications", + "items": [ + { + "name": "medication-name", + "title": "Name" + }, + { + "name": "medication-dose", + "title": "Dose" + }, + { + "name": "medication-times-per-day", + "title": "Times per day" + } + ] + }, + { + "type": "multipletext", + "name": "allergies", + "startWithNewLine": false, + "title": "Allergies", + "items": [ + { + "name": "allergy-type", + "title": "Type" + }, + { + "name": "allergy-reaction", + "title": "Reaction" + } + ] + } + ] + } + ] + } + ] + }, + { + "name": "Symptoms", + "title": "Symptoms", + "elements": [ + { + "type": "tagbox", + "name": "symptoms", + "title": "Please select any symptoms you have now or have had in the past month.", + "choices": [ + "Fever", + "Chills", + "Feeling poorly", + "Feeling tired", + "Weight gain", + "Weight loss", + "Chest pain", + "Heart pounding", + "Fast pulse", + "Slow pulse", + "Leg pain with exercise", + "Leg swelling", + "Joint pain", + "Neck pain", + "Joint swelling", + "Joint stiffness", + "Muscle aches", + "Back pain", + "Sores", + "Rash", + "Itching", + "Change in a mole", + "Unusual growth/spot" + ] + }, + { + "type": "signaturepad", + "name": "signature", + "title": "Signature:", + "titleLocation": "left" + }, + { + "type": "text", + "name": "current-date", + "startWithNewLine": false, + "title": "Today's date:", + "titleLocation": "left", + "defaultValueExpression": "today()", + "inputType": "date" + } + ] + } + ], + "showQuestionNumbers": "off", + "questionErrorLocation": "bottom", + "showTOC": true, + "completeText": "Submit", + "showPreviewBeforeComplete": "showAllQuestions", + "widthMode": "static", + "width": "1200px" + } \ No newline at end of file diff --git a/src/data/pizza.js b/src/data/pizza.js new file mode 100644 index 0000000..bbd37bf --- /dev/null +++ b/src/data/pizza.js @@ -0,0 +1,361 @@ +export const pizza = { + "title": "Pizza Order Form", + "logoPosition": "right", + "completedHtml": "

Thank you for placing the order!

", + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "panel", + "name": "neapolitan", + "elements": [ + { + "type": "expression", + "name": "price_n", + "minWidth": "220px", + "title": "Pizza Neapolitan", + "description": "tomato sauce, mozzarella, anchovies, bazil", + "descriptionLocation": "underTitle", + "expression": "5 + {size_n}", + "displayStyle": "currency" + }, + { + "type": "image", + "name": "pic_n", + "width": "180px", + "minWidth": "180px", + "maxWidth": "180px", + "startWithNewLine": false, + "imageLink": "https://api.surveyjs.io/private/Surveys/files?name=c5b0302a-d6c8-46b4-ac57-7d519d0df0d1", + "contentMode": "image", + "imageFit": "cover", + "imageHeight": 80, + "imageWidth": 180 + }, + { + "type": "dropdown", + "name": "size_n", + "minWidth": "220px", + "title": "Size", + "titleLocation": "left", + "defaultValue": 1, + "choices": [ + { + "value": 0, + "text": "Small" + }, + { + "value": 1, + "text": "Medium" + }, + { + "value": 2, + "text": "Large" + } + ], + "allowClear": false + }, + { + "type": "dropdown", + "name": "qty_n", + "minWidth": "220px", + "startWithNewLine": false, + "title": "Qty", + "titleLocation": "left", + "choices": [ + 1, + 2, + 3, + 4, + 5 + ] + } + ] + }, + { + "type": "panel", + "name": "pepperoni", + "elements": [ + { + "type": "expression", + "name": "price_p", + "title": "Pepperoni", + "titleLocation": "top", + "description": "tomato sauce, pepperoni, red peppers, onion", + "expression": "5 + {size_p}", + "displayStyle": "currency" + }, + { + "type": "image", + "name": "pic_p", + "width": "180px", + "minWidth": "180px", + "maxWidth": "180px", + "startWithNewLine": false, + "imageLink": "https://api.surveyjs.io/private/Surveys/files?name=8bcd88b7-df19-466d-8622-19100e400383", + "contentMode": "image", + "imageFit": "cover", + "imageHeight": 80, + "imageWidth": 180 + }, + { + "type": "dropdown", + "name": "size_p", + "minWidth": "220px", + "title": "Size", + "titleLocation": "left", + "defaultValue": 1, + "choices": [ + { + "value": 0, + "text": "Small" + }, + { + "value": 1, + "text": "Medium" + }, + { + "value": 2, + "text": "Large" + } + ], + "allowClear": false + }, + { + "type": "dropdown", + "name": "qty_p", + "minWidth": "220px", + "startWithNewLine": false, + "title": "Qty", + "titleLocation": "left", + "choices": [ + 1, + 2, + 3, + 4, + 5 + ] + } + ] + }, + { + "type": "panel", + "name": "marinara", + "elements": [ + { + "type": "expression", + "name": "price_m", + "title": "Marinara", + "description": "tomato sauce, tuna, shrimps, mushrooms, cheese, onion", + "expression": "5 + {size_m}", + "displayStyle": "currency" + }, + { + "type": "image", + "name": "pic_m", + "width": "180px", + "minWidth": "180px", + "maxWidth": "180px", + "startWithNewLine": false, + "imageLink": "https://api.surveyjs.io/private/Surveys/files?name=24735b69-0ffe-4e49-9c90-1d9db1c8b83b", + "contentMode": "image", + "imageFit": "cover", + "imageHeight": 80, + "imageWidth": 180 + }, + { + "type": "dropdown", + "name": "size_m", + "minWidth": "220px", + "title": "Size", + "titleLocation": "left", + "defaultValue": 1, + "choices": [ + { + "value": 0, + "text": "Small" + }, + { + "value": 1, + "text": "Medium" + }, + { + "value": 2, + "text": "Large" + } + ], + "allowClear": false + }, + { + "type": "dropdown", + "name": "qty_m", + "minWidth": "220px", + "startWithNewLine": false, + "title": "Qty", + "titleLocation": "left", + "choices": [ + 1, + 2, + 3, + 4, + 5 + ] + } + ] + }, + { + "type": "expression", + "name": "question5", + "title": "Total", + "expression": "{price_n} * {qty_n} + {price_m} * {qty_m} + {price_p} * {qty_p}", + "displayStyle": "currency" + } + ] + }, + { + "name": "page2", + "elements": [ + { + "type": "panel", + "name": "toppings-panel", + "elements": [ + { + "type": "checkbox", + "name": "toppings", + "title": "Toppings", + "choices": [ + "Olives", + "Mozzarella", + "Mushrooms", + "Red pepper", + "Pepperoni", + "Shrimps" + ], + "colCount": 3 + } + ] + }, + { + "type": "panel", + "name": "delivery-panel", + "elements": [ + { + "type": "boolean", + "name": "need-delivery", + "title": "Would you like the order delivered?", + "defaultValue": "false" + }, + { + "type": "text", + "name": "pickup-date", + "visibleIf": "{need-delivery} = false", + "title": "Pickup Date", + "inputType": "date" + }, + { + "type": "text", + "name": "Pickup-time", + "visibleIf": "{need-delivery} = false", + "startWithNewLine": false, + "title": "Pickup Time", + "isRequired": true, + "inputType": "time" + }, + { + "type": "text", + "name": "delivery-address", + "visibleIf": "{need-delivery} = true", + "title": "Delivery Address" + }, + { + "type": "text", + "name": "delivery-date", + "visibleIf": "{need-delivery} = true", + "title": "Delivery Date", + "isRequired": true, + "inputType": "date" + }, + { + "type": "text", + "name": "delivery-time", + "visibleIf": "{need-delivery} = true", + "startWithNewLine": false, + "title": "Delivery Time", + "isRequired": true, + "inputType": "time" + } + ] + } + ] + }, + { + "name": "page3", + "elements": [ + { + "type": "panel", + "name": "contacts", + "elements": [ + { + "type": "text", + "name": "phone", + "title": "Phone number", + "autocomplete": "tel", + "maskType": "pattern", + "maskSettings": { + "saveMaskedValue": true, + "pattern": "+1 (999) 999-99-99" + } + }, + { + "type": "text", + "name": "email", + "startWithNewLine": false, + "title": "Email", + "validators": [ + { + "type": "email", + "text": "Please enter a valid email in the example@example.com format." + } + ], + "inputType": "email", + "autocomplete": "email", + "placeholder": "Enter your email to receive an order confirmation and a receipt" + } + ] + }, + { + "type": "panel", + "name": "full-name-panel", + "elements": [ + { + "type": "multipletext", + "name": "full-name", + "title": "Full name", + "items": [ + { + "name": "first-name", + "title": "First name" + }, + { + "name": "last-name", + "title": "Last name" + } + ] + } + ] + }, + { + "type": "html", + "name": "question4", + "html": "