Handling Complex Logic in Forms using HTML Form Entry

Are there any recommendations or best practices dealing with the circumstances below using HTML Form Entry module:

I have a form for handling ANC visits for a mother, so there are multiple encounters on the form.

  1. Depending on what happened in the previous visit, some fields are disabled, or hidden and their data just displayed

  2. Some actions in a visit are only displayed based on the previous one, say if the mother had an HIV or Syphilis test, then the results are entered in the next visit, or the field keeps showing until that data is entered.

  3. The data in the forms is also editable, so basically the screen also has to appear as it was during entry based on the previous data.

I am currently using Velocity includeIf - for the entry and edit but I am wondering if there is any easier way to approach this, over and above duplicating the form for entry and edit modes.