Error while importing Condition class of Openmrs core in PageController of coreapps

I am encountering the following error - https://pastebin.com/mdDaB4wS , while importing Condition class of Openmrs core into PageController classes of Openmrs coreapps. i used the following import statements-
import org.openmrs.Condition;
import org.openmrs.api.impl.ConditionServiceImpl; and yet it displays the error: cannot find symbol Condition

Just to get some context, what would you love to do with the condition in that controller?

In order to implement the edit condition feature, I am trying to send condition.uuid as a part of the url, so that the information can be retrieved in the edit condition page.

Which ticket is that?

RA-1526

Did you take a look at these? https://github.com/openmrs/openmrs-module-coreapps/tree/master/omod/src/main/webapp/pages/conditionlist

And these? https://github.com/openmrs/openmrs-module-coreapps/tree/master/omod/src/main/webapp/resources/scripts/conditionlist/controllers

Does it mean that, I’m supposed to add code to addcondition.controller.js and not to AddConditionPageController.java ?

Correct. You may also need to look at https://github.com/openmrs/openmrs-module-coreapps/blob/master/omod/src/main/webapp/resources/scripts/conditionlist/models/condition.model.js

And a few other files in here: https://github.com/openmrs/openmrs-module-coreapps/tree/master/omod/src/main/webapp/resources/scripts/conditionlist

If you are to make changes in AddConditionPageController.java, they will be of such a nature that you do not need to declare the org.openmrs.Condition class in there.

To which part of code is line number 23 of manageconditions.controller.js being redirected to?

Is there any documentation for RestfulServices defined for condition list that i could follow?

The server side REST calls are handled at https://github.com/openmrs/openmrs-module-emrapi/blob/master/web-pre2.2/src/main/java/org/openmrs/module/emrapi/web/controller/ConditionController.java

Is there any API call using which i can retrieve a single condition using some unique id?

Don’t you already have the condition that you are editing? Do you need to fetch it again via a REST call?

I had the idea to fetch the condition for editing using a REST call, but is there any other way by which I can directly fetch it without making an API request?

By the time you want to edit a condition, it means you already have it on the client. Why then would you need to fetch it again from the server?

I am trying to pass the condition from manage conditions to edit conditions page as shown in line 85 (manageConditions.gsp)

on doing this I’m not encountering any error but for the edit icon is getting disappeared from the manage conditions page. 13

Take a look at the javascript console. You could be getting errors there.

According to the error, the condition is being retrieved as null (at line 85 of manageConditions.gsp) though the condition is being initialized at line 79. I am not able to figure out the reason why this is happening.

Can you do a pull request and i review the changes that you have made?