[{"data":1,"prerenderedAt":1297},["ShallowReactive",2],{"navigation_docs":3,"-docs-builder-formula-editor":586,"-docs-builder-formula-editor-surround":1292},[4,8,46,68,82,148,173,219,256,266,276,313,347,361,379,437,467,481,543,581],{"title":5,"path":6,"stem":7},"Learn EVAL","/docs","docs/0.index",{"title":9,"path":10,"stem":11,"children":12},"Introduction","/docs/introduction","docs/01.introduction/0.index",[13,14,18,22,26,30,34,38,42],{"title":9,"path":10,"stem":11},{"title":15,"path":16,"stem":17},"What is EVAL Health","/docs/introduction/what-is-eval","docs/01.introduction/1.what-is-eval",{"title":19,"path":20,"stem":21},"Key concepts","/docs/introduction/key-concepts","docs/01.introduction/2.key-concepts",{"title":23,"path":24,"stem":25},"Navigating EVAL","/docs/introduction/navigation","docs/01.introduction/3.navigation",{"title":27,"path":28,"stem":29},"Account types and plans","/docs/introduction/account-types","docs/01.introduction/4.account-types",{"title":31,"path":32,"stem":33},"Getting started: clinical providers","/docs/introduction/getting-started-clinician","docs/01.introduction/5.getting-started-clinician",{"title":35,"path":36,"stem":37},"Getting started: building evaluations","/docs/introduction/getting-started-builder","docs/01.introduction/6.getting-started-builder",{"title":39,"path":40,"stem":41},"Getting started: administrators","/docs/introduction/getting-started-admin","docs/01.introduction/7.getting-started-admin",{"title":43,"path":44,"stem":45},"Getting started: patient portal","/docs/introduction/getting-started-patient","docs/01.introduction/8.getting-started-patient",{"title":47,"path":48,"stem":49,"children":50},"Marketplace","/docs/marketplace","docs/02.marketplace/0.index",[51,52,56,60,64],{"title":47,"path":48,"stem":49},{"title":53,"path":54,"stem":55},"Browsing the Marketplace","/docs/marketplace/browsing","docs/02.marketplace/1.browsing",{"title":57,"path":58,"stem":59},"Search","/docs/marketplace/search","docs/02.marketplace/2.search",{"title":61,"path":62,"stem":63},"Collections","/docs/marketplace/collections","docs/02.marketplace/3.collections",{"title":65,"path":66,"stem":67},"Evaluation preview","/docs/marketplace/evaluation-preview","docs/02.marketplace/4.evaluation-preview",{"title":69,"path":70,"stem":71,"children":72},"Library","/docs/library","docs/03.library/0.index",[73,74,78],{"title":69,"path":70,"stem":71},{"title":75,"path":76,"stem":77},"Folders","/docs/library/folders","docs/03.library/1.folders",{"title":79,"path":80,"stem":81},"Folder permissions","/docs/library/permissions","docs/03.library/2.permissions",{"title":83,"path":84,"stem":85,"children":86},"Builder","/docs/builder","docs/04.builder/0.index",[87,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144],{"title":83,"path":84,"stem":85},{"title":89,"path":90,"stem":91},"General tab","/docs/builder/general-tab","docs/04.builder/01.general-tab",{"title":93,"path":94,"stem":95},"Content tab","/docs/builder/content-tab","docs/04.builder/02.content-tab",{"title":97,"path":98,"stem":99},"Sections","/docs/builder/sections","docs/04.builder/03.sections",{"title":101,"path":102,"stem":103},"Questions","/docs/builder/questions","docs/04.builder/04.questions",{"title":105,"path":106,"stem":107},"Question types","/docs/builder/question-types","docs/04.builder/05.question-types",{"title":109,"path":110,"stem":111},"Results and scoring","/docs/builder/results","docs/04.builder/06.results",{"title":113,"path":114,"stem":115},"Formula editor","/docs/builder/formula-editor","docs/04.builder/07.formula-editor",{"title":117,"path":118,"stem":119},"Scenario testing","/docs/builder/scenario-testing","docs/04.builder/08.scenario-testing",{"title":121,"path":122,"stem":123},"Visibility rules","/docs/builder/visibility-rules","docs/04.builder/09.visibility-rules",{"title":125,"path":126,"stem":127},"Publishing","/docs/builder/publishing","docs/04.builder/10.publishing",{"title":129,"path":130,"stem":131},"Evaluations","/docs/builder/evaluations","docs/04.builder/11.evaluations",{"title":133,"path":134,"stem":135},"Media","/docs/builder/media","docs/04.builder/12.media",{"title":137,"path":138,"stem":139},"Error resolution","/docs/builder/error-resolution","docs/04.builder/13.error-resolution",{"title":141,"path":142,"stem":143},"AI Builder","/docs/builder/ai-builder","docs/04.builder/14.ai-builder",{"title":145,"path":146,"stem":147},"Embedded evaluations","/docs/builder/embedded-evaluations","docs/04.builder/15.embedded-evaluations",{"title":129,"path":149,"stem":150,"children":151},"/docs/evaluations","docs/05.evaluations/0.index",[152,153,157,161,165,169],{"title":129,"path":149,"stem":150},{"title":154,"path":155,"stem":156},"The Player","/docs/evaluations/player","docs/05.evaluations/1.player",{"title":158,"path":159,"stem":160},"About page","/docs/evaluations/about","docs/05.evaluations/2.about",{"title":162,"path":163,"stem":164},"Revisions","/docs/evaluations/revisions","docs/05.evaluations/3.revisions",{"title":166,"path":167,"stem":168},"Permissions","/docs/evaluations/permissions","docs/05.evaluations/4.permissions",{"title":170,"path":171,"stem":172},"Actions and sharing","/docs/evaluations/menu-options","docs/05.evaluations/5.menu-options",{"title":174,"path":175,"stem":176,"children":177},"Care Panels","/docs/care-panels","docs/06.care-panels/0.index",[178,179,183,187,191,195,199,203,207,211,215],{"title":174,"path":175,"stem":176},{"title":180,"path":181,"stem":182},"Creating and configuring panels","/docs/care-panels/creating-and-configuring","docs/06.care-panels/01.creating-and-configuring",{"title":184,"path":185,"stem":186},"Tracking results","/docs/care-panels/tracking-results","docs/06.care-panels/02.tracking-results",{"title":188,"path":189,"stem":190},"Managing patients","/docs/care-panels/managing-patients","docs/06.care-panels/03.managing-patients",{"title":192,"path":193,"stem":194},"Scheduling assessments","/docs/care-panels/scheduling-assessments","docs/06.care-panels/04.scheduling-assessments",{"title":196,"path":197,"stem":198},"Filtering and exporting data","/docs/care-panels/filters-and-export","docs/06.care-panels/05.filters-and-export",{"title":200,"path":201,"stem":202},"Panel visibility","/docs/care-panels/panel-visibility","docs/06.care-panels/06.panel-visibility",{"title":204,"path":205,"stem":206},"Panel roles and permissions","/docs/care-panels/panel-roles-and-permissions","docs/06.care-panels/07.panel-roles-and-permissions",{"title":208,"path":209,"stem":210},"Collecting responses with public intakes","/docs/care-panels/collecting-responses","docs/06.care-panels/08.collecting-responses",{"title":212,"path":213,"stem":214},"Notifications and alerts","/docs/care-panels/notifications-and-alerts","docs/06.care-panels/09.notifications-and-alerts",{"title":216,"path":217,"stem":218},"Common workflows","/docs/care-panels/common-workflows","docs/06.care-panels/10.common-workflows",{"title":220,"path":221,"stem":222,"children":223},"Patients","/docs/patients","docs/08.patients/0.index",[224,225,228,232,236,240,244,248,252],{"title":220,"path":221,"stem":222},{"title":188,"path":226,"stem":227},"/docs/patients/managing-patients","docs/08.patients/01.managing-patients",{"title":229,"path":230,"stem":231},"Patient charts","/docs/patients/charts","docs/08.patients/02.charts",{"title":233,"path":234,"stem":235},"Reviewing results","/docs/patients/patient-results","docs/08.patients/03.patient-results",{"title":237,"path":238,"stem":239},"Running an evaluation","/docs/patients/running-an-evaluation","docs/08.patients/04.running-an-evaluation",{"title":241,"path":242,"stem":243},"Medical information","/docs/patients/patient-medical-tab","docs/08.patients/05.patient-medical-tab",{"title":245,"path":246,"stem":247},"Medical data types","/docs/patients/patient-medical-data-types","docs/08.patients/06.patient-medical-data-types",{"title":249,"path":250,"stem":251},"Patient identity and demographics","/docs/patients/patient-identity-tab","docs/08.patients/07.patient-identity-tab",{"title":253,"path":254,"stem":255},"Patient portal connections","/docs/patients/patient-portal-tab","docs/08.patients/08.patient-portal-tab",{"title":257,"path":258,"stem":259,"children":260},"Schedules","/docs/schedule","docs/09.schedule/0.index",[261,262],{"title":257,"path":258,"stem":259},{"title":263,"path":264,"stem":265},"Creating and managing schedules","/docs/schedule/creating-schedules","docs/09.schedule/1.creating-schedules",{"title":267,"path":268,"stem":269,"children":270},"Results","/docs/results","docs/10.results/0.index",[271,272],{"title":267,"path":268,"stem":269},{"title":273,"path":274,"stem":275},"Filtering and exporting results","/docs/results/filtering-and-export","docs/10.results/1.filtering-and-export",{"title":277,"path":278,"stem":279,"children":280},"Patient Portal","/docs/patient-portal","docs/11.patient-portal/0.index",[281,282,286,290,294,297,301,305,309],{"title":277,"path":278,"stem":279},{"title":283,"path":284,"stem":285},"Today dashboard","/docs/patient-portal/today","docs/11.patient-portal/1.today",{"title":287,"path":288,"stem":289},"Completing an evaluation","/docs/patient-portal/completing-an-evaluation","docs/11.patient-portal/2.completing-an-evaluation",{"title":291,"path":292,"stem":293},"Viewing results","/docs/patient-portal/results","docs/11.patient-portal/3.results",{"title":257,"path":295,"stem":296},"/docs/patient-portal/schedules","docs/11.patient-portal/4.schedules",{"title":298,"path":299,"stem":300},"Task links","/docs/patient-portal/task-links","docs/11.patient-portal/5.task-links",{"title":302,"path":303,"stem":304},"Public intakes","/docs/patient-portal/public-intakes","docs/11.patient-portal/6.public-intakes",{"title":306,"path":307,"stem":308},"Account and settings","/docs/patient-portal/account","docs/11.patient-portal/7.account",{"title":310,"path":311,"stem":312},"How practitioners use the Patient Portal","/docs/patient-portal/practitioner-workflows","docs/11.patient-portal/8.practitioner-workflows",{"title":314,"path":315,"stem":316,"children":317},"Account Administration","/docs/account-administration","docs/12.account-administration/0.index",[318,319,323,327,331,335,339,343],{"title":314,"path":315,"stem":316},{"title":320,"path":321,"stem":322},"Organization profile","/docs/account-administration/organization-profile","docs/12.account-administration/1.organization-profile",{"title":324,"path":325,"stem":326},"Managing team members","/docs/account-administration/managing-team-members","docs/12.account-administration/2.managing-team-members",{"title":328,"path":329,"stem":330},"Roles and permissions","/docs/account-administration/roles-and-permissions","docs/12.account-administration/3.roles-and-permissions",{"title":332,"path":333,"stem":334},"Managing evaluations","/docs/account-administration/managing-evaluations","docs/12.account-administration/4.managing-evaluations",{"title":336,"path":337,"stem":338},"Billing and subscriptions","/docs/account-administration/billing-and-subscriptions","docs/12.account-administration/5.billing-and-subscriptions",{"title":340,"path":341,"stem":342},"API keys","/docs/account-administration/api-keys","docs/12.account-administration/6.api-keys",{"title":344,"path":345,"stem":346},"Account settings","/docs/account-administration/settings","docs/12.account-administration/7.settings",{"title":348,"path":349,"stem":350,"children":351},"My Profile","/docs/my-profile","docs/13.my-profile/0.index",[352,353,357],{"title":348,"path":349,"stem":350},{"title":354,"path":355,"stem":356},"Contact and profile","/docs/my-profile/contact-and-profile","docs/13.my-profile/1.contact-and-profile",{"title":358,"path":359,"stem":360},"Security and notifications","/docs/my-profile/security-and-notifications","docs/13.my-profile/2.security-and-notifications",{"title":362,"path":363,"stem":364,"children":365},"Integrations","/docs/integrations","docs/14.integrations/0.index",[366,367,371,375],{"title":362,"path":363,"stem":364},{"title":368,"path":369,"stem":370},"Creating connections","/docs/integrations/creating-connections","docs/14.integrations/1.creating-connections",{"title":372,"path":373,"stem":374},"Managing connections","/docs/integrations/managing-connections","docs/14.integrations/2.managing-connections",{"title":376,"path":377,"stem":378},"FHIR and SMART on FHIR","/docs/integrations/fhir-and-smart","docs/14.integrations/3.fhir-and-smart",{"title":380,"path":381,"stem":382,"children":383},"Guides","/docs/guides","docs/15.guides/0.index",[384,385,389,393,397,401,433],{"title":380,"path":381,"stem":382},{"title":386,"path":387,"stem":388},"Planning","/docs/guides/planning","docs/15.guides/1.planning",{"title":390,"path":391,"stem":392},"Data","/docs/guides/data","docs/15.guides/2.data",{"title":394,"path":395,"stem":396},"Logic","/docs/guides/logic","docs/15.guides/3.logic",{"title":398,"path":399,"stem":400},"Design","/docs/guides/design","docs/15.guides/4.design",{"title":402,"path":403,"stem":404,"children":405},"Evaluation Reference","/docs/guides/evaluation-reference","docs/15.guides/5.evaluation-reference/0.index",[406,407,411,415,418,422,426,430],{"title":402,"path":403,"stem":404},{"title":408,"path":409,"stem":410},"Intro to Evaluations","/docs/guides/evaluation-reference/intro-to-evaluations","docs/15.guides/5.evaluation-reference/1.intro-to-evaluations",{"title":412,"path":413,"stem":414},"Menu Options","/docs/guides/evaluation-reference/menu-options","docs/15.guides/5.evaluation-reference/2.menu-options",{"title":162,"path":416,"stem":417},"/docs/guides/evaluation-reference/revisions","docs/15.guides/5.evaluation-reference/3.revisions",{"title":419,"path":420,"stem":421},"Learn More","/docs/guides/evaluation-reference/learn-more","docs/15.guides/5.evaluation-reference/4.learn-more",{"title":423,"path":424,"stem":425},"Download Results","/docs/guides/evaluation-reference/download-results","docs/15.guides/5.evaluation-reference/5.download-results",{"title":427,"path":428,"stem":429},"Security in Emailing Results","/docs/guides/evaluation-reference/security-emailing-results","docs/15.guides/5.evaluation-reference/6.security-emailing-results",{"title":166,"path":431,"stem":432},"/docs/guides/evaluation-reference/permissions","docs/15.guides/5.evaluation-reference/7.permissions",{"title":434,"path":435,"stem":436},"Player Reference","/docs/guides/player-reference","docs/15.guides/6.player-reference",{"title":438,"path":439,"stem":440,"children":441},"Tutorials","/docs/tutorials","docs/16.tutorials/0.index",[442,443,447,451,455,459,463],{"title":438,"path":439,"stem":440},{"title":444,"path":445,"stem":446},"101: Basic Evaluation with Visibility Rules","/docs/tutorials/basic-eval-with-visibility-rules","docs/16.tutorials/1.basic-eval-with-visibility-rules",{"title":448,"path":449,"stem":450},"Build a PHQ-9 depression screener","/docs/tutorials/build-a-phq9-screener","docs/16.tutorials/2.build-a-phq9-screener",{"title":452,"path":453,"stem":454},"Set up a care panel","/docs/tutorials/set-up-a-care-panel","docs/16.tutorials/3.set-up-a-care-panel",{"title":456,"path":457,"stem":458},"Connect Epic to EVAL","/docs/tutorials/connect-epic-to-eval","docs/16.tutorials/4.connect-epic-to-eval",{"title":460,"path":461,"stem":462},"Create a scheduled assessment","/docs/tutorials/create-a-scheduled-assessment","docs/16.tutorials/5.create-a-scheduled-assessment",{"title":464,"path":465,"stem":466},"Onboard patients via the patient portal","/docs/tutorials/onboard-patients-via-portal","docs/16.tutorials/6.onboard-patients-via-portal",{"title":468,"path":469,"stem":470,"children":471},"Troubleshooting","/docs/troubleshooting","docs/17.troubleshooting/0.index",[472,473,477],{"title":468,"path":469,"stem":470},{"title":474,"path":475,"stem":476},"Builder errors","/docs/troubleshooting/builder-errors","docs/17.troubleshooting/1.builder-errors",{"title":478,"path":479,"stem":480},"EHR connection issues","/docs/troubleshooting/ehr-connection-issues","docs/17.troubleshooting/2.ehr-connection-issues",{"title":482,"path":483,"stem":484,"children":485},"Reference","/docs/reference","docs/18.reference/0.index",[486,487,491,494,498,502,528,532,536,539],{"title":482,"path":483,"stem":484},{"title":488,"path":489,"stem":490},"Account","/docs/reference/account","docs/18.reference/1.account",{"title":166,"path":492,"stem":493},"/docs/reference/permissions","docs/18.reference/2.permissions",{"title":495,"path":496,"stem":497},"Administration","/docs/reference/administration","docs/18.reference/3.administration",{"title":499,"path":500,"stem":501},"Security and privacy","/docs/reference/security-privacy","docs/18.reference/4.security-privacy",{"title":503,"path":504,"stem":505,"children":506},"Charts","/docs/reference/charts","docs/18.reference/5.charts/0.index",[507,508,512,516,520,524],{"title":503,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"Introduction to charts","/docs/reference/charts/intro","docs/18.reference/5.charts/1.intro",{"title":513,"path":514,"stem":515},"Patient evaluations","/docs/reference/charts/patient-evaluations","docs/18.reference/5.charts/2.patient-evaluations",{"title":517,"path":518,"stem":519},"Charts Landing Page","/docs/reference/charts/charts-landing-page","docs/18.reference/5.charts/3.charts-landing-page",{"title":521,"path":522,"stem":523},"Patient Medical","/docs/reference/charts/patient-medical","docs/18.reference/5.charts/4.patient-medical",{"title":525,"path":526,"stem":527},"Patient Identity","/docs/reference/charts/patient-identity","docs/18.reference/5.charts/5.patient-identity",{"title":529,"path":530,"stem":531},"Verified Accounts","/docs/reference/verified-accounts","docs/18.reference/6.verified-accounts",{"title":533,"path":534,"stem":535},"Account Creation","/docs/reference/account-creation","docs/18.reference/7.account-creation",{"title":348,"path":537,"stem":538},"/docs/reference/my-profile","docs/18.reference/8.my-profile",{"title":540,"path":541,"stem":542},"IT Deployment Strategy","/docs/reference/it-deployment","docs/18.reference/9.it-deployment",{"title":544,"path":545,"stem":546,"children":547},"Legal","/docs/legal","docs/19.legal/0.index",[548,549,553,557,561,565,569,573,577],{"title":544,"path":545,"stem":546},{"title":550,"path":551,"stem":552},"Terms of service","/docs/legal/terms-of-service","docs/19.legal/1.terms-of-service",{"title":554,"path":555,"stem":556},"Privacy policy","/docs/legal/privacy-policy","docs/19.legal/2.privacy-policy",{"title":558,"path":559,"stem":560},"HIPAA BAA","/docs/legal/hipaa-baa","docs/19.legal/3.hipaa-baa",{"title":562,"path":563,"stem":564},"GDPR DPA","/docs/legal/gdpr-dpa","docs/19.legal/4.gdpr-dpa",{"title":566,"path":567,"stem":568},"Patient privacy policy","/docs/legal/patient-privacy-policy","docs/19.legal/5.patient-privacy-policy",{"title":570,"path":571,"stem":572},"Free open source app license","/docs/legal/free-open-source-license","docs/19.legal/6.free-open-source-license",{"title":574,"path":575,"stem":576},"Limited open source app license","/docs/legal/limited-open-source-license","docs/19.legal/7.limited-open-source-license",{"title":578,"path":579,"stem":580},"Data sub-processors","/docs/legal/data-sub-processors","docs/19.legal/8.data-sub-processors",{"title":141,"path":582,"stem":583,"children":584},"/docs/ai-builder","docs/21.ai-builder/0.index",[585],{"title":141,"path":582,"stem":583},{"id":587,"title":113,"body":588,"description":1284,"extension":1285,"links":1286,"meta":1287,"navigation":1289,"path":114,"seo":1290,"stem":115,"__hash__":1291},"docs/docs/04.builder/07.formula-editor.md",{"type":589,"value":590,"toc":1258},"minimark",[591,596,609,612,619,623,641,645,657,660,663,681,687,690,715,722,728,737,757,761,764,777,783,797,801,805,808,880,884,887,913,948,971,1002,1019,1022,1026,1032,1038,1044,1050,1054,1058,1061,1093,1097,1101,1108,1111,1141,1151,1157,1160,1166,1170,1173,1177,1180,1191,1195,1201,1204,1208,1219,1223,1226,1230,1233,1240,1244],[592,593,595],"h2",{"id":594},"what-the-formula-editor-does","What the formula editor does",[597,598,599,600,604,605,608],"p",{},"The formula editor is where you write the logic that powers your evaluation's calculations. It's used in two places: ",[601,602,603],"strong",{},"formula results"," (to compute clinical scores) and ",[601,606,607],{},"visibility rule conditions"," (to write true/false logic that controls when elements appear). The same editor and syntax work in both contexts.",[597,610,611],{},"EVAL's formula engine supports standard spreadsheet syntax — if you've written formulas in Excel or Google Sheets, you already know the basics. You reference your evaluation's questions through keywords, build expressions with arithmetic and functions, and EVAL computes the result in real time.",[597,613,614],{},[615,616],"img",{"alt":617,"src":618},"Builder — Formula Editor Overview","/screenshots/builder/formula-editor.png",[592,620,622],{"id":621},"the-three-components","The three components",[597,624,625,626,629,630,632,633,636,637,640],{},"The formula editor has three sections that work together to define your logic. When you open the formula editor by clicking the ",[601,627,628],{},"Expression"," field on a formula result, you'll see all three sections in one view: the ",[601,631,628],{}," at the top, ",[601,634,635],{},"Keywords"," in the middle, and ",[601,638,639],{},"Named Expressions"," at the bottom.",[642,643,628],"h3",{"id":644},"expression",[597,646,647,648,652,653,656],{},"The expression is your main formula — the calculation that produces the final output. You write it in a text area using standard spreadsheet syntax. For formula results, the expression produces a numeric value (or text). For visibility rules, it must evaluate to ",[649,650,651],"code",{},"true"," or ",[649,654,655],{},"false",".",[597,658,659],{},"Expressions can reference keywords and named expressions by name, use arithmetic operators, call built-in functions, and return text or numbers. The expression field supports up to 2,000 characters.",[642,661,635],{"id":662},"keywords",[597,664,665,666,669,670,652,673,676,677,680],{},"Keywords connect your formula to the data in your evaluation. Each keyword has a ",[601,667,668],{},"name"," (letters and underscores only — like ",[649,671,672],{},"PainScore",[649,674,675],{},"Patient_Age",") and one or more ",[601,678,679],{},"sources"," that link it to specific elements in your evaluation. Click a keyword to expand it and see its configuration.",[597,682,683],{},[615,684],{"alt":685,"src":686},"Keyword expanded showing Name and Source fields","/screenshots/builder/formula-keyword-list.png",[597,688,689],{},"Sources can reference:",[691,692,693,699,705,710],"ul",{},[694,695,696,698],"li",{},[601,697,101],{}," — The answer value (numeric, text, date, or selected choice)",[694,700,701,704],{},[601,702,703],{},"Choices"," — A specific answer option within a question (returns the formula value if selected, nothing if not)",[694,706,707,709],{},[601,708,97],{}," — All questions in a section as a range (useful for aggregate functions like SUM)",[694,711,712,714],{},[601,713,267],{}," — The computed value of another result (enabling result chaining)",[597,716,717,718,721],{},"Use the ",[601,719,720],{},"Source"," dropdown to browse your evaluation's structure and select the element each keyword references.",[597,723,724],{},[615,725],{"alt":726,"src":727},"Source picker showing the evaluation's sections, questions, and choices","/screenshots/builder/formula-keyword-source-picker.png",[597,729,730,731,652,734,656],{},"When a keyword has multiple sources, it becomes a range — letting you use aggregate functions like ",[649,732,733],{},"=SUM(MyKeyword)",[649,735,736],{},"=AVERAGE(MyKeyword)",[738,739,740,741,744,745,748,749,752,753,756],"tip",{},"Give keywords descriptive names that make your formulas self-documenting. ",[649,742,743],{},"PatientAge"," is clearer than ",[649,746,747],{},"Q1",", and ",[649,750,751],{},"SeverityScore"," is better than ",[649,754,755],{},"Result_A",". Your future self (and anyone maintaining this evaluation) will appreciate it.",[642,758,760],{"id":759},"named-expressions","Named expressions",[597,762,763],{},"Named expressions let you break complex formulas into smaller, reusable pieces. Instead of writing one long expression, you create intermediate calculations with meaningful names, then reference them in your main expression.",[597,765,766,767,769,770,772,773,776],{},"Each named expression has a ",[601,768,668],{}," (same letter-and-underscore rules as keywords), an ",[601,771,644],{}," (up to 2,000 characters), and an optional ",[601,774,775],{},"comment"," for documentation. Named expressions are validated independently — if one has an error, it's flagged separately from the main expression.",[597,778,779],{},[615,780],{"alt":781,"src":782},"Named expression expanded showing Name, Expression, and Comment fields","/screenshots/builder/formula-named-expression.png",[597,784,785,786,789,790,748,793,796],{},"For example, a GFR calculator might have named expressions for ",[649,787,788],{},"GenderCoefficient",", ",[649,791,792],{},"AgeAdjustment",[649,794,795],{},"CreatinineRatio"," — each computing an intermediate value that the main expression combines into the final GFR.",[592,798,800],{"id":799},"writing-expressions","Writing expressions",[642,802,804],{"id":803},"operators","Operators",[597,806,807],{},"EVAL supports all standard spreadsheet operators:",[691,809,810,836,861,870],{},[694,811,812,815,816,819,820,823,824,827,828,831,832,835],{},[601,813,814],{},"Arithmetic:"," ",[649,817,818],{},"+"," (add), ",[649,821,822],{},"-"," (subtract), ",[649,825,826],{},"*"," (multiply), ",[649,829,830],{},"/"," (divide), ",[649,833,834],{},"^"," (power)",[694,837,838,815,841,844,845,848,849,789,852,789,855,789,858],{},[601,839,840],{},"Comparison:",[649,842,843],{},"="," (equals), ",[649,846,847],{},"\u003C>"," (not equal), ",[649,850,851],{},"\u003C",[649,853,854],{},">",[649,856,857],{},"\u003C=",[649,859,860],{},">=",[694,862,863,815,866,869],{},[601,864,865],{},"Text:",[649,867,868],{},"&"," (concatenate strings)",[694,871,872,875,876,879],{},[601,873,874],{},"Grouping:"," Parentheses ",[649,877,878],{},"()"," for controlling evaluation order",[642,881,883],{"id":882},"built-in-functions","Built-in functions",[597,885,886],{},"The formula engine is powered by a full spreadsheet calculation engine, giving you access to hundreds of built-in functions. The most commonly used in clinical evaluations include:",[597,888,889,815,892,789,895,789,898,789,901,789,904,789,907,789,910],{},[601,890,891],{},"Logic:",[649,893,894],{},"IF(condition, then, else)",[649,896,897],{},"AND()",[649,899,900],{},"OR()",[649,902,903],{},"NOT()",[649,905,906],{},"IFS()",[649,908,909],{},"SWITCH()",[649,911,912],{},"IFERROR()",[597,914,915,815,918,789,921,789,924,789,927,789,930,789,933,789,936,789,939,789,942,789,945],{},[601,916,917],{},"Math:",[649,919,920],{},"SUM()",[649,922,923],{},"ROUND()",[649,925,926],{},"ROUNDUP()",[649,928,929],{},"ROUNDDOWN()",[649,931,932],{},"ABS()",[649,934,935],{},"MIN()",[649,937,938],{},"MAX()",[649,940,941],{},"MOD()",[649,943,944],{},"SQRT()",[649,946,947],{},"POWER()",[597,949,950,815,953,789,956,789,959,789,962,789,965,789,968],{},[601,951,952],{},"Statistics:",[649,954,955],{},"AVERAGE()",[649,957,958],{},"MEDIAN()",[649,960,961],{},"COUNT()",[649,963,964],{},"COUNTA()",[649,966,967],{},"COUNTIF()",[649,969,970],{},"SUMIF()",[597,972,973,815,975,789,978,789,981,789,984,789,987,789,990,789,993,789,996,789,999],{},[601,974,865],{},[649,976,977],{},"CONCATENATE()",[649,979,980],{},"LEFT()",[649,982,983],{},"RIGHT()",[649,985,986],{},"MID()",[649,988,989],{},"LEN()",[649,991,992],{},"UPPER()",[649,994,995],{},"LOWER()",[649,997,998],{},"TRIM()",[649,1000,1001],{},"TEXT()",[597,1003,1004,815,1007,789,1010,789,1013,789,1016],{},[601,1005,1006],{},"Information:",[649,1008,1009],{},"ISBLANK()",[649,1011,1012],{},"ISERROR()",[649,1014,1015],{},"ISNUMBER()",[649,1017,1018],{},"ISTEXT()",[597,1020,1021],{},"Most functions you'd use in Excel or Google Sheets work here. If you're unsure whether a specific function is supported, try it — the editor validates your expression and shows an error if the function isn't recognized.",[642,1023,1025],{"id":1024},"example-formulas","Example formulas",[597,1027,1028,1029],{},"A simple sum of question scores:\n",[649,1030,1031],{},"=SUM(Q1_Score, Q2_Score, Q3_Score)",[597,1033,1034,1035],{},"A conditional score interpretation:\n",[649,1036,1037],{},"=IF(TotalScore >= 20, \"Severe\", IF(TotalScore >= 10, \"Moderate\", \"Mild\"))",[597,1039,1040,1041],{},"A BMI calculation:\n",[649,1042,1043],{},"=Weight / (Height * Height)",[597,1045,1046,1047],{},"A percentage calculation:\n",[649,1048,1049],{},"=ROUND((CorrectAnswers / TotalQuestions) * 100, 1)",[1051,1052,1053],"note",{},"Formulas can return text strings (wrapped in quotes) as well as numbers. This is useful for generating human-readable interpretations directly from your formula logic, though most evaluations use Information results with visibility rules for this purpose.",[592,1055,1057],{"id":1056},"how-question-data-flows-into-formulas","How question data flows into formulas",[597,1059,1060],{},"When a keyword references a question, the formula receives the question's answer value. How that value looks depends on the question type:",[691,1062,1063,1069,1075,1081,1087],{},[694,1064,1065,1068],{},[601,1066,1067],{},"Number"," questions provide their numeric value directly",[694,1070,1071,1074],{},[601,1072,1073],{},"One Choice"," questions provide the selected choice's formula value (or the choice title if no formula value is set)",[694,1076,1077,1080],{},[601,1078,1079],{},"Multiple Choices"," questions provide an array of selected formula values (useful with aggregate functions)",[694,1082,1083,1086],{},[601,1084,1085],{},"Date"," questions provide a date serial number (compatible with spreadsheet date functions)",[694,1088,1089,1092],{},[601,1090,1091],{},"Text, Email, Phone"," questions provide the text string",[1094,1095,1096],"warning",{},"For choice-based scoring, always set formula values on your choices. Without formula values, the formula receives the choice title text — which usually isn't what you want in a calculation. Set numeric formula values like \"0\", \"1\", \"2\", \"3\" so your formulas can perform arithmetic.",[592,1098,1100],{"id":1099},"validation-and-errors","Validation and errors",[597,1102,1103,1104,1107],{},"The formula editor validates your expression in real time as you type (with a brief delay). If there's a problem, an error message appears in red below the expression field. The ",[601,1105,1106],{},"Errors"," tab in the top navigation also lights up red when validation issues are present.",[597,1109,1110],{},"Common validation errors include:",[691,1112,1113,1119,1125,1131],{},[694,1114,1115,1118],{},[601,1116,1117],{},"Unrecognized references"," — The expression uses a name that doesn't match any keyword or named expression",[694,1120,1121,1124],{},[601,1122,1123],{},"Circular reference"," — An expression cannot reference itself, either directly or through a chain of named expressions and keywords",[694,1126,1127,1130],{},[601,1128,1129],{},"Syntax errors"," — Invalid function names, mismatched parentheses, or malformed expressions",[694,1132,1133,1136,1137,652,1139],{},[601,1134,1135],{},"Boolean requirement"," — In visibility rule formulas, the expression must evaluate to ",[649,1138,651],{},[649,1140,655],{},[597,1142,1143,1144,1147,1148,1150],{},"In the example below, the expression references ",[649,1145,1146],{},"MoodScore"," but no keyword with that name has been created yet. The error text identifies the unrecognized reference, and the ",[601,1149,1106],{}," tab turns red to indicate the formula isn't valid.",[597,1152,1153],{},[615,1154],{"alt":1155,"src":1156},"Formula validation error — MoodScore not recognized","/screenshots/builder/formula-validation-error.png",[597,1158,1159],{},"Each named expression is validated independently, so you can pinpoint exactly where a problem exists in complex formulas. Once all keywords are properly configured and the expression is syntactically correct, the error indicator disappears.",[597,1161,1162],{},[615,1163],{"alt":1164,"src":1165},"Valid formula with a keyword and no errors","/screenshots/builder/formula-validation-success.png",[592,1167,1169],{"id":1168},"how-the-formula-engine-works","How the formula engine works",[597,1171,1172],{},"Understanding how EVAL evaluates your formulas helps you write more effective expressions and troubleshoot unexpected results.",[642,1174,1176],{"id":1175},"the-spreadsheet-model","The spreadsheet model",[597,1178,1179],{},"Formulas are evaluated using a full spreadsheet calculation engine. When you save a formula, EVAL builds an internal spreadsheet: your main expression goes in cell A1, each keyword maps to a data row below it, and named expressions become spreadsheet-level named references. The engine then evaluates cell A1 — just like a spreadsheet recalculating a formula cell.",[597,1181,1182,1183,789,1185,748,1188,1190],{},"This is why spreadsheet functions like ",[649,1184,920],{},[649,1186,1187],{},"IF()",[649,1189,967],{}," work exactly as they do in Excel — the formula engine supports the same operator precedence, function library, and cell reference model.",[642,1192,1194],{"id":1193},"how-keywords-become-data","How keywords become data",[597,1196,1197,1198,656],{},"Each keyword is resolved to a spreadsheet row by looking up its sources in the current evaluation state. For a question source, the engine reads the answer value. For a choice source, it reads the choice's formula value only if that choice is selected — unselected choices contribute nothing. For a section source, every question in the section is flattened into a cell range, enabling aggregate functions like ",[649,1199,1200],{},"=SUM(SectionKeyword)",[597,1202,1203],{},"When a keyword has a single source, the named reference points to one cell. With multiple sources (or a multi-select question or section), it becomes a range — which is why aggregate functions work automatically.",[642,1205,1207],{"id":1206},"date-handling","Date handling",[597,1209,1210,1211,1214,1215,1218],{},"Date questions are converted to Excel-compatible serial numbers before entering the spreadsheet. This means date arithmetic functions like ",[649,1212,1213],{},"DATEDIF()"," and ",[649,1216,1217],{},"DAYS()"," work as expected. The serial number represents days since the standard spreadsheet epoch, matching Excel and Google Sheets date behavior.",[642,1220,1222],{"id":1221},"validation-with-simulated-data","Validation with simulated data",[597,1224,1225],{},"When you validate a formula, EVAL generates simulated test data: random numbers within each question's min/max range, the first choice selected for choice questions, sample text for text fields, and today's date for date questions. This lets the engine check syntax and function validity without requiring actual evaluation responses.",[642,1227,1229],{"id":1228},"caching","Caching",[597,1231,1232],{},"The engine caches compiled spreadsheet instances based on each formula's static structure. When the same formula is re-evaluated with different answers — as happens during live evaluation play — only the data cells are updated rather than rebuilding the entire spreadsheet. This makes real-time formula evaluation fast even with complex scoring logic.",[1051,1234,1235,1236,1239],{},"The CHOICE keyword has special handling: if none of the referenced choices are selected, the keyword still receives a null placeholder cell. This prevents ",[649,1237,1238],{},"#NAME?"," errors in formulas that reference optional choices — the formula evaluates cleanly whether or not the choice is selected.",[592,1241,1243],{"id":1242},"getting-started","Getting started",[1245,1246,1247,1253],"card-group",{},[1248,1249,1252],"card",{"icon":1250,"title":109,"to":1251},"i-mdi-calculator-variant-outline","./results","Configure formula results and information results on the Results tab.",[1248,1254,1257],{"icon":1255,"title":117,"to":1256},"i-mdi-test-tube","./scenario-testing","Test your formulas against known inputs to verify they produce correct outputs.",{"title":1259,"searchDepth":1260,"depth":1260,"links":1261},"",2,[1262,1263,1269,1274,1275,1276,1283],{"id":594,"depth":1260,"text":595},{"id":621,"depth":1260,"text":622,"children":1264},[1265,1267,1268],{"id":644,"depth":1266,"text":628},3,{"id":662,"depth":1266,"text":635},{"id":759,"depth":1266,"text":760},{"id":799,"depth":1260,"text":800,"children":1270},[1271,1272,1273],{"id":803,"depth":1266,"text":804},{"id":882,"depth":1266,"text":883},{"id":1024,"depth":1266,"text":1025},{"id":1056,"depth":1260,"text":1057},{"id":1099,"depth":1260,"text":1100},{"id":1168,"depth":1260,"text":1169,"children":1277},[1278,1279,1280,1281,1282],{"id":1175,"depth":1266,"text":1176},{"id":1193,"depth":1266,"text":1194},{"id":1206,"depth":1266,"text":1207},{"id":1221,"depth":1266,"text":1222},{"id":1228,"depth":1266,"text":1229},{"id":1242,"depth":1260,"text":1243},"Build clinical scoring logic with spreadsheet-style expressions — reference questions through keywords, create reusable sub-calculations, and use hundreds of built-in functions.","md",null,{"icon":1288},"i-mdi-function-variant",true,{"title":113,"description":1284},"VbeHefx7Ju-l28Dgpr4ckwPNH2CvE4WmMO8leQx0Z2Y",[1293,1295],{"title":109,"path":110,"stem":111,"description":1294,"children":-1},"Define what happens after someone completes your evaluation — calculate clinical scores with formulas or display guidance with information results.",{"title":117,"path":118,"stem":119,"description":1296,"children":-1},"Validate your evaluation's formulas and visibility rules by defining test cases with known inputs and expected outputs before publishing.",1776705242767]