how to use computed class while adding a concept in openmrs.

I wanted to configure the concept ANC, Expected Delivery Date , this concept’s class is computed.

@Biruk Abebe

Hi @samrizee, If you have the logic to do the calculation, then I think you have 2 options.

One option is to do it from the front end at the forms where you can use a form/obs control event at the implementers interface (this would be in JavaScript) to calculate the EDD say when the LNMP obs control changes (see here for more information on form controls events https://bahmni.atlassian.net/wiki/spaces/BAH/pages/237437004/Form+Conditions+Form+Events)

The other options which will be at the backend would be to use Bahmni groovy scripts (using the groovy language) that will execute when an encounter save event is fired and use the logic there to calculate the EDD obs value (see here for details on groovy scripts https://bahmni.atlassian.net/wiki/spaces/BAH/pages/97812538/Groovy+Scripts)

I haven’t actually used the groovy route before but have used form/obs control events on many occasions to do such things. The information here might also be helpful the regarding groovy script options https://bahmni.atlassian.net/wiki/spaces/BAH/pages/33456359/Auto-Calculation+of+Observations