How would you design a tool to specify deeply nested forms, basically a complex decision tree, eg for medical diagnosis or complex tax stuff etc, where future form elements can dependent on a previously specified one, but statically ie chosen from few option not generated via a function so that all options and branches are known without executing code. The form specification should just be declarative, data. What data structure would you use to represent that form (I think it would basically be a DAG)? What language would you write it in? How would you generate a graphical representation (eg converting to .dot)? How would you generate a fillable form from it?

@reasoner@lemmy.one
link
fedilink
2
edit-2
1Y

You’re describing what Oracle Intelligent Advisor (OIA) tries to deliver with their interviews. After you write your code, an interview can be automatically generated which collects data and infers which questions need to be asked based on previous answers. For data representation, it is unfortunately either captured in Microsoft Word or within their interview screens as logic, which does not meet your graphical representation needs. It seemed to be close enough that I thought it worth mentioning. It’s original use case was for tax purposes but I use it professionally to determine eligibility to public assistance programs.

Similar to @steph’s answer ErgoAI is a prolog derivative with a syntax rather similar to .dot (from what I gather). This tool would capture the data in a format you like, but does not generate a fillable form for you, but I believe it could be made to do so in a manner similar to OIA above.

Create a post

All things programming and coding related. Subcommunity of Technology.


This community’s icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

  • 1 user online
  • 2 users / day
  • 2 users / week
  • 8 users / month
  • 98 users / 6 months
  • 1 subscriber
  • 302 Posts
  • 2.15K Comments
  • Modlog