Forms 2.0 - How to debug?

I have implemented a form using Forms 2.0 implementer interface and have few controls (concepts) on it. I am handling an event on a control to set value of another control but it is not working.

  1. How to debug it using Chrome developer tools? Where to set a break point?
  2. Is it possible to access value of concept present on another form (similarly implemented a form using Forms 2.0 implementer interface)? Can that observation entered on another be extracted from getPatient()?
  1. I just use Developer tools - you might want to build the form-controls (dev) first
  2. No. you can not access another form.
  1. Hope we will be able to do it in Forms 3.0. Discussions for PAT?

Sure. Although my suggestion would be to limit/restrict such interactions.

  • Each form must be independent, and if any component must know of value of any other data element, then it should use API to get that. Example, height/weight might be of relevance in a form, and specific control or form wants to use that, its better to fetch that using API.
  • Soon, we are thinking of bringing “role/privilege” level to the forms. This might throw up some challenges.
  • If we think it should be (and appropriate), then we might want to expose through the formContext or patientContext which are already available.

Is there any example of how to consume API from JavaScript attached to a control through implementer interface?

Check AutoComplete control of formcontrols