Forms 2.0 - How to debug?

(Ramashish Joshi) #1

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()?

(Angshuman Sarkar) #2
  1. I just use Developer tools - you might want to build the form-controls (dev) first
  2. No. you can not access another form.

(Ramashish Joshi) #3
  1. Hope we will be able to do it in Forms 3.0. Discussions for PAT?

(Angshuman Sarkar) #4

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.

(sameer gije) #5

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

(Angshuman Sarkar) #6

Check AutoComplete control of formcontrols