This page has been Archived, and is obsolete. It is available on the Bahmni wiki only for reference and historical purposes.

Instead of deleting a page, we prefer to "archive" it, so that it is still available to people who have bookmarked the page.


 

Example :

In the above template 'Serious Adverse Events' there are multiple forms

SAE description from SAE form

Related tests (data from PV unit summary)

SAE outcome ( from PV unit summary)

TB drug treatment (data from PV unit summary)

Other causal factors (data from PV unit summary)

In some scenarios the date entered in the forms (ex:-  Date Of SAE Report ) should be used as the obsDate time for all the forms in that template.

In such cases there is a groovy script to handle that : 

https://github.com/Bhamni/endtb-config/blob/master/openmrs/obscalculator/BahmniObsValueCalculator.groovy

Currently the encounter-date is taken as the  default obsDate for all the forms.

 

To override this we have to add the following line :

 

to the BahmniObsValueCalculator.groovy file :

   Ex: 

The template name is the first entry ( Ex: "Serious Adverse Events Template" is the fully specified name for "Serious Adverse Events")

The dateField to be overridden is the second entry (Ex: "SAE Form, Date of SAE report" as fully specified name for "Date of SAE Report")