Hi Mike, the indicators have parameters (startDate, endDate, location). Probably they aren't displayed on the Indicators Over Time page because I am not saving them independently of the ReportDefinition.
Using your wording the different ways I was talking about: 1) "saving a ReportDefinition using ReportDefinitionService" 2) "saving independently of the ReportDefinition" If I understand right, if you save an indicator independently of the ReportDefinition you will have the serialized indicator definition twice in the database. For example (column serialized_data): <indicator id="327"> <parameterizable class="org.openmrs.module.reporting.indicator.CohortIndicator" id="328" retired="false"> <name>HIVPatientsOnIndinavirDrugIndicator</name> <parameters reference="4"/> <type>FRACTION</type> <cohortDefinition id="329"> <parameterizable class="org.openmrs.module.reporting.cohort.definition.CompositionCohortDefinition" id="330" retired="false"> <name>HIVPatientsOnIndinavirDrug</name> <parameters reference="23"/> <log class="org.apache.commons.logging.impl.SLF4JLocationAwareLog" reference="26"/> <searches id="331"> <entry> <string>patientsInHIVProgram</string> <org.openmrs.module.reporting.evaluation.parameter.Mapped reference="28"/> </entry> <entry> <string>patientsOnIndinavirDrug</string> <org.openmrs.module.reporting.evaluation.parameter.Mapped id="332"> <parameterizable class="org.openmrs.module.reporting.cohort.definition.SqlCohortDefinition" id="333" retired="false"> <name>patientsOnIndinavirDrug</name> <parameters id="334"/> <query>select distinct o.patient_id from orders o,concept c where o.concept_id=c.concept_id and c.uuid='3cd3ef46-26fe-102b-80cb-0017a47871b2' and o.discontinued=0 and o.voided=0</query> </parameterizable> <parameterMappings id="335"/> </org.openmrs.module.reporting.evaluation.parameter.Mapped> </entry> </searches> <compositionString>patientsInHIVProgram AND patientsOnIndinavirDrug</compositionString> </parameterizable> <parameterMappings reference="37"/> </cohortDefinition> <denominator reference="38"/> </parameterizable> <parameterMappings reference="39"/> </indicator> Do you recommend to save indicators always independently? Is the report definition in the database updated if you modify an indicator in the UI which was saved independently? Thanks, Peter On 08/20/2011 04:16 AM, Michael Seaton wrote: > Hi Peter, > > I'm not totally understanding your questions I'm afraid. A couple of > comments: > > * I can't remember if this is the case or not, but it's possible that > the Indicators Over Time page only displays Indicators that have certain > parameters (eg. startDate, endDate, location) > > * I'm pretty sure the current version of the DataSetViewer only allows > you to choose DataSetDefinitions which have no parameters (clearly this > needs work) > > * If you are programmatically creating ReportDefinitions, you will only > see the underlying DataSetDefinitions in the UI if you are explicitly > saving these independently of the ReportDefinition. Similarly, you will > also see underlying Indicators in the UI if you are explicitly saving > these independently of the DataSetDefinition. > > For your last point about report definitions being loaded and saved in > different ways...what do you mean here? Can you lay out the different > ways that you are seeing and where? > > Thanks, > Mike > > > > > On 08/17/2011 08:08 AM, Peter Eichenauer wrote: >> Hi, >> >> I am saving a report definition programmatically using >> ReportDefinitionService. In UI the report runs fine but I can't use >> "Indicators Over Time" and "Data Set Viewer". I would expect that >> indicators and DataSet appear on these pages, but they don't. >> >> It seems report definitions are loaded and saved in different ways in >> the reporting module. Which way is recommended? >> >> Thanks, >> Peter _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

